summaryrefslogtreecommitdiffstats
path: root/src/compiler
diff options
context:
space:
mode:
authorEmil Velikov <[email protected]>2018-04-24 18:49:21 +0100
committerEmil Velikov <[email protected]>2018-06-21 12:09:39 +0100
commita2f5292c82ad07731d633b36a663e46adc181db9 (patch)
tree71957996281bde7a95ea59c7983833d1db632f67 /src/compiler
parent87cebace5411c59225e5aa5c1c844d93021e4257 (diff)
glsl/glcpp/tests: reinstate srcdir/abs_builddir blurb
Bring back the "detection" of the said variables, to allow standalone execution. Fixes: db8cd8e36771 ("glcpp/tests: Convert shell scripts to a python script") Cc: Dylan Baker <[email protected]> Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Dylan Baker <[email protected]>
Diffstat (limited to 'src/compiler')
-rwxr-xr-xsrc/compiler/glsl/glcpp/tests/glcpp-test.sh13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/compiler/glsl/glcpp/tests/glcpp-test.sh b/src/compiler/glsl/glcpp/tests/glcpp-test.sh
index 7ca8aa26a87..b8397ec8902 100755
--- a/src/compiler/glsl/glcpp/tests/glcpp-test.sh
+++ b/src/compiler/glsl/glcpp/tests/glcpp-test.sh
@@ -1,3 +1,16 @@
#!/bin/sh
+if [ -z "$srcdir" -o -z "$abs_builddir" ]; then
+ echo ""
+ echo "Warning: you're invoking the script manually and things may fail."
+ echo "Attempting to determine/set srcdir and abs_builddir variables."
+ echo ""
+
+ # Should point to `dirname Makefile.glsl.am`
+ srcdir=./../../../
+ cd `dirname "$0"`
+ # Should point to `dirname Makefile` equivalent to the above.
+ abs_builddir=`pwd`/../../../
+fi
+
$PYTHON2 $srcdir/glsl/glcpp/tests/glcpp_test.py $abs_builddir/glsl/glcpp/glcpp $srcdir/glsl/glcpp/tests --unix --windows --oldmac --bizarro