All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH] utils/test-pkg: allow to override the default build directory with an environment variable
@ 2025-09-19 13:38 Thomas Devoogdt
  2026-02-04 15:19 ` Romain Naour via buildroot
  0 siblings, 1 reply; 2+ messages in thread
From: Thomas Devoogdt @ 2025-09-19 13:38 UTC (permalink / raw)
  To: buildroot; +Cc: Thomas Devoogdt

From: Thomas Devoogdt <thomas.devoogdt@barco.com>

Currently, there is one way to override the ${HOME}/br-test-pkg default,
using the --build-dir argument. But when doing frequent test runs, it's
just easier to force it with an environment variable, so add it.

Signed-off-by: Thomas Devoogdt <thomas.devoogdt@barco.com>
---
 utils/test-pkg | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/utils/test-pkg b/utils/test-pkg
index cea7ace7cb..32b2486b61 100755
--- a/utils/test-pkg
+++ b/utils/test-pkg
@@ -89,7 +89,7 @@ main() {
         printf "error: %s: no such file\n" "${cfg}" >&2; exit 1
     fi
     if [ -z "${dir}" ]; then
-        dir="${HOME}/br-test-pkg"
+        dir="${BR2_TEST_DIR:-${HOME}/br-test-pkg}"
     fi
 
     if [ "${random}" -gt 0 ]; then
@@ -271,7 +271,7 @@ Options:
 
     -d DIR, --build-dir DIR
         Do the builds in directory DIR, one sub-dir per toolchain.
-        If not specified, defaults to \${HOME}/br-test-pkg
+        If not specified, defaults to \${BR2_TEST_DIR}, or \${HOME}/br-test-pkg.
 
     -p PKG, --package PKG
         Test-build the package PKG, by running 'make PKG'; if not specified,
-- 
2.49.0

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

* Re: [Buildroot] [PATCH] utils/test-pkg: allow to override the default build directory with an environment variable
  2025-09-19 13:38 [Buildroot] [PATCH] utils/test-pkg: allow to override the default build directory with an environment variable Thomas Devoogdt
@ 2026-02-04 15:19 ` Romain Naour via buildroot
  0 siblings, 0 replies; 2+ messages in thread
From: Romain Naour via buildroot @ 2026-02-04 15:19 UTC (permalink / raw)
  To: Thomas Devoogdt, buildroot; +Cc: Thomas Devoogdt

Hello Thomas, All,

Le 19/09/2025 à 15:38, Thomas Devoogdt a écrit :
> From: Thomas Devoogdt <thomas.devoogdt@barco.com>
> 
> Currently, there is one way to override the ${HOME}/br-test-pkg default,
> using the --build-dir argument. But when doing frequent test runs, it's
> just easier to force it with an environment variable, so add it.
> 
> Signed-off-by: Thomas Devoogdt <thomas.devoogdt@barco.com>
> ---
>  utils/test-pkg | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/utils/test-pkg b/utils/test-pkg
> index cea7ace7cb..32b2486b61 100755
> --- a/utils/test-pkg
> +++ b/utils/test-pkg
> @@ -89,7 +89,7 @@ main() {
>          printf "error: %s: no such file\n" "${cfg}" >&2; exit 1
>      fi
>      if [ -z "${dir}" ]; then
> -        dir="${HOME}/br-test-pkg"
> +        dir="${BR2_TEST_DIR:-${HOME}/br-test-pkg}"
>      fi
>  
>      if [ "${random}" -gt 0 ]; then
> @@ -271,7 +271,7 @@ Options:
>  
>      -d DIR, --build-dir DIR
>          Do the builds in directory DIR, one sub-dir per toolchain.
> -        If not specified, defaults to \${HOME}/br-test-pkg
> +        If not specified, defaults to \${BR2_TEST_DIR}, or \${HOME}/br-test-pkg.

The prefix BR2_ is for Buildroot environement variable like BR2_VERSION_FULL or
BR2_DL_DIR from the main Makefile. BR2_TEST_DIR is not used anywere else.

Maybe use BR_ like for BR_COMPILER_PARANOID_UNSAFE_PATH?

Best regards,
Romain


>  
>      -p PKG, --package PKG
>          Test-build the package PKG, by running 'make PKG'; if not specified,

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

end of thread, other threads:[~2026-02-04 15:19 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-09-19 13:38 [Buildroot] [PATCH] utils/test-pkg: allow to override the default build directory with an environment variable Thomas Devoogdt
2026-02-04 15:19 ` Romain Naour via buildroot

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.