public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
* [i-g-t] assembler: Fix bashism in run-test.sh
@ 2017-10-29  0:20 Rhys Kidd
  2017-10-29  0:39 ` ✗ Fi.CI.BAT: failure for " Patchwork
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Rhys Kidd @ 2017-10-29  0:20 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 [ ].

Noticed whilst testing meson builds. /bin/sh is apparently dash in Intel's CI.

Also change the script to #!/bin/bash to avoid having to babysit bashism later.

Fixes: c3863e19 ("assembler/test: Prep work for meson")
CC: Daniel Vetter <daniel.vetter@ffwll.ch>
CC: Petri Latvala <petri.latvala@intel.com>
Signed-off-by: Rhys Kidd <rhyskidd@gmail.com>
---
 assembler/test/run-test.sh | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/assembler/test/run-test.sh b/assembler/test/run-test.sh
index 0a5252a8..b5e245bc 100644
--- a/assembler/test/run-test.sh
+++ b/assembler/test/run-test.sh
@@ -1,11 +1,11 @@
-#!/bin/sh
+#!/bin/bash
 
 SRCDIR=${srcdir-`pwd`}
 BUILDDIR=${top_builddir-`pwd`}
 
 test="TEST"
 
-if [[ "$1" != "" ]] ; then
+if [ -n "$1" ] ; then
 	test="$1"
 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] 6+ messages in thread

end of thread, other threads:[~2017-10-30 17:59 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-10-29  0:20 [i-g-t] assembler: Fix bashism in run-test.sh Rhys Kidd
2017-10-29  0:39 ` ✗ Fi.CI.BAT: failure for " Patchwork
2017-10-30 10:51 ` [i-g-t] " Joonas Lahtinen
2017-10-30 13:09   ` [i-g-t v2] " Rhys Kidd
2017-10-30 17:59     ` Arkadiusz Hiler
2017-10-30 13:51 ` ✗ Fi.CI.BAT: failure for assembler: Fix bashism in run-test.sh (rev2) Patchwork

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