summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Gall <tom.gall@linaro.org>2013-02-22 13:10:56 -0600
committerTom Gall <tom.gall@linaro.org>2013-02-22 13:10:56 -0600
commit25f59b687bc407cba9db951010ed54e2fe53aee0 (patch)
treec545c60047c5fc740c9222e6d6c2f6966c845292
parent1a4e370e92b711154089118daff99b6547247eaf (diff)
add yaml for glslparser tests
add script for running family of glslparser tests
-rw-r--r--android/glslparser_gles2.yaml26
-rwxr-xr-xandroid/scripts/piglit-run-glslparser.sh45
2 files changed, 71 insertions, 0 deletions
diff --git a/android/glslparser_gles2.yaml b/android/glslparser_gles2.yaml
new file mode 100644
index 0000000..cd4b202
--- /dev/null
+++ b/android/glslparser_gles2.yaml
@@ -0,0 +1,26 @@
+metadata:
+ name: glslparser_gles2
+ version: 1.0
+ format: "Lava-Test-Shell Test Definition 1.0"
+
+install:
+ git-repos:
+ - git://git.linaro.org/people/tomgall/test-definitions.git
+
+run:
+ steps:
+ - "export PIGLIT_PLATFORM=android"
+ - "START_DIR=$(pwd)"
+ - "echo $START_DIR"
+ - "cd test-definitions/android/scripts"
+ - "./homescreen.sh"
+ - "cd $START_DIR"
+ - "cd test-definitions/android/scripts"
+ - "./piglit-run-glslparser.sh /system/xbin/piglit/piglit-shader-test/glslparsertest_gles2 /data/glslparser-data"
+
+parse:
+ pattern: "(?P<test_case_id>.*-*):\\s+(?P<result>(pass|fail))"
+ fixupdict:
+ PASS: pass
+ FAIL: fail
+ SKIP: skip
diff --git a/android/scripts/piglit-run-glslparser.sh b/android/scripts/piglit-run-glslparser.sh
new file mode 100755
index 0000000..3a7325b
--- /dev/null
+++ b/android/scripts/piglit-run-glslparser.sh
@@ -0,0 +1,45 @@
+#!/system/bin/sh
+
+set -x
+# find and loop over the vert and frag tests found
+# looks recursively down the directory tree
+
+find ${2} -name *.vert -or -name *.frag -print0 | while read -d $'\0' file
+do
+ RESULTEXPECTED=$(grep expect_result ${file} )
+ case $RESULTEXPECTED 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"*)
+ if $RESULTEXPECTED = "pass"; then
+ echo "${1}: pass"
+ else
+ echo "${1}: fail"
+ fi
+ ;;
+
+ *"$SSTRING"*) echo "${1}: skip";;
+
+ *"$FSTRING"*)
+ if $RESULTEXPECTED = "fail"; then
+ echo "${1}: pass"
+ else
+ echo "${1}: fail"
+ fi
+ ;;
+
+ *) echo "${1}: fail";;
+ esac
+done