public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
From: Rhys Kidd <rhyskidd@gmail.com>
To: intel-gfx@lists.freedesktop.org
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Subject: [i-g-t v2] assembler: Fix bashism in run-test.sh
Date: Mon, 30 Oct 2017 09:09:41 -0400	[thread overview]
Message-ID: <20171030130941.24538-1-rhyskidd@gmail.com> (raw)
In-Reply-To: <1509360665.4757.0.camel@linux.intel.com>

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

v2:
 - keep this as a /bin/sh script (Joonas Lahtinen)

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

diff --git a/assembler/test/run-test.sh b/assembler/test/run-test.sh
index 0a5252a8..b06e1044 100644
--- a/assembler/test/run-test.sh
+++ b/assembler/test/run-test.sh
@@ -5,7 +5,7 @@ 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

  reply	other threads:[~2017-10-30 13:09 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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   ` Rhys Kidd [this message]
2017-10-30 17:59     ` [i-g-t v2] " Arkadiusz Hiler
2017-10-30 13:51 ` ✗ Fi.CI.BAT: failure for assembler: Fix bashism in run-test.sh (rev2) Patchwork

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20171030130941.24538-1-rhyskidd@gmail.com \
    --to=rhyskidd@gmail.com \
    --cc=daniel.vetter@ffwll.ch \
    --cc=intel-gfx@lists.freedesktop.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox