Fix empty argument issue in security-tests-all.sh
authorKrzysztof Jackiewicz <k.jackiewicz@samsung.com>
Fri, 1 Mar 2019 11:06:18 +0000 (12:06 +0100)
committerKrzysztof Jackiewicz <k.jackiewicz@samsung.com>
Fri, 15 Mar 2019 13:54:33 +0000 (14:54 +0100)
If --noignored option is used in security-tests-all.sh an empty argument is
passed to security-tests.sh which causes an error.

Refactor security test scripts to avoid empty arguments.

Change-Id: Iedfe0d35a096334ec070167c870de2db01d64607

src/security-tests-all.sh
src/security-tests.sh

index 9ab5b5c..12c5f87 100644 (file)
@@ -28,7 +28,7 @@ function runTest
 {
     # 'text' - console output
     # 'summary' - used for summary view
-    security-tests.sh "$1" --output=text --output=summary "$ign"
+    security-tests.sh "$1" --output=text --output=summary $ign
     addSummary
 }
 
index 294dc19..45dd3b5 100644 (file)
@@ -44,12 +44,11 @@ case $1 in
     echo "========================================================================="
     echo "KEY MANAGER UNPRIVILEGED TESTS"
     echo
-    ARGS="${@:2}"
-    su - owner -c "ckm-tests $ARGS"
+    su - owner -c "ckm-tests ${@:2}"
     echo "========================================================================="
     echo "KEY MANAGER PRIVILEGED TESTS"
     echo
-    ckm-privileged-tests $ARGS
+    ckm-privileged-tests "${@:2}"
     ;;
 "yaca")
     echo "========================================================================="