tests: use -z / -n to test for string empty / non-empty
[babeltrace.git] / tests / utils / run_python_bt2
index fa5dd0cc4e5bca51a6302ece2e0c80907bbc9e59..574900a2c48c586484ec25c712b5cfd14d06b94c 100755 (executable)
@@ -14,7 +14,7 @@
 #     -t test_value.MapValueTestCase.test_deepcopy \
 #     ./tests/bindings/python/bt2
 
-if [ "x${BT_TESTS_SRCDIR:-}" != "x" ]; then
+if [ -n "${BT_TESTS_SRCDIR:-}" ]; then
        UTILSSH="$BT_TESTS_SRCDIR/utils/utils.sh"
 else
        UTILSSH="$(dirname "$0")/../utils/utils.sh"
@@ -33,7 +33,7 @@ usage() {
        echo "the path to the built 'tests' directory."
 }
 
-if [ "x$*" = "x" ]; then
+if [ -z "$*" ]; then
        usage
        exit 1
 fi
This page took 0.023387 seconds and 4 git commands to generate.