Skip to contentSkip to conversation

tests/build: capture more output from "tests/build/run-tests.sh" script

PATCH New Thomas Haller 1 participant 1 message Sep 14, 2023 netfilter

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 tests/build: capture more output from "tests/build/run-tests.sh" script

Dropping stdout for various build tests makes it hard to understand what happens, when a build fails. Redirect both stdout and stderr to the log files for easier debugging.

---
 tests/build/run-tests.sh | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)
tests/build/run-tests.sh +6 -6
index 6d1f61463029..0a33f0a72d27 100755
@@ -20,21 +20,21 @@ fi
 # working, no need to also run the extensive tests here.
 export NFT_TEST_SKIP_CHECK_LOCAL_SHELL=y
 
-git clone "$dir" "$tmpdir" >/dev/null 2>>"$log_file"
+git clone "$dir" "$tmpdir" &>>"$log_file"
 cd "$tmpdir" || exit
 
-if ! autoreconf -fi >"$log_file" 2>>"$log_file" ; then
+if ! autoreconf -fi &>>"$log_file" ; then
 	echo "Something went wrong. Check the log '${log_file}' for details."
 	exit 1
 fi
 
-if ! ./configure >"$log_file" 2>>"$log_file" ; then
+if ! ./configure &>>"$log_file" ; then
 	echo "Something went wrong. Check the log '${log_file}' for details."
 	exit 1
 fi
 
 echo  "Testing build with distcheck"
-if ! make distcheck >/dev/null 2>>"$log_file" ; then
+if ! make distcheck &>>"$log_file" ; then
 	echo "Something went wrong. Check the log '${log_file}' for details."
 	exit 1
 fi
@@ -44,8 +44,8 @@ echo "Build works. Now, testing compile options"
 
 for var in "${argument[@]}" ; do
 	echo "[EXECUTING] Testing compile option $var"
-	./configure "$var" >/dev/null 2>>"$log_file"
-	make -j 8 >/dev/null 2>>"$log_file"
+	./configure "$var" &>>"$log_file"
+	make -j 8 &>>"$log_file"
 	rt=$?
 	echo -en "\033[1A\033[K" # clean the [EXECUTING] foobar line
 
Signature · 1 line
2.41.0