[Mesa-dev] [PATCH 04/37] glsl/tests: suffix .sh/.py files as applicable

Emil Velikov emil.l.velikov at gmail.com
Thu Feb 23 17:13:31 UTC 2017


From: Emil Velikov <emil.velikov at collabora.com>

This makes it easier/clearer as to:
 - if the file should have the execute bit set (.py should not)
 - do we need the shebang in the first place and if so what it should be

Signed-off-by: Emil Velikov <emil.velikov at collabora.com>
---
This is going to clash with my earlier fixes in the area.
---
 src/compiler/Makefile.glsl.am                                     | 8 ++++----
 .../glsl/glcpp/tests/{glcpp-test-cr-lf => glcpp-test-cr-lf.sh}    | 4 ++--
 src/compiler/glsl/glcpp/tests/{glcpp-test => glcpp-test.sh}       | 0
 src/compiler/glsl/tests/{compare_ir => compare_ir.py}             | 2 +-
 .../glsl/tests/{optimization-test => optimization-test.sh}        | 4 ++--
 src/compiler/glsl/tests/{warnings-test => warnings-test.sh}       | 0
 6 files changed, 9 insertions(+), 9 deletions(-)
 rename src/compiler/glsl/glcpp/tests/{glcpp-test-cr-lf => glcpp-test-cr-lf.sh} (97%)
 rename src/compiler/glsl/glcpp/tests/{glcpp-test => glcpp-test.sh} (100%)
 rename src/compiler/glsl/tests/{compare_ir => compare_ir.py} (97%)
 rename src/compiler/glsl/tests/{optimization-test => optimization-test.sh} (92%)
 rename src/compiler/glsl/tests/{warnings-test => warnings-test.sh} (100%)

diff --git a/src/compiler/Makefile.glsl.am b/src/compiler/Makefile.glsl.am
index 41edb3cf4d..f7be5ebce9 100644
--- a/src/compiler/Makefile.glsl.am
+++ b/src/compiler/Makefile.glsl.am
@@ -30,15 +30,15 @@ EXTRA_DIST += glsl/tests glsl/glcpp/tests glsl/README	\
 	glsl/glcpp/glcpp-parse.y			\
 	SConscript.glsl
 
-TESTS += glsl/glcpp/tests/glcpp-test			\
-	glsl/glcpp/tests/glcpp-test-cr-lf		\
+TESTS += glsl/glcpp/tests/glcpp-test.sh			\
+	glsl/glcpp/tests/glcpp-test-cr-lf.sh		\
 	glsl/tests/blob-test				\
 	glsl/tests/cache-test				\
 	glsl/tests/general-ir-test			\
-	glsl/tests/optimization-test			\
+	glsl/tests/optimization-test.sh			\
 	glsl/tests/sampler-types-test			\
 	glsl/tests/uniform-initializer-test             \
-	glsl/tests/warnings-test
+	glsl/tests/warnings-test.sh
 
 TESTS_ENVIRONMENT= \
 	export PYTHON2=$(PYTHON2); \
diff --git a/src/compiler/glsl/glcpp/tests/glcpp-test-cr-lf b/src/compiler/glsl/glcpp/tests/glcpp-test-cr-lf.sh
similarity index 97%
rename from src/compiler/glsl/glcpp/tests/glcpp-test-cr-lf
rename to src/compiler/glsl/glcpp/tests/glcpp-test-cr-lf.sh
index c75370f48c..c0ed9e04bc 100755
--- a/src/compiler/glsl/glcpp/tests/glcpp-test-cr-lf
+++ b/src/compiler/glsl/glcpp/tests/glcpp-test-cr-lf.sh
@@ -7,10 +7,10 @@
 
 if [ ! -z "$srcdir" ]; then
    testdir="$srcdir/glsl/glcpp/tests"
-   glcpp_test="$srcdir/glsl/glcpp/tests/glcpp-test"
+   glcpp_test="$srcdir/glsl/glcpp/tests/glcpp-test.sh"
 else
    testdir=.
-   glcpp_test=./glcpp-test
+   glcpp_test=./glcpp-test.sh
 fi
 
 total=0
diff --git a/src/compiler/glsl/glcpp/tests/glcpp-test b/src/compiler/glsl/glcpp/tests/glcpp-test.sh
similarity index 100%
rename from src/compiler/glsl/glcpp/tests/glcpp-test
rename to src/compiler/glsl/glcpp/tests/glcpp-test.sh
diff --git a/src/compiler/glsl/tests/compare_ir b/src/compiler/glsl/tests/compare_ir.py
similarity index 97%
rename from src/compiler/glsl/tests/compare_ir
rename to src/compiler/glsl/tests/compare_ir.py
index a40fc810cf..53207dd2cc 100755
--- a/src/compiler/glsl/tests/compare_ir
+++ b/src/compiler/glsl/tests/compare_ir.py
@@ -34,7 +34,7 @@ import tempfile
 from sexps import *
 
 if len(sys.argv) != 3:
-    print 'Usage: compare_ir <file1> <file2>'
+    print 'Usage: python2 ./compare_ir.py <file1> <file2>'
     exit(1)
 
 with open(sys.argv[1]) as f:
diff --git a/src/compiler/glsl/tests/optimization-test b/src/compiler/glsl/tests/optimization-test.sh
similarity index 92%
rename from src/compiler/glsl/tests/optimization-test
rename to src/compiler/glsl/tests/optimization-test.sh
index 26a51be698..9cc3cae3a3 100755
--- a/src/compiler/glsl/tests/optimization-test
+++ b/src/compiler/glsl/tests/optimization-test.sh
@@ -1,9 +1,9 @@
 #!/usr/bin/env bash
 
 if [ ! -z "$srcdir" ]; then
-   compare_ir=`pwd`/tests/compare_ir
+   compare_ir=`pwd`/tests/compare_ir.py
 else
-   compare_ir=./compare_ir
+   compare_ir=./compare_ir.py
 fi
 
 total=0
diff --git a/src/compiler/glsl/tests/warnings-test b/src/compiler/glsl/tests/warnings-test.sh
similarity index 100%
rename from src/compiler/glsl/tests/warnings-test
rename to src/compiler/glsl/tests/warnings-test.sh
-- 
2.11.0



More information about the mesa-dev mailing list