From 9fe6ea91fd6e4ff3d95dfd4f46c2d3080be6a405 Mon Sep 17 00:00:00 2001 From: Petri Latvala Date: Mon, 25 Sep 2017 12:34:02 +0300 Subject: 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 Signed-off-by: Petri Latvala Acked-by: Daniel Vetter --- tests/igt_command_line.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'tests/igt_command_line.sh') 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 -- cgit v1.2.3