[Mesa-dev] [PATCH] glsl: Use more portable bash invocation construct.

Vinson Lee vlee at freedesktop.org
Tue Nov 19 23:26:39 PST 2013


Fixes 'make check' on distros where bash is not at /bin/bash.

Signed-off-by: Vinson Lee <vlee at freedesktop.org>
---
 src/glsl/tests/lower_jumps/create_test_cases.py                         | 2 +-
 src/glsl/tests/lower_jumps/lower_breaks_1.opt_test                      | 2 +-
 src/glsl/tests/lower_jumps/lower_breaks_2.opt_test                      | 2 +-
 src/glsl/tests/lower_jumps/lower_breaks_3.opt_test                      | 2 +-
 src/glsl/tests/lower_jumps/lower_breaks_4.opt_test                      | 2 +-
 src/glsl/tests/lower_jumps/lower_breaks_5.opt_test                      | 2 +-
 src/glsl/tests/lower_jumps/lower_breaks_6.opt_test                      | 2 +-
 src/glsl/tests/lower_jumps/lower_guarded_conditional_break.opt_test     | 2 +-
 src/glsl/tests/lower_jumps/lower_pulled_out_jump.opt_test               | 2 +-
 src/glsl/tests/lower_jumps/lower_returns_1.opt_test                     | 2 +-
 src/glsl/tests/lower_jumps/lower_returns_2.opt_test                     | 2 +-
 src/glsl/tests/lower_jumps/lower_returns_3.opt_test                     | 2 +-
 src/glsl/tests/lower_jumps/lower_returns_4.opt_test                     | 2 +-
 src/glsl/tests/lower_jumps/lower_returns_main_false.opt_test            | 2 +-
 src/glsl/tests/lower_jumps/lower_returns_main_true.opt_test             | 2 +-
 src/glsl/tests/lower_jumps/lower_returns_sub_false.opt_test             | 2 +-
 src/glsl/tests/lower_jumps/lower_returns_sub_true.opt_test              | 2 +-
 src/glsl/tests/lower_jumps/lower_unified_returns.opt_test               | 2 +-
 src/glsl/tests/lower_jumps/remove_continue_at_end_of_loop.opt_test      | 2 +-
 .../lower_jumps/return_non_void_at_end_of_loop_lower_nothing.opt_test   | 2 +-
 .../lower_jumps/return_non_void_at_end_of_loop_lower_return.opt_test    | 2 +-
 .../return_non_void_at_end_of_loop_lower_return_and_break.opt_test      | 2 +-
 .../tests/lower_jumps/return_void_at_end_of_loop_lower_nothing.opt_test | 2 +-
 .../tests/lower_jumps/return_void_at_end_of_loop_lower_return.opt_test  | 2 +-
 .../return_void_at_end_of_loop_lower_return_and_break.opt_test          | 2 +-
 src/glsl/tests/optimization-test                                        | 2 +-
 26 files changed, 26 insertions(+), 26 deletions(-)

diff --git a/src/glsl/tests/lower_jumps/create_test_cases.py b/src/glsl/tests/lower_jumps/create_test_cases.py
index fbc6f0a..9974681 100644
--- a/src/glsl/tests/lower_jumps/create_test_cases.py
+++ b/src/glsl/tests/lower_jumps/create_test_cases.py
@@ -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))
diff --git a/src/glsl/tests/lower_jumps/lower_breaks_1.opt_test b/src/glsl/tests/lower_jumps/lower_breaks_1.opt_test
index 01ad708..dc9cf8f 100755
--- a/src/glsl/tests/lower_jumps/lower_breaks_1.opt_test
+++ b/src/glsl/tests/lower_jumps/lower_breaks_1.opt_test
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
 #
 # This file was generated by create_test_cases.py.
 #
diff --git a/src/glsl/tests/lower_jumps/lower_breaks_2.opt_test b/src/glsl/tests/lower_jumps/lower_breaks_2.opt_test
index 0be22f9..9b297da 100755
--- a/src/glsl/tests/lower_jumps/lower_breaks_2.opt_test
+++ b/src/glsl/tests/lower_jumps/lower_breaks_2.opt_test
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
 #
 # This file was generated by create_test_cases.py.
 #
diff --git a/src/glsl/tests/lower_jumps/lower_breaks_3.opt_test b/src/glsl/tests/lower_jumps/lower_breaks_3.opt_test
index 4149360..366e230 100755
--- a/src/glsl/tests/lower_jumps/lower_breaks_3.opt_test
+++ b/src/glsl/tests/lower_jumps/lower_breaks_3.opt_test
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
 #
 # This file was generated by create_test_cases.py.
 #
diff --git a/src/glsl/tests/lower_jumps/lower_breaks_4.opt_test b/src/glsl/tests/lower_jumps/lower_breaks_4.opt_test
index 70458bb..350ad62 100755
--- a/src/glsl/tests/lower_jumps/lower_breaks_4.opt_test
+++ b/src/glsl/tests/lower_jumps/lower_breaks_4.opt_test
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
 #
 # This file was generated by create_test_cases.py.
 #
