summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPetri Latvala <petri.latvala@intel.com>2017-09-25 12:34:02 +0300
committerPetri Latvala <petri.latvala@intel.com>2017-09-26 15:22:49 +0300
commit9fe6ea91fd6e4ff3d95dfd4f46c2d3080be6a405 (patch)
tree8f6c3af209303c6e3f4210d1fe183967a3b9a97b
parent0a91a5e9624d41d23b79e2540eda111cb56d42d9 (diff)
igt_command_line.sh: Fix bashism
[[ a != b ]] is a bashism. As it's just comparing $1 to an empty string, use -n with a normal [ ]. /bin/sh is dash in CI. v2: Also change the script to #!/bin/bash to avoid having to babysit bashism later. Fixes: f0243a761f1b ("tests/igt_command_line.sh: Allow testing individual tests") CC: Daniel Vetter <daniel.vetter@ffwll.ch> Signed-off-by: Petri Latvala <petri.latvala@intel.com> Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
-rwxr-xr-xtests/igt_command_line.sh4
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/igt_command_line.sh b/tests/igt_command_line.sh
index 57d105e9..8285ba62 100755
--- a/tests/igt_command_line.sh
+++ b/tests/igt_command_line.sh
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
#
# Copyright © 2014 Intel Corporation
#
@@ -112,7 +112,7 @@ if [ $? -ne 0 ]; then
exit 99
fi
-if [[ "$1" != "" ]] ; then
+if [ -n "$1" ] ; then
check_test $1
exit 0
fi