]> git.ipfire.org Git - thirdparty/nftables.git/commitdiff
tests/build: capture more output from "tests/build/run-tests.sh" script
authorThomas Haller <thaller@redhat.com>
Thu, 14 Sep 2023 13:14:02 +0000 (15:14 +0200)
committerFlorian Westphal <fw@strlen.de>
Fri, 15 Sep 2023 14:36:32 +0000 (16:36 +0200)
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.

Signed-off-by: Thomas Haller <thaller@redhat.com>
Signed-off-by: Florian Westphal <fw@strlen.de>
tests/build/run-tests.sh

index 4616387f8e6088f71d82e1bec5f8aeaa946aafc5..916df2e2fa8e06a741533a77e363fe42c5d07256 100755 (executable)
@@ -15,21 +15,21 @@ if [ ! -w "$tmpdir" ] ; then
         exit 0
 fi
 
-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
@@ -39,8 +39,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