diff --git a/src/glsl/tests/lower_jumps/lower_breaks_5.opt_test b/src/glsl/tests/lower_jumps/lower_breaks_5.opt_test
index da9eef1..72b2072 100755
--- a/src/glsl/tests/lower_jumps/lower_breaks_5.opt_test
+++ b/src/glsl/tests/lower_jumps/lower_breaks_5.opt_test
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
 #
 # This file was generated by create_test_cases.py.
 #
diff --git a/src/glsl/tests/lower_jumps/lower_breaks_6.opt_test b/src/glsl/tests/lower_jumps/lower_breaks_6.opt_test
index 9440dfe..711ab87 100755
--- a/src/glsl/tests/lower_jumps/lower_breaks_6.opt_test
+++ b/src/glsl/tests/lower_jumps/lower_breaks_6.opt_test
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
 #
 # This file was generated by create_test_cases.py.
 #
diff --git a/src/glsl/tests/lower_jumps/lower_guarded_conditional_break.opt_test b/src/glsl/tests/lower_jumps/lower_guarded_conditional_break.opt_test
index 379aa59..a633069 100755
--- a/src/glsl/tests/lower_jumps/lower_guarded_conditional_break.opt_test
+++ b/src/glsl/tests/lower_jumps/lower_guarded_conditional_break.opt_test
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
 #
 # This file was generated by create_test_cases.py.
 #
diff --git a/src/glsl/tests/lower_jumps/lower_pulled_out_jump.opt_test b/src/glsl/tests/lower_jumps/lower_pulled_out_jump.opt_test
index 15f3c41..eeae6fd 100755
--- a/src/glsl/tests/lower_jumps/lower_pulled_out_jump.opt_test
+++ b/src/glsl/tests/lower_jumps/lower_pulled_out_jump.opt_test
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
 #
 # This file was generated by create_test_cases.py.
 #
diff --git a/src/glsl/tests/lower_jumps/lower_returns_1.opt_test b/src/glsl/tests/lower_jumps/lower_returns_1.opt_test
index a1f895b..e73c512 100755
--- a/src/glsl/tests/lower_jumps/lower_returns_1.opt_test
+++ b/src/glsl/tests/lower_jumps/lower_returns_1.opt_test
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
 #
 # This file was generated by create_test_cases.py.
 #
diff --git a/src/glsl/tests/lower_jumps/lower_returns_2.opt_test b/src/glsl/tests/lower_jumps/lower_returns_2.opt_test
index 61673d4..da2dc7e 100755
--- a/src/glsl/tests/lower_jumps/lower_returns_2.opt_test
+++ b/src/glsl/tests/lower_jumps/lower_returns_2.opt_test
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
 #
 # This file was generated by create_test_cases.py.
 #
diff --git a/src/glsl/tests/lower_jumps/lower_returns_3.opt_test b/src/glsl/tests/lower_jumps/lower_returns_3.opt_test
index 9881e24..9509781 100755
--- a/src/glsl/tests/lower_jumps/lower_returns_3.opt_test
+++ b/src/glsl/tests/lower_jumps/lower_returns_3.opt_test
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
 #
 # This file was generated by create_test_cases.py.
 #
diff --git a/src/glsl/tests/lower_jumps/lower_returns_4.opt_test b/src/glsl/tests/lower_jumps/lower_returns_4.opt_test
index 9f54c67..c5bb9c8 100755
--- a/src/glsl/tests/lower_jumps/lower_returns_4.opt_test
+++ b/src/glsl/tests/lower_jumps/lower_returns_4.opt_test
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
 #
 # This file was generated by create_test_cases.py.
 #
diff --git a/src/glsl/tests/lower_jumps/lower_returns_main_false.opt_test b/src/glsl/tests/lower_jumps/lower_returns_main_false.opt_test
index 5f97bfd..fdb1d0e 100755
--- a/src/glsl/tests/lower_jumps/lower_returns_main_false.opt_test
+++ b/src/glsl/tests/lower_jumps/lower_returns_main_false.opt_test
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
 #
 # This file was generated by create_test_cases.py.
 #
diff --git a/src/glsl/tests/lower_jumps/lower_returns_main_true.opt_test b/src/glsl/tests/lower_jumps/lower_returns_main_true.opt_test
index 59c7ba1..939ec8b 100755
--- a/src/glsl/tests/lower_jumps/lower_returns_main_true.opt_test
+++ b/src/glsl/tests/lower_jumps/lower_returns_main_true.opt_test
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
 #
 # This file was generated by create_test_cases.py.
 #
diff --git a/src/glsl/tests/lower_jumps/lower_returns_sub_false.opt_test b/src/glsl/tests/lower_jumps/lower_returns_sub_false.opt_test
index 40e784e..92a4e8a 100755
--- a/src/glsl/tests/lower_jumps/lower_returns_sub_false.opt_test
+++ b/src/glsl/tests/lower_jumps/lower_returns_sub_false.opt_test
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
 #
 # This file was generated by create_test_cases.py.
 #
