aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMaxim Kuvyrkov <maxim.kuvyrkov@linaro.org>2021-06-29 11:09:17 +0000
committerMaxim Kuvyrkov <maxim.kuvyrkov@linaro.org>2021-06-29 11:13:15 +0000
commit466cc6619de354cce0d9331bf844a3aef7970d62 (patch)
tree5b59b74cea89a7c93d0f8b34f069e9bf9177a82c
parent2d0b080a918df246a41e7f73691fc6b943504048 (diff)
lib/make.sh (make_check): Fix handling of RUNTESTFLAGS
We now set RUNTESTFLAGS a single time on "make check" command line instead of setting it once explicitly, and another time implicitly via $make_flags. This should avoid problems in parsing RUNTESTFLAGS settings. Change-Id: Ie842e148b50445589a054d068e797a76aa53872d
-rw-r--r--lib/make.sh26
1 files changed, 19 insertions, 7 deletions
diff --git a/lib/make.sh b/lib/make.sh
index 8deee9e3..44392d30 100644
--- a/lib/make.sh
+++ b/lib/make.sh
@@ -698,12 +698,24 @@ make_check()
make_flags="${make_flags} LDFLAGS_FOR_BUILD=\"${override_ldflags}\""
fi
- local runtestflags="$(get_component_runtestflags ${component})"
- if test x"${runtestflags}" != x; then
- make_flags="${make_flags} RUNTESTFLAGS=\"${runtestflags}\""
+ local -a runtestflags
+
+ # ??? No idea about the difference (if any?) between $runtest_flags
+ # ??? and $component_runtestflags. Both seem to be empty all the time.
+ if [ x"$runtest_flags" != x"" ]; then
+ runtestflags+=("$runtest_flags")
+ fi
+ local component_runtestflags
+ component_runtestflags=$(get_component_runtestflags $component)
+ if [ x"$component_runtestflags" != x"" ]; then
+ runtestflags+=("$component_runtestflags")
+ fi
+ if [ "$override_runtestflags" != x"" ]; then
+ # These are extra runtest flags, not a proper override.
+ runtestflags+=("$override_runtestflags")
fi
- if test x"${override_runtestflags}" != x; then
- make_flags="${make_flags} RUNTESTFLAGS=\"${override_runtestflags}\""
+ if [ x"${runtestflags[*]}" != x"" ]; then
+ make_flags="${make_flags} RUNTESTFLAGS=\"${runtestflags[*]}\""
fi
if test x"${parallel}" = x"yes"; then
@@ -724,7 +736,7 @@ make_check()
if test x"${build}" = x"${target}"; then
# Overwrite ${checklog} in order to provide a clean log file
# if make check has been run more than once on a build tree.
- dryrun "make check RUNTESTFLAGS=\"${runtest_flags} --xml=${component}.xml \" ${make_flags} -w -i -k -C ${builddir} 2>&1 | tee ${checklog}"
+ dryrun "make check ${make_flags} -w -i -k -C ${builddir} 2>&1 | tee ${checklog}"
local result=$?
record_test_results "${component}" $2
if test $result -gt 0; then
@@ -796,7 +808,7 @@ make_check()
for i in ${dirs}; do
# Always append "tee -a" to the log when building components individually
- dryrun "make ${check_targets} SYSROOT_UNDER_TEST=${sysroots} FLAGS_UNDER_TEST=\"\" PREFIX_UNDER_TEST=\"${local_builds}/destdir/${host}/bin/${target}-\" RUNTESTFLAGS=\"${runtest_flags}\" QEMU_CPU_UNDER_TEST=${qemu_cpu} ${schroot_make_opts} ${make_flags} -w -i -k -C ${builddir}$i 2>&1 | tee -a ${checklog}"
+ dryrun "make ${check_targets} SYSROOT_UNDER_TEST=${sysroots} FLAGS_UNDER_TEST=\"\" PREFIX_UNDER_TEST=\"${local_builds}/destdir/${host}/bin/${target}-\" QEMU_CPU_UNDER_TEST=${qemu_cpu} ${schroot_make_opts} ${make_flags} -w -i -k -C ${builddir}$i 2>&1 | tee -a ${checklog}"
local result=$?
record_test_results "${component}" $2
if test $result -gt 0; then