All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] docs/devel/testing.rst: Fix referencies to unit tests
@ 2021-03-17 19:48 Wainer dos Santos Moschetta
  2021-03-17 21:55 ` John Snow
  2021-03-18  5:10 ` Thomas Huth
  0 siblings, 2 replies; 4+ messages in thread
From: Wainer dos Santos Moschetta @ 2021-03-17 19:48 UTC (permalink / raw)
  To: qemu-devel; +Cc: qemu-trivial, pbonzini, thuth

With the recent move of the unit tests to tests/unit directory some
instructions under the "Unit tests" section became imprecise, which
are fixed by this change.

Related-to: da668aa15b99 (tests: Move unit tests into a separate directory)
Signed-off-by: Wainer dos Santos Moschetta <wainersm@redhat.com>
---
 docs/devel/testing.rst | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/docs/devel/testing.rst b/docs/devel/testing.rst
index 1434a50cc4..1da4c4e4c4 100644
--- a/docs/devel/testing.rst
+++ b/docs/devel/testing.rst
@@ -34,17 +34,17 @@ If you are writing new code in QEMU, consider adding a unit test, especially
 for utility modules that are relatively stateless or have few dependencies. To
 add a new unit test:
 
-1. Create a new source file. For example, ``tests/foo-test.c``.
+1. Create a new source file. For example, ``tests/unit/foo-test.c``.
 
 2. Write the test. Normally you would include the header file which exports
    the module API, then verify the interface behaves as expected from your
    test. The test code should be organized with the glib testing framework.
    Copying and modifying an existing test is usually a good idea.
 
-3. Add the test to ``tests/meson.build``. The unit tests are listed in a
+3. Add the test to ``tests/unit/meson.build``. The unit tests are listed in a
    dictionary called ``tests``.  The values are any additional sources and
    dependencies to be linked with the test.  For a simple test whose source
-   is in ``tests/foo-test.c``, it is enough to add an entry like::
+   is in ``tests/unit/foo-test.c``, it is enough to add an entry like::
 
      {
        ...
-- 
2.29.2



^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] docs/devel/testing.rst: Fix referencies to unit tests
  2021-03-17 19:48 [PATCH] docs/devel/testing.rst: Fix referencies to unit tests Wainer dos Santos Moschetta
@ 2021-03-17 21:55 ` John Snow
  2021-03-18 12:54   ` Wainer dos Santos Moschetta
  2021-03-18  5:10 ` Thomas Huth
  1 sibling, 1 reply; 4+ messages in thread
From: John Snow @ 2021-03-17 21:55 UTC (permalink / raw)
  To: Wainer dos Santos Moschetta, qemu-devel; +Cc: qemu-trivial, pbonzini, thuth

typo in the commit summary; "references to"

On 3/17/21 3:48 PM, Wainer dos Santos Moschetta wrote:
> With the recent move of the unit tests to tests/unit directory some
> instructions under the "Unit tests" section became imprecise, which
> are fixed by this change.
> 
> Related-to: da668aa15b99 (tests: Move unit tests into a separate directory)

You can probably just use "Fixes", even though nothing is technically 
broken to avoid introducing a new one-off tag type.

> Signed-off-by: Wainer dos Santos Moschetta <wainersm@redhat.com>
> ---
>   docs/devel/testing.rst | 6 +++---
>   1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/docs/devel/testing.rst b/docs/devel/testing.rst
> index 1434a50cc4..1da4c4e4c4 100644
> --- a/docs/devel/testing.rst
> +++ b/docs/devel/testing.rst
> @@ -34,17 +34,17 @@ If you are writing new code in QEMU, consider adding a unit test, especially
>   for utility modules that are relatively stateless or have few dependencies. To
>   add a new unit test:
>   
> -1. Create a new source file. For example, ``tests/foo-test.c``.
> +1. Create a new source file. For example, ``tests/unit/foo-test.c``.
>   
>   2. Write the test. Normally you would include the header file which exports
>      the module API, then verify the interface behaves as expected from your
>      test. The test code should be organized with the glib testing framework.
>      Copying and modifying an existing test is usually a good idea.
>   
> -3. Add the test to ``tests/meson.build``. The unit tests are listed in a
> +3. Add the test to ``tests/unit/meson.build``. The unit tests are listed in a
>      dictionary called ``tests``.  The values are any additional sources and
>      dependencies to be linked with the test.  For a simple test whose source
> -   is in ``tests/foo-test.c``, it is enough to add an entry like::
> +   is in ``tests/unit/foo-test.c``, it is enough to add an entry like::
>   
>        {
>          ...
> 



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] docs/devel/testing.rst: Fix referencies to unit tests
  2021-03-17 19:48 [PATCH] docs/devel/testing.rst: Fix referencies to unit tests Wainer dos Santos Moschetta
  2021-03-17 21:55 ` John Snow
