[Buildroot] [PATCH] utils/test-pkg: allow to override the default build directory with an environment variable
Thomas Devoogdt
thomas at devoogdt.com
Fri Sep 19 13:38:37 UTC 2025
From: Thomas Devoogdt <thomas.devoogdt at 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 at 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
More information about the buildroot
mailing list