summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIan Romanick <ian.d.romanick@intel.com>2010-06-15 12:33:24 -0700
committerIan Romanick <ian.d.romanick@intel.com>2010-06-15 12:33:24 -0700
commit93437000a97515fda34baa58bad0fade18b1965e (patch)
treeeb5ae81cc7307ff2cade953f11cdd0f64454c6d9
parent86aacb3e95b992d684ccc95eb4a1d618c4bd0d0b (diff)
Add error checking for GLSL_PARSER env var
-rwxr-xr-xtests/glslparsertest/external-glslparsertest.sh13
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/glslparsertest/external-glslparsertest.sh b/tests/glslparsertest/external-glslparsertest.sh
index eed30bbf3..20ab0ddbd 100755
--- a/tests/glslparsertest/external-glslparsertest.sh
+++ b/tests/glslparsertest/external-glslparsertest.sh
@@ -5,6 +5,19 @@ if test "x$2" != "xpass" -a "x$2" != "xfail"; then
exit 1;
fi
+if test "x$GLSL_PARSER" = x ; then
+ echo 'Set GLSL_PARSER env var to point to parser program.'
+ echo PIGLIT: {\'result\': \'fail\' }
+ exit
+fi
+
+if test ! -x $GLSL_PARSER ; then
+ echo 'Program specified by GLSL_PARSER env var does not exist or is not executable.'
+ echo PIGLIT: {\'result\': \'fail\' }
+ exit
+fi
+
+
result=$($GLSL_PARSER $1)
status=$?