diff options
author | Michael Drake <michael.drake@codethink.co.uk> | 2015-09-11 15:25:35 +0000 |
---|---|---|
committer | Michael Drake <michael.drake@codethink.co.uk> | 2015-09-16 14:55:21 +0000 |
commit | 6513e3c8c7426c3900334b640326d1549fbb0f21 (patch) | |
tree | 37c0fb0fe86d517c460da9d866a1facf3e7bcfa2 /test-runner.sh | |
parent | f2172986128a31e1a4b2fe942707490d4cf1bdf6 (diff) | |
download | ciat-tester-6513e3c8c7426c3900334b640326d1549fbb0f21.tar.gz |
Improve shell stuff with review from Richard Maw.
Diffstat (limited to 'test-runner.sh')
-rwxr-xr-x | test-runner.sh | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/test-runner.sh b/test-runner.sh index 9ce1694..b272af2 100755 --- a/test-runner.sh +++ b/test-runner.sh @@ -7,17 +7,17 @@ # ./test-runner.sh file:///test.img openstack tests/uname.test # Inputs -URL=$1 -FILE=`basename "$URL"` +URL="$1" +FILE=$(basename "$URL") shift -BACKEND=$1 +BACKEND="$1" shift -TEST_FILES=$@ +TEST_FILES=( "$@" ) LOG_FILE="$FILE.test.log" # Write log header -echo "Testing image $FILE on `date`" > "$LOG_FILE" -echo " with test command files: $TEST_FILES" >> "$LOG_FILE" +echo "Testing image $FILE on $(date)" > "$LOG_FILE" +echo " with test command files: ${TEST_FILES[@]}" >> "$LOG_FILE" echo "===============================================================================" >> "$LOG_FILE" # Fetch the image @@ -26,7 +26,7 @@ curl -o "$FILE" "$URL" # Run the test echo "Launching $BACKEND test backend" >> "$LOG_FILE" -"$BACKEND/do-tests.sh" "$FILE" $TEST_FILES >> "$LOG_FILE" 2>&1 +"$BACKEND/do-tests.sh" "$FILE" "${TEST_FILES[@]}" >> "$LOG_FILE" 2>&1 # Delete the test image echo "Deleting local image $FILE" >> "$LOG_FILE" 2>&1 |