public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
* [PATCH i-g-t] igt_command_line.sh: Fix bashism
@ 2017-09-25  9:54 Petri Latvala
  2017-09-25 11:46 ` ✓ Fi.CI.BAT: success for " Patchwork
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Petri Latvala @ 2017-09-25  9:54 UTC (permalink / raw)
  To: intel-gfx; +Cc: Daniel Vetter

[[ 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.

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>
---
 tests/igt_command_line.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tests/igt_command_line.sh b/tests/igt_command_line.sh
index 57d105e9..a8baaaa1 100755
--- a/tests/igt_command_line.sh
+++ b/tests/igt_command_line.sh
@@ -112,7 +112,7 @@ if [ $? -ne 0 ]; then
 	exit 99
 fi
 
-if [[ "$1" != "" ]] ; then
+if [ -n "$1" ] ; then
 	check_test $1
 	exit 0
 fi
-- 
2.14.1

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2017-10-02  8:49 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-09-25  9:54 [PATCH i-g-t] igt_command_line.sh: Fix bashism Petri Latvala
2017-09-25 11:46 ` ✓ Fi.CI.BAT: success for " Patchwork
2017-09-25 11:48 ` [PATCH i-g-t] " Jani Nikula
2017-09-26 12:01   ` Daniel Vetter
2017-09-26 12:27     ` Petri Latvala
2017-09-29  9:34     ` Joonas Lahtinen
2017-10-02  8:49       ` Daniel Vetter
2017-09-25 15:23 ` ✗ Fi.CI.IGT: warning for " Patchwork

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox