]> git.ipfire.org Git - thirdparty/nftables.git/commitdiff
tests/shell/run-tests.sh: print hint about testcase being executed
authorArturo Borrero <arturo.borrero.glez@gmail.com>
Wed, 11 May 2016 12:39:38 +0000 (14:39 +0200)
committerPablo Neira Ayuso <pablo@netfilter.org>
Fri, 13 May 2016 09:36:12 +0000 (11:36 +0200)
Print a line with the name of the testcase being executed, and then delete it
with the result.

There are tests which may take a long time and its good to know what is doing
the testsuite.

Signed-off-by: Arturo Borrero Gonzalez <arturo.borrero.glez@gmail.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
tests/shell/run-tests.sh

index 057f11ef57b66708dff4f3f4df59c20590df4dbb..921080fe7d1a46efc3bc2fe24eff1c2dc97462ec 100755 (executable)
@@ -74,8 +74,12 @@ do
        kernel_cleanup
 
        rc_spec=$(awk -F${RETURNCODE_SEPARATOR} '{print $NF}' <<< $testfile)
+
+       msg_info "[EXECUTING]   $testfile"
        test_output=$(NFT=$NFT ${testfile} ${TESTS_OUTPUT} 2>&1)
        rc_got=$?
+       echo -en "\033[1A\033[K" # clean the [EXECUTING] foobar line
+
        if [ "$rc_got" == "$rc_spec" ] ; then
                msg_info "[OK]          $testfile"
                [ "$VERBOSE" == "y" ] && [ ! -z "$test_output" ] && echo "$test_output"