@ 2021-03-18  5:10 ` Thomas Huth
  1 sibling, 0 replies; 4+ messages in thread
From: Thomas Huth @ 2021-03-18  5:10 UTC (permalink / raw)
  To: Wainer dos Santos Moschetta, qemu-devel; +Cc: qemu-trivial, pbonzini

On 17/03/2021 20.48, Wainer dos Santos Moschetta wrote:
> With the recent move of the unit tests to tests/unit directory some
> instructions under the "Unit tests" section became imprecise, which
> are fixed by this change.
> 
> Related-to: da668aa15b99 (tests: Move unit tests into a separate directory)
> Signed-off-by: Wainer dos Santos Moschetta <wainersm@redhat.com>
> ---
>   docs/devel/testing.rst | 6 +++---
>   1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/docs/devel/testing.rst b/docs/devel/testing.rst
> index 1434a50cc4..1da4c4e4c4 100644
> --- a/docs/devel/testing.rst
> +++ b/docs/devel/testing.rst
> @@ -34,17 +34,17 @@ If you are writing new code in QEMU, consider adding a unit test, especially
>   for utility modules that are relatively stateless or have few dependencies. To
>   add a new unit test:
>   
> -1. Create a new source file. For example, ``tests/foo-test.c``.
> +1. Create a new source file. For example, ``tests/unit/foo-test.c``.
>   
>   2. Write the test. Normally you would include the header file which exports
>      the module API, then verify the interface behaves as expected from your
>      test. The test code should be organized with the glib testing framework.
>      Copying and modifying an existing test is usually a good idea.
>   
> -3. Add the test to ``tests/meson.build``. The unit tests are listed in a
> +3. Add the test to ``tests/unit/meson.build``. The unit tests are listed in a
>      dictionary called ``tests``.  The values are any additional sources and
>      dependencies to be linked with the test.  For a simple test whose source
> -   is in ``tests/foo-test.c``, it is enough to add an entry like::
> +   is in ``tests/unit/foo-test.c``, it is enough to add an entry like::
>   
>        {
>          ...
> 

Reviewed-by: Thomas Huth <thuth@redhat.com>



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] docs/devel/testing.rst: Fix referencies to unit tests
  2021-03-17 21:55 ` John Snow
@ 2021-03-18 12:54   ` Wainer dos Santos Moschetta
  0 siblings, 0 replies; 4+ messages in thread
From: Wainer dos Santos Moschetta @ 2021-03-18 12:54 UTC (permalink / raw)
  To: John Snow, qemu-devel; +Cc: qemu-trivial, pbonzini, thuth


On 3/17/21 6:55 PM, John Snow wrote:
> typo in the commit summary; "references to"
>
> On 3/17/21 3:48 PM, Wainer dos Santos Moschetta wrote:
>> With the recent move of the unit tests to tests/unit directory some
>> instructions under the "Unit tests" section became imprecise, which
>> are fixed by this change.
>>
>> Related-to: da668aa15b99 (tests: Move unit tests into a separate 
>> directory)
>
> You can probably just use "Fixes", even though nothing is technically 
> broken to avoid introducing a new one-off tag type.

Yeah, I wasn't sure whether to use "Fixes" or not. Thanks for the tip!

Going to send a v2 to fix those issues.

- Wainer

>
>
>> Signed-off-by: Wainer dos Santos Moschetta <wainersm@redhat.com>
>> ---
>>   docs/devel/testing.rst | 6 +++---
>>   1 file changed, 3 insertions(+), 3 deletions(-)
>>
>> diff --git a/docs/devel/testing.rst b/docs/devel/testing.rst
>> index 1434a50cc4..1da4c4e4c4 100644
>> --- a/docs/devel/testing.rst
>> +++ b/docs/devel/testing.rst
>> @@ -34,17 +34,17 @@ If you are writing new code in QEMU, consider 
>> adding a unit test, especially
>>   for utility modules that are relatively stateless or have few 
>> dependencies. To
>>   add a new unit test:
>>   -1. Create a new source file. For example, ``tests/foo-test.c``.
>> +1. Create a new source file. For example, ``tests/unit/foo-test.c``.
>>     2. Write the test. Normally you would include the header file 
>> which exports
>>      the module API, then verify the interface behaves as expected 
>> from your
>>      test. The test code should be organized with the glib testing 
>> framework.
>>      Copying and modifying an existing test is usually a good idea.
>>   -3. Add the test to ``tests/meson.build``. The unit tests are 
>> listed in a
>> +3. Add the test to ``tests/unit/meson.build``. The unit tests are 
>> listed in a
>>      dictionary called ``tests``.  The values are any additional 
>> sources and
>>      dependencies to be linked with the test.  For a simple test 
>> whose source
>> -   is in ``tests/foo-test.c``, it is enough to add an entry like::
>> +   is in ``tests/unit/foo-test.c``, it is enough to add an entry like::
>>          {
>>          ...
>>
>



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2021-03-18 12:56 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-17 19:48 [PATCH] docs/devel/testing.rst: Fix referencies to unit tests Wainer dos Santos Moschetta
2021-03-17 21:55 ` John Snow
2021-03-18 12:54   ` Wainer dos Santos Moschetta
2021-03-18  5:10 ` Thomas Huth

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.