diff mbox

testsuite: process extra options without exec

Message ID 20171217150055.9147-1-luc.vanoostenryck@gmail.com (mailing list archive)
State Mainlined, archived
Headers show

Commit Message

Luc Van Oostenryck Dec. 17, 2017, 3 p.m. UTC
Commit 399c43889 (testsuite: get options from env too) allowed
the testsuite to takes extra options from the environment but
did it in a crude way involving exec.

Change this by using 'set --' instead of doing an 'exec'.

Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
---
 validation/test-suite | 11 ++++-------
 1 file changed, 4 insertions(+), 7 deletions(-)
diff mbox

Patch

diff --git a/validation/test-suite b/validation/test-suite
index 5655ac40b..f1d3301a6 100755
--- a/validation/test-suite
+++ b/validation/test-suite
@@ -2,13 +2,6 @@ 
 
 #set -x
 
-## allow flags from environment
-flags="$SPARSE_TEST_FLAGS"
-if [ ! -z "$flags" ]; then
-	unset SPARSE_TEST_FLAGS
-	exec "$0" $flags "$@"
-fi
-
 cd $(dirname "$0")
 
 default_path=".."
@@ -513,6 +506,10 @@  _EOF
 	return 0
 }
 
+## allow flags from environment
+set -- $SPARSE_TEST_FLAGS "$@"
+
+## process the flags
 while [ "$#" -gt "0" ]; do
 	case "$1" in
 	-a|--abort)