glsl: Use more portable bash invocation construct.
authorVinson Lee <vlee@freedesktop.org>
Sat, 12 Oct 2013 01:33:08 +0000 (18:33 -0700)
committerVinson Lee <vlee@freedesktop.org>
Thu, 21 Nov 2013 06:39:59 +0000 (22:39 -0800)
Fixes 'make check' on distros where bash is not at /bin/bash.

Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Tested-by: Ian Romanick <ian.d.romanick@intel.com>
26 files changed:
src/glsl/tests/lower_jumps/create_test_cases.py
src/glsl/tests/lower_jumps/lower_breaks_1.opt_test
src/glsl/tests/lower_jumps/lower_breaks_2.opt_test
src/glsl/tests/lower_jumps/lower_breaks_3.opt_test
src/glsl/tests/lower_jumps/lower_breaks_4.opt_test
src/glsl/tests/lower_jumps/lower_breaks_5.opt_test
src/glsl/tests/lower_jumps/lower_breaks_6.opt_test
src/glsl/tests/lower_jumps/lower_guarded_conditional_break.opt_test
src/glsl/tests/lower_jumps/lower_pulled_out_jump.opt_test
src/glsl/tests/lower_jumps/lower_returns_1.opt_test
src/glsl/tests/lower_jumps/lower_returns_2.opt_test
src/glsl/tests/lower_jumps/lower_returns_3.opt_test
src/glsl/tests/lower_jumps/lower_returns_4.opt_test
src/glsl/tests/lower_jumps/lower_returns_main_false.opt_test
src/glsl/tests/lower_jumps/lower_returns_main_true.opt_test
src/glsl/tests/lower_jumps/lower_returns_sub_false.opt_test
src/glsl/tests/lower_jumps/lower_returns_sub_true.opt_test
src/glsl/tests/lower_jumps/lower_unified_returns.opt_test
src/glsl/tests/lower_jumps/remove_continue_at_end_of_loop.opt_test
src/glsl/tests/lower_jumps/return_non_void_at_end_of_loop_lower_nothing.opt_test
src/glsl/tests/lower_jumps/return_non_void_at_end_of_loop_lower_return.opt_test
src/glsl/tests/lower_jumps/return_non_void_at_end_of_loop_lower_return_and_break.opt_test
src/glsl/tests/lower_jumps/return_void_at_end_of_loop_lower_nothing.opt_test
src/glsl/tests/lower_jumps/return_void_at_end_of_loop_lower_return.opt_test
src/glsl/tests/lower_jumps/return_void_at_end_of_loop_lower_return_and_break.opt_test
src/glsl/tests/optimization-test

