[2/2] test-manual/intro: bitbake-selftest needs bitbake

Message ID 20220526151228.562281-2-zach@aquabyte.ai
State New
Headers show
Series [1/2] test-manual/intro: reorder bitbake-selftest steps | expand

Commit Message

Zachary T Welch May 26, 2022, 3:12 p.m. UTC
Without adding bitbake/bin to the PATH, some tests will fail when
they cannot find the main bitbake script.

Signed-off-by: Zachary T Welch <zach@aquabyte.ai>
---
 documentation/test-manual/intro.rst | 6 ++++++
 1 file changed, 6 insertions(+)

Comments

Michael Opdenacker May 27, 2022, 9:01 a.m. UTC | #1
Hi Zach

On 5/26/22 17:12, Zach Welch wrote:
> Without adding bitbake/bin to the PATH, some tests will fail when
> they cannot find the main bitbake script.
>
> Signed-off-by: Zachary T Welch <zach@aquabyte.ai>
> ---
>  documentation/test-manual/intro.rst | 6 ++++++
>  1 file changed, 6 insertions(+)
>
> diff --git a/documentation/test-manual/intro.rst b/documentation/test-manual/intro.rst
> index c445e28a7..12324e592 100644
> --- a/documentation/test-manual/intro.rst
> +++ b/documentation/test-manual/intro.rst
> @@ -175,8 +175,14 @@ Tests map into the codebase as follows:
>     which include the fetchers. The tests are located in
>     ``bitbake/lib/*/tests``.
>  
> +   Some of these tests run the ``bitbake`` command, so ``bitbake/bin``
> +   must be added to the ``PATH`` before running ``bitbake-selftest``.
>     From within the BitBake repository, run the following::
>  
> +      $ export PATH=$PWD/bin:$PATH
> +
> +   After that, you can run the selftest script::
> +
>        $ bitbake-selftest
>  
>     The default output is quiet and just prints a summary of what was


Many thanks for the two patches. For both of them:
Reviewed-by: Michael Opdenacker <michael.opdenacker@bootlin.com>
... and merged into "master-next".

Thanks again
Michael.
Quentin Schulz May 27, 2022, 9:03 a.m. UTC | #2
Hi Zach,

On 5/26/22 17:12, Zach Welch wrote:
> Without adding bitbake/bin to the PATH, some tests will fail when
> they cannot find the main bitbake script.
> 
> Signed-off-by: Zachary T Welch <zach@aquabyte.ai>
> ---
>   documentation/test-manual/intro.rst | 6 ++++++
>   1 file changed, 6 insertions(+)
> 
> diff --git a/documentation/test-manual/intro.rst b/documentation/test-manual/intro.rst
> index c445e28a7..12324e592 100644
> --- a/documentation/test-manual/intro.rst
> +++ b/documentation/test-manual/intro.rst
> @@ -175,8 +175,14 @@ Tests map into the codebase as follows:
>      which include the fetchers. The tests are located in
>      ``bitbake/lib/*/tests``.
>   
> +   Some of these tests run the ``bitbake`` command, so ``bitbake/bin``
> +   must be added to the ``PATH`` before running ``bitbake-selftest``.
>      From within the BitBake repository, run the following::
>   
> +      $ export PATH=$PWD/bin:$PATH
> +


Since I think Bitbake won't work when there's a folder with a space in 
its name, I think it's fine not quoting it this way:
export PATH="$PWD/bin:$PATH"

So we should be good.

Reviewed-by: Quentin Schulz <foss+yocto@0leil.net>

Thanks!
Quentin

Patch

diff --git a/documentation/test-manual/intro.rst b/documentation/test-manual/intro.rst
index c445e28a7..12324e592 100644
--- a/documentation/test-manual/intro.rst
+++ b/documentation/test-manual/intro.rst
@@ -175,8 +175,14 @@  Tests map into the codebase as follows:
    which include the fetchers. The tests are located in
    ``bitbake/lib/*/tests``.
 
+   Some of these tests run the ``bitbake`` command, so ``bitbake/bin``
+   must be added to the ``PATH`` before running ``bitbake-selftest``.
    From within the BitBake repository, run the following::
 
+      $ export PATH=$PWD/bin:$PATH
+
+   After that, you can run the selftest script::
+
       $ bitbake-selftest
 
    The default output is quiet and just prints a summary of what was