Add more structure constructor tests.
[piglit/hramrach.git] / tests / glslparsertest / external-glslparsertest.sh
blob8006688aeaed731b1d5061d4a4c8bf940bfda246
1 #!/bin/sh
3 # This is the wrapper script for using the standalone GLSL2 compiler
4 # for the glslparsertest. Drop a link named "glslcompiler" in this
5 # directory pointing at the compiler binary.
7 if test "x$2" != "xpass" -a "x$2" != "xfail"; then
8 echo "usage: external-glslparsertest.sh filename [pass|fail]"
9 exit 1;
12 result=$(./tests/glslparsertest/glslcompiler $1)
13 status=$?
15 if test "x$2" = xpass; then
16 if test "$status" = "0"; then
17 echo PIGLIT: {\'result\': \'pass\' }
18 else
19 echo "shader source:"
20 cat $1
21 echo "compiler result:"
22 echo "$result"
23 echo PIGLIT: {\'result\': \'fail\' }
25 else
26 if test "$status" != "1"; then
27 echo "shader should have failed:"
28 cat $1
29 echo PIGLIT: {\'result\': \'fail\' }
30 else
31 echo PIGLIT: {\'result\': \'pass\' }