index fbc6f0a84ea32489a32b098a8cfdea767367dacc..9974681e02f96b56ef282b5e216427bf94acd705 100644 (file)
@@ -291,7 +291,7 @@ def create_test_case(doc_string, input_sexp, expected_sexp, test_name,
     args = ['../../glsl_test', 'optpass', '--quiet', '--input-ir', optimization]
     test_file = '{0}.opt_test'.format(test_name)
     with open(test_file, 'w') as f:
-        f.write('#!/bin/bash\n#\n# This file was generated by create_test_cases.py.\n#\n')
+        f.write('#!/usr/bin/env bash\n#\n# This file was generated by create_test_cases.py.\n#\n')
         f.write(doc_string)
         f.write('{0} <<EOF\n'.format(bash_quote(*args)))
         f.write('{0}\nEOF\n'.format(input_str))
index 01ad7087a28b2eef56d399e51dc23a669654eba5..dc9cf8f1a60fd10d8ff0e6db47f71defebadd7e4 100755 (executable)
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
 #
 # This file was generated by create_test_cases.py.
 #
index 0be22f953e1b2632e48e4461f5f2783cd6ef9294..9b297daf14eeaf4dbed7c8febc9f5687ba4ee6de 100755 (executable)
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
 #
 # This file was generated by create_test_cases.py.
 #
index 4149360b5d03e966ebc4533d57ef70b171991388..366e23093a794068e42f8a080de419f3f06a3e0a 100755 (executable)
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
 #
 # This file was generated by create_test_cases.py.
 #
index 70458bb4f8e098b9998a77c2aa5a69da837b4043..350ad628fb39ec93849cf810a2541345dcd882b7 100755 (executable)
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
 #
 # This file was generated by create_test_cases.py.
 #
index da9eef1105e1d48cbadd218313414499d58caf14..72b207205723c832ab60dbb3e0311b17e7e80fcd 100755 (executable)
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
 #
 # This file was generated by create_test_cases.py.
 #
index 9440dfec89727bb35f14973e2f223ebfd7e65fb4..711ab87218d88472698861cd1938336469bd8c1c 100755 (executable)
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
 #
 # This file was generated by create_test_cases.py.
 #
index 379aa59b5a2294f1f270536acb5425553178e7cf..a63306931ca4b26fe2c1642ad02fbeb4a1421215 100755 (executable)
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
 #
 # This file was generated by create_test_cases.py.
 #
index 15f3c41d5a2462716f4cbc02aee013afbedc6837..eeae6fd6f9eb720af7b3948abd3d7bec378c67c2 100755 (executable)
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
 #
 # This file was generated by create_test_cases.py.
 #
index a1f895bbf780645160882f3fe71674e8bd764696..e73c51208ad4c31a9d3e558c89071115a0bf1f3f 100755 (executable)
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
 #
 # This file was generated by create_test_cases.py.
 #
index 61673d4ef66c038f886e9fdd8e844c08cd29eb0a..da2dc7ee299e5c3f0d2fbdb73b7830c88ae45d2b 100755 (executable)
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
 #
 # This file was generated by create_test_cases.py.
 #
index 9881e249270ce428c50e5928a99107738318f0e8..9509781fe859ddca2f45e179578e6f578e49f6d9 100755 (executable)
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
 #
 # This file was generated by create_test_cases.py.
 #
index 9f54c67a180dd704988ec9732aa9f035a5eccf12..c5bb9c898473168dc66b0e33207c8c620ae6b4b9 100755 (executable)
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
 #
 # This file was generated by create_test_cases.py.
 #
index 5f97bfd3f5acd0838c4c62b7dc0fdf009697f152..fdb1d0ed28b0bb87c6710c7a52c3f4fc30911dda 100755 (executable)
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
 #
 # This file was generated by create_test_cases.py.
 #
index 59c7ba1dd52d2a4ce019d73a9d796bb99c60d0ff..939ec8b0e4ef4061d0b74d3e05ac26ed02ce45b0 100755 (executable)
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
 #
 # This file was generated by create_test_cases.py.
 #
index 40e784e3318626952ff21c11017cd1a2912c7384..92a4e8a62977d3ef4be2e971a0dac77680cca5fd 100755 (executable)
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
 #
 # This file was generated by create_test_cases.py.
 #
index 9fe6b90f0852fd33c7a2a4dbe72dae7012944466..789414ecbc7eafe43a87bcd9eaca1f8bee39a8a6 100755 (executable)
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
 #
 # This file was generated by create_test_cases.py.
 #
index e71681314873f405303a9c086231c2789baefd16..5d6e51cff9b8182fb11da54232829c7f61c9486a 100755 (executable)
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
 #
 # This file was generated by create_test_cases.py.
 #
index 18efc37f6e11f6c4ee07e5f7c2ab71334db25d2f..ceb010c7c658f15ed3bc42294e15b0dde73930c7 100755 (executable)
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
 #
 # This file was generated by create_test_cases.py.
 #
index 79c0e8245125980a8ee1d7209ce03e4923a786fd..a93167b645c5e80b0010a0719d26c704d529e5e1 100755 (executable)
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
 #
 # This file was generated by create_test_cases.py.
 #
index 920d2ad9fba9bff6391c20aab14732ff74d2ca85..9ce33f0ac2e3a1ebba2ff4c5c4448a5cc3768ef3 100755 (executable)
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
 #
 # This file was generated by create_test_cases.py.
 #
index 99f1f863506f712fcaf88cf91aa6e32914616ce5..06988c2957112a2145c93c71b5e96b967fe2bb40 100755 (executable)
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
 #
 # This file was generated by create_test_cases.py.
 #
index 63487d326913d5c5d5f5a636768bb9c71995cd93..45699a897e4fa7b6b3c6d087b444b54d86d2cae0 100755 (executable)
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
 #
 # This file was generated by create_test_cases.py.
 #
index 523c92a686dd483f7aa171c0dd13cac28fbe1892..abfa582c2914029c92a2aa4cd5b5d5ca27a75750 100755 (executable)
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
 #
 # This file was generated by create_test_cases.py.
 #
index 22b5581cbda595a7e80d5d41bdcf903addd0596f..a8c5e379136109bb828aededc1b3353342281115 100755 (executable)
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
 #
 # This file was generated by create_test_cases.py.
 #
index 59383f8f912e3d95611a25626f38017ccdf36c61..8ca7776919f43b634a6273ca9b67edf9dcd324c1 100755 (executable)
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
 
 if [ ! -z "$srcdir" ]; then
    compare_ir=`pwd`/tests/compare_ir