summaryrefslogtreecommitdiff
path: root/android/scripts/piglit-run-shader.sh
diff options
context:
space:
mode:
authorYongqin Liu <yongqin.liu@linaro.org>2014-11-07 22:44:12 +0800
committerMilosz Wasilewski <milosz.wasilewski@linaro.org>2014-11-14 14:50:01 +0000
commit31a299d80c147ef2cebeb2dd9eab420bfa196277 (patch)
tree7a070e180ff3ba6450eea956b5a9a11638b25d86 /android/scripts/piglit-run-shader.sh
parent74ff4a60e70dd187d8cb3a1efe29d981297860f2 (diff)
android piglit test: update test definitions for piglit test
update the test definition files for piglit test, also rename the files' name with piglit as prefix Change-Id: I44c6b6168d6fd164d20deb8fa8dd3b077adfbd64 Signed-off-by: Yongqin Liu <yongqin.liu@linaro.org>
Diffstat (limited to 'android/scripts/piglit-run-shader.sh')
-rwxr-xr-xandroid/scripts/piglit-run-shader.sh41
1 files changed, 35 insertions, 6 deletions
diff --git a/android/scripts/piglit-run-shader.sh b/android/scripts/piglit-run-shader.sh
index 3688157..6f783f8 100755
--- a/android/scripts/piglit-run-shader.sh
+++ b/android/scripts/piglit-run-shader.sh
@@ -1,15 +1,44 @@
#!/system/bin/sh
+#
+# piglit shader test.
+#
+# Copyright (C) 2014, Linaro Limited.
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+# USA.
+#
+# owner: yongqin.liu@linaro.org
+#
+###############################################################################
# find and loop over the shader tests found
-# recursively in the named directory
+# recursively in the /data/piglit/shader directory
-find ${2} -name *.shader_test -print0 | while read -d $'\0' file
+export PIGLIT_PLATFORM=android
+bin_path="/system/xbin/piglit/piglit-shader-test/shader_runner"
+data_dir="/data/piglit/shader"
+glsl_es1_data_dir="${data_dir}/glsl-es-1.00/"
+glsl_es3_data_dir="${data_dir}/glsl-es-3.00/"
+
+/system/bin/busybox find ${data_dir} -name *.shader_test -print0 | while read -d $'\0' file
do
- RESULT=$( ${1} ${file} -auto )
+ RESULT=$(${bin_path} ${file} -auto )
- PSTRING="PIGLIT: {'result': 'pass'"
- SSTRING="PIGLIT: {'result': 'skip'"
- FSTRING="PIGLIT: {'result': 'fail'"
+ PSTRING='PIGLIT: {"result": "pass"'
+ SSTRING='PIGLIT: {"result": "skip"'
+ FSTRING='PIGLIT: {"result": "fail"'
case $RESULT in
*"$PSTRING"*) echo "${file}: pass";;