[Mlir-commits] [mlir] bb8c875 - [MLIR] prefer /bin/sh over /bin/bash for simple test scripts

Will Dietz llvmlistbot at llvm.org
Thu Apr 21 18:25:24 PDT 2022


Author: Will Dietz
Date: 2022-04-21T20:25:17-05:00
New Revision: bb8c8751cf6b1e40e2437b70ef2063808e2b3998

URL: https://github.com/llvm/llvm-project/commit/bb8c8751cf6b1e40e2437b70ef2063808e2b3998
DIFF: https://github.com/llvm/llvm-project/commit/bb8c8751cf6b1e40e2437b70ef2063808e2b3998.diff

LOG: [MLIR] prefer /bin/sh over /bin/bash for simple test scripts

These scripts do not appear to require bash, and while /bin/sh
is not guaranteed either it's more commonly available.

Fixes tests on NixOS and in certain sandbox build environments.

Reviewed By: mehdi_amini

Differential Revision: https://reviews.llvm.org/D124205

Added: 
    

Modified: 
    mlir/test/mlir-reduce/failure-test.sh
    mlir/test/mlir-reduce/test.sh

Removed: 
    


################################################################################
diff  --git a/mlir/test/mlir-reduce/failure-test.sh b/mlir/test/mlir-reduce/failure-test.sh
index 6a07743d959cf..f5ddfb8fe9de4 100755
--- a/mlir/test/mlir-reduce/failure-test.sh
+++ b/mlir/test/mlir-reduce/failure-test.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/bin/sh
 # Tests for the keyword "failure" in the stderr of the optimization pass
 mlir-opt $1 -test-mlir-reducer > /tmp/stdout.$$ 2>/tmp/stderr.$$
 

diff  --git a/mlir/test/mlir-reduce/test.sh b/mlir/test/mlir-reduce/test.sh
index 33d02f41a95e5..a21bf96f0fe7d 100755
--- a/mlir/test/mlir-reduce/test.sh
+++ b/mlir/test/mlir-reduce/test.sh
@@ -1,6 +1,6 @@
-#!/bin/bash
+#!/bin/sh
 
 #Replicate bug
 
 #Interesting behavior
-exit 1
\ No newline at end of file
+exit 1


        


More information about the Mlir-commits mailing list