diff --git a/src/glsl/tests/lower_jumps/lower_returns_sub_true.opt_test b/src/glsl/tests/lower_jumps/lower_returns_sub_true.opt_test
index 9fe6b90..789414e 100755
--- a/src/glsl/tests/lower_jumps/lower_returns_sub_true.opt_test
+++ b/src/glsl/tests/lower_jumps/lower_returns_sub_true.opt_test
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
 #
 # This file was generated by create_test_cases.py.
 #
diff --git a/src/glsl/tests/lower_jumps/lower_unified_returns.opt_test b/src/glsl/tests/lower_jumps/lower_unified_returns.opt_test
index e716813..5d6e51c 100755
--- a/src/glsl/tests/lower_jumps/lower_unified_returns.opt_test
+++ b/src/glsl/tests/lower_jumps/lower_unified_returns.opt_test
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
 #
 # This file was generated by create_test_cases.py.
 #
diff --git a/src/glsl/tests/lower_jumps/remove_continue_at_end_of_loop.opt_test b/src/glsl/tests/lower_jumps/remove_continue_at_end_of_loop.opt_test
index 18efc37..ceb010c 100755
--- a/src/glsl/tests/lower_jumps/remove_continue_at_end_of_loop.opt_test
+++ b/src/glsl/tests/lower_jumps/remove_continue_at_end_of_loop.opt_test
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
 #
 # This file was generated by create_test_cases.py.
 #
diff --git a/src/glsl/tests/lower_jumps/return_non_void_at_end_of_loop_lower_nothing.opt_test b/src/glsl/tests/lower_jumps/return_non_void_at_end_of_loop_lower_nothing.opt_test
index 79c0e82..a93167b 100755
--- a/src/glsl/tests/lower_jumps/return_non_void_at_end_of_loop_lower_nothing.opt_test
+++ b/src/glsl/tests/lower_jumps/return_non_void_at_end_of_loop_lower_nothing.opt_test
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
 #
 # This file was generated by create_test_cases.py.
 #
diff --git a/src/glsl/tests/lower_jumps/return_non_void_at_end_of_loop_lower_return.opt_test b/src/glsl/tests/lower_jumps/return_non_void_at_end_of_loop_lower_return.opt_test
index 920d2ad..9ce33f0 100755
--- a/src/glsl/tests/lower_jumps/return_non_void_at_end_of_loop_lower_return.opt_test
+++ b/src/glsl/tests/lower_jumps/return_non_void_at_end_of_loop_lower_return.opt_test
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
 #
 # This file was generated by create_test_cases.py.
 #
diff --git a/src/glsl/tests/lower_jumps/return_non_void_at_end_of_loop_lower_return_and_break.opt_test b/src/glsl/tests/lower_jumps/return_non_void_at_end_of_loop_lower_return_and_break.opt_test
index 99f1f86..06988c2 100755
--- a/src/glsl/tests/lower_jumps/return_non_void_at_end_of_loop_lower_return_and_break.opt_test
+++ b/src/glsl/tests/lower_jumps/return_non_void_at_end_of_loop_lower_return_and_break.opt_test
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
 #
 # This file was generated by create_test_cases.py.
 #
diff --git a/src/glsl/tests/lower_jumps/return_void_at_end_of_loop_lower_nothing.opt_test b/src/glsl/tests/lower_jumps/return_void_at_end_of_loop_lower_nothing.opt_test
index 63487d3..45699a8 100755
--- a/src/glsl/tests/lower_jumps/return_void_at_end_of_loop_lower_nothing.opt_test
+++ b/src/glsl/tests/lower_jumps/return_void_at_end_of_loop_lower_nothing.opt_test
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
 #
 # This file was generated by create_test_cases.py.
 #
diff --git a/src/glsl/tests/lower_jumps/return_void_at_end_of_loop_lower_return.opt_test b/src/glsl/tests/lower_jumps/return_void_at_end_of_loop_lower_return.opt_test
index 523c92a..abfa582 100755
--- a/src/glsl/tests/lower_jumps/return_void_at_end_of_loop_lower_return.opt_test
+++ b/src/glsl/tests/lower_jumps/return_void_at_end_of_loop_lower_return.opt_test
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
 #
 # This file was generated by create_test_cases.py.
 #
diff --git a/src/glsl/tests/lower_jumps/return_void_at_end_of_loop_lower_return_and_break.opt_test b/src/glsl/tests/lower_jumps/return_void_at_end_of_loop_lower_return_and_break.opt_test
index 22b5581..a8c5e37 100755
--- a/src/glsl/tests/lower_jumps/return_void_at_end_of_loop_lower_return_and_break.opt_test
+++ b/src/glsl/tests/lower_jumps/return_void_at_end_of_loop_lower_return_and_break.opt_test
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
 #
 # This file was generated by create_test_cases.py.
 #
diff --git a/src/glsl/tests/optimization-test b/src/glsl/tests/optimization-test
index 59383f8..8ca7776 100755
--- a/src/glsl/tests/optimization-test
+++ b/src/glsl/tests/optimization-test
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
 
 if [ ! -z "$srcdir" ]; then
    compare_ir=`pwd`/tests/compare_ir
-- 
1.8.3.1



More information about the mesa-dev mailing list