diff options
author | Milosz Wasilewski <milosz.wasilewski@linaro.org> | 2014-05-30 14:25:39 +0100 |
---|---|---|
committer | Fathi Boudra <fathi.boudra@linaro.org> | 2014-06-04 05:54:11 +0000 |
commit | dd8925815ae7cc0640aaafc1516eb8e697855cc9 (patch) | |
tree | 33a71ec50f165599bac5e8f11464505668ac843b /android/scripts | |
parent | 29205751920972b872d14ec1e39c48e11211757e (diff) |
Android: added piglit test definitions
Piglit needs to be available in the Android build that the tests run on.
Change-Id: I8aab1fda205a69885698d8ffd92166a386cde199
Signed-off-by: Milosz Wasilewski <milosz.wasilewski@linaro.org>
Diffstat (limited to 'android/scripts')
-rwxr-xr-x | android/scripts/piglit-run-glslparser.sh | 34 | ||||
-rwxr-xr-x | android/scripts/piglit-run-shader.sh | 23 | ||||
-rwxr-xr-x | android/scripts/piglit-run-test.sh | 17 |
3 files changed, 74 insertions, 0 deletions
diff --git a/android/scripts/piglit-run-glslparser.sh b/android/scripts/piglit-run-glslparser.sh new file mode 100755 index 0000000..1cd7494 --- /dev/null +++ b/android/scripts/piglit-run-glslparser.sh @@ -0,0 +1,34 @@ +#!/system/bin/sh + +# find and loop over the vert and frag tests found +# looks recursively down the directory tree + +find ${2} -name "*.frag" -or -name "*.vert" -print0 | while read -d $'\0' file +do + RESULTFOUND=$(grep expect_result ${file} ) + case $RESULTFOUND in + *fail*) RESULTEXPECTED="fail";; + + *pass*) RESULTEXPECTED="pass";; + + *) RESULTEXPECTED="pass";; + esac + + RESULT=$( ${1} ${file} $RESULTEXPECTED 1.00 -auto ) + + PSTRING="PIGLIT: {'result': 'pass'" + SSTRING="PIGLIT: {'result': 'skip'" + FSTRING="PIGLIT: {'result': 'fail'" + + case $RESULT in + *"$PSTRING"*) + echo "glslparser ${file}: pass";; + + *"$SSTRING"*) echo "glslparser ${file}: skip";; + + *"$FSTRING"*) + echo "glslparser ${file}: fail";; + + *) echo "glslparser ${file}: fail";; + esac +done diff --git a/android/scripts/piglit-run-shader.sh b/android/scripts/piglit-run-shader.sh new file mode 100755 index 0000000..3688157 --- /dev/null +++ b/android/scripts/piglit-run-shader.sh @@ -0,0 +1,23 @@ +#!/system/bin/sh + +# find and loop over the shader tests found +# recursively in the named directory + +find ${2} -name *.shader_test -print0 | while read -d $'\0' file +do + RESULT=$( ${1} ${file} -auto ) + + PSTRING="PIGLIT: {'result': 'pass'" + SSTRING="PIGLIT: {'result': 'skip'" + FSTRING="PIGLIT: {'result': 'fail'" + + case $RESULT in + *"$PSTRING"*) echo "${file}: pass";; + + *"$SSTRING"*) echo "${file}: skip";; + + *"$FSTRING"*) echo "${file}: fail";; + + *) echo "${file}: fail";; + esac +done diff --git a/android/scripts/piglit-run-test.sh b/android/scripts/piglit-run-test.sh new file mode 100755 index 0000000..61b39ce --- /dev/null +++ b/android/scripts/piglit-run-test.sh @@ -0,0 +1,17 @@ +#!/system/bin/sh + +RESULT=$( ${1} -auto ) + +PSTRING="PIGLIT: {'result': 'pass'" +SSTRING="PIGLIT: {'result': 'skip'" +FSTRING="PIGLIT: {'result': 'fail'" + +case $RESULT in + *"$PSTRING"*) echo "${1}: pass";; + + *"$SSTRING"*) echo "${1}: skip";; + + *"$FSTRING"*) echo "${1}: fail";; + + *) echo "${1}: fail";; +esac |