Minor improvments in test script
Change-Id: I6ef0fa1696fe5bb2e4f843b35c73cd404d8078f9
diff --git a/tests/run_tests.sh b/tests/run_tests.sh
index 29fb975..b6654df 100755
--- a/tests/run_tests.sh
+++ b/tests/run_tests.sh
@@ -1,7 +1,9 @@
#!/usr/bin/env bash
set -e
-[ -n "$DEBUG" ] && set -x
+if [[ $DEBUG =~ ^(True|true|1|yes)$ ]]; then
+ set -x
+fi
CURDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
METADATA=${CURDIR}/../metadata.yml
@@ -22,7 +24,7 @@
SALT_OPTS="${SALT_OPTS} --retcode-passthrough --local -c ${SALT_CONFIG_DIR} --log-file=/dev/null"
-if [ "x${SALT_VERSION}" != "x" ]; then
+if [ -n "${SALT_VERSION}" ]; then
PIP_SALT_VERSION="==${SALT_VERSION}"
fi