aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/validation/test-suite
diff options
authorLuc Van Oostenryck <luc.vanoostenryck@gmail.com>2017-05-28 17:19:13 +0200
committerLuc Van Oostenryck <luc.vanoostenryck@gmail.com>2017-05-28 21:10:26 +0200
commit3d5f3e28e7fbdc9909b8b9c562080bd7577b6ff2 (patch)
tree78c7aec552392eafe2d378453ed2885e46ae0b20 /validation/test-suite
parent914904553e9b48d0b5b0fa8dba6cb4daa08aeea0 (diff)
downloadsparse-dev-3d5f3e28e7fbdc9909b8b9c562080bd7577b6ff2.tar.gz
testsuite: avoid fork+execing basename
Some testcase (the ones related to sparse-llvm) are disabled if the needed support is not present. This is done by checking the name of the command used by the testcase. The previous possible presence of './' before the command meant that the command was checked via the 'basename' command, which need to ne fork+execed. Since the './' have now been stripped from all command names this is no more needed. Change this by comparing directly the command name. This speedup the testsuite by another 6%. Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
Diffstat (limited to 'validation/test-suite')
-rwxr-xr-xvalidation/test-suite7
1 files changed, 4 insertions, 3 deletions
diff --git a/validation/test-suite b/validation/test-suite
index da9d8815..3056fce9 100755
--- a/validation/test-suite
+++ b/validation/test-suite
@@ -189,11 +189,10 @@ do_test()
if [ "$check_command" = "" ]; then
check_command="$defaut_command"
fi
- cmd=`eval echo $default_path/$check_command`
# check for disabled commands
- set -- $cmd
- base_cmd=`basename $1`
+ set -- $check_command
+ base_cmd=$1
for i in $disabled_cmds; do
if [ "$i" = "$base_cmd" ] ; then
disabled_tests=$(($disabled_tests + 1))
@@ -202,6 +201,8 @@ do_test()
fi
done
+ cmd=`eval echo $default_path/$check_command`
+
echo " TEST $test_name ($file)"
verbose "Using command : $cmd"