...
 
Commits (8)
...@@ -378,7 +378,7 @@ add_plain_test(texturing, 'depth-tex-compare') ...@@ -378,7 +378,7 @@ add_plain_test(texturing, 'depth-tex-compare')
glslparsertest = Group() glslparsertest = Group()
def add_glslparsertest(shader, result): def add_glslparsertest(shader, result):
glslparsertest[shader] = PlainExecTest(['glslparsertest', 'tests/glslparsertest/shaders/' + shader, result]) glslparsertest[shader] = PlainExecTest(['../tests/glslparsertest/external-glslparsertest.sh', 'tests/glslparsertest/shaders/' + shader, result])
add_glslparsertest('CorrectBuiltInOveride.frag', 'pass') add_glslparsertest('CorrectBuiltInOveride.frag', 'pass')
add_glslparsertest('CorrectComma.frag', 'pass') add_glslparsertest('CorrectComma.frag', 'pass')
...@@ -568,7 +568,7 @@ add_glslparsertest('while2.frag', 'fail') ...@@ -568,7 +568,7 @@ add_glslparsertest('while2.frag', 'fail')
add_glslparsertest('TernaryOp.frag', 'fail') add_glslparsertest('TernaryOp.frag', 'fail')
def add_otherglslparsertest(shader, result): def add_otherglslparsertest(shader, result):
glslparsertest[shader] = PlainExecTest(['glslparsertest', 'tests/glslparsertest/' + shader, result]) glslparsertest[shader] = PlainExecTest(['../tests/glslparsertest/external-glslparsertest.sh', 'tests/glslparsertest/' + shader, result])
add_otherglslparsertest('glsl2/array-01.vert', 'fail') add_otherglslparsertest('glsl2/array-01.vert', 'fail')
add_otherglslparsertest('glsl2/array-02.vert', 'fail') add_otherglslparsertest('glsl2/array-02.vert', 'fail')
add_otherglslparsertest('glsl2/array-03.vert', 'pass') add_otherglslparsertest('glsl2/array-03.vert', 'pass')
...@@ -726,6 +726,37 @@ add_otherglslparsertest('glsl2/xreal-lighting-dbs-omni.vert', 'pass') ...@@ -726,6 +726,37 @@ add_otherglslparsertest('glsl2/xreal-lighting-dbs-omni.vert', 'pass')
add_otherglslparsertest('glsl2/xreal-lighting-d-omni.frag', 'pass') add_otherglslparsertest('glsl2/xreal-lighting-d-omni.frag', 'pass')
add_otherglslparsertest('glsl2/xreal-lighting-d-omni.vert', 'pass') add_otherglslparsertest('glsl2/xreal-lighting-d-omni.vert', 'pass')
def add_otherglslparsertest(shader, result):
glslparsertest[shader] = PlainExecTest(['../tests/glslparsertest/external-glslparsertest.sh', 'tests/' + shader, result])
add_otherglslparsertest('shaders/glsl-arb-fragment-coord-conventions-define.frag', 'pass')
add_otherglslparsertest('shaders/glsl-color.frag', 'pass')
add_otherglslparsertest('shaders/glsl-fs-bug25902.frag', 'pass')
add_otherglslparsertest('shaders/glsl-fs-exp2.frag', 'pass')
add_otherglslparsertest('shaders/glsl-fs-fragcoord.frag', 'pass')
add_otherglslparsertest('shaders/glsl-fs-log2.frag', 'pass')
add_otherglslparsertest('shaders/glsl-fs-loop.frag', 'pass')
add_otherglslparsertest('shaders/glsl-fs-loop-nested.frag', 'pass')
add_otherglslparsertest('shaders/glsl-fs-mix-constant.frag', 'pass')
add_otherglslparsertest('shaders/glsl-fs-mix.frag', 'pass')
add_otherglslparsertest('shaders/glsl-fs-sqrt-branch.frag', 'pass')
add_otherglslparsertest('shaders/glsl-fs-sqrt-zero.frag', 'pass')
add_otherglslparsertest('shaders/glsl-mvp.vert', 'pass')
add_otherglslparsertest('shaders/glsl-orangebook-ch06-bump.frag', 'pass')
add_otherglslparsertest('shaders/glsl-orangebook-ch06-bump.vert', 'pass')
add_otherglslparsertest('shaders/glsl-preprocessor-comments.frag', 'pass')
add_otherglslparsertest('shaders/glsl-preprocessor-comments.vert', 'pass')
add_otherglslparsertest('shaders/glsl-tex-mvp.vert', 'pass')
add_otherglslparsertest('shaders/glsl-uniform-update.frag', 'pass')
add_otherglslparsertest('shaders/glsl-unused-varying.frag', 'pass')
add_otherglslparsertest('shaders/glsl-unused-varying.vert', 'pass')
add_otherglslparsertest('shaders/glsl-vs-arrays.vert', 'pass')
add_otherglslparsertest('shaders/glsl-vs-functions.vert', 'pass')
add_otherglslparsertest('shaders/glsl-vs-if-bool.vert', 'pass')
add_otherglslparsertest('shaders/glsl-vs-loop-nested.vert', 'pass')
add_otherglslparsertest('shaders/glsl-vs-loop.vert', 'pass')
add_otherglslparsertest('shaders/glsl-vs-mov-after-deref.vert', 'pass')
add_otherglslparsertest('shaders/glsl-vs-sqrt-zero.vert', 'pass')
asmparsertest = Group() asmparsertest = Group()
def add_asmparsertest(group, shader): def add_asmparsertest(group, shader):
asmparsertest[group + '/' + shader] = PlainExecTest(['asmparsertest', '-auto', group, 'tests/asmparsertest/shaders/' + group + '/' + shader]) asmparsertest[group + '/' + shader] = PlainExecTest(['asmparsertest', '-auto', group, 'tests/asmparsertest/shaders/' + group + '/' + shader])
......
#!/bin/sh
if test "x$2" != "xpass" -a "x$2" != "xfail"; then
echo "usage: external-glslparsertest.sh filename [pass|fail]"
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=$?
if test "x$2" = xpass; then
if test "$status" = "0"; then
echo PIGLIT: {\'result\': \'pass\' }
else
echo "shader source:"
cat $1
echo "compiler result:"
echo "$result"
echo PIGLIT: {\'result\': \'fail\' }
fi
else
if test "$status" = "0" -o "$status" = 139; then
echo "shader should have failed:"
cat $1
echo PIGLIT: {\'result\': \'fail\' }
else
echo PIGLIT: {\'result\': \'pass\' }
fi
fi