summaryrefslogtreecommitdiff
path: root/android/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'android/scripts')
-rwxr-xr-xandroid/scripts/piglit-gles-2.0.sh48
-rwxr-xr-xandroid/scripts/piglit-gles-3.0.sh68
-rwxr-xr-xandroid/scripts/piglit-run-glslparser.sh60
-rwxr-xr-xandroid/scripts/piglit-run-shader.sh41
-rwxr-xr-xandroid/scripts/piglit-run-test.sh17
5 files changed, 196 insertions, 38 deletions
diff --git a/android/scripts/piglit-gles-2.0.sh b/android/scripts/piglit-gles-2.0.sh
new file mode 100755
index 0000000..fadf58c
--- /dev/null
+++ b/android/scripts/piglit-gles-2.0.sh
@@ -0,0 +1,48 @@
+#!/system/bin/sh
+#
+# piglit gles2.0 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
+#
+###############################################################################
+
+export PIGLIT_PLATFORM=android
+
+PSTRING='PIGLIT: {"result": "pass"'
+SSTRING='PIGLIT: {"result": "skip"'
+FSTRING='PIGLIT: {"result": "fail"'
+
+gles2_bin_dir="/system/xbin/piglit/piglit-spec-gles2"
+
+function normal_test(){
+ cmd="${gles2_bin_dir}/$1"
+ test_name="${1}"
+ RESULT=$(${cmd} -auto)
+ case $RESULT in
+ *"$PSTRING"*) echo "${test_name}: pass";;
+ *"$SSTRING"*) echo "${test_name}: skip";;
+ *"$FSTRING"*) echo "${test_name}: fail";;
+ *) echo "${test_name}: fail";;
+ esac
+}
+
+normal_test "glsl-fs-pointcoord_gles2"
+normal_test "minmax_gles2"
+normal_test "multiple-shader-objects_gles2"
diff --git a/android/scripts/piglit-gles-3.0.sh b/android/scripts/piglit-gles-3.0.sh
new file mode 100755
index 0000000..8a82bff
--- /dev/null
+++ b/android/scripts/piglit-gles-3.0.sh
@@ -0,0 +1,68 @@
+#!/system/bin/sh
+#
+# piglit gles3.0 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
+#
+###############################################################################
+
+export PIGLIT_PLATFORM=android
+
+PSTRING='PIGLIT: {"result": "pass"'
+SSTRING='PIGLIT: {"result": "skip"'
+FSTRING='PIGLIT: {"result": "fail"'
+
+gles3_bin_dir=/system/xbin/piglit/piglit-spec-gles3
+
+function normal_test(){
+ cmd="${gles3_bin_dir}/$1"
+ test_name="${1}"
+ RESULT=$(${cmd} -auto)
+ case $RESULT in
+ *"$PSTRING"*) echo "${test_name}: pass";;
+ *"$SSTRING"*) echo "${test_name}: skip";;
+ *"$FSTRING"*) echo "${test_name}: fail";;
+ *) echo "${test_name}: fail";;
+ esac
+}
+
+function test_oes_compressed_etc2_texture_miptree_gles3(){
+ cmd="${gles3_bin_dir}/oes_compressed_etc2_texture-miptree_gles3"
+ test_base_name="oes_compressed_etc2_texture-miptree_gles3"
+ formats="rgb8 srgb8 rgba8 srgb8-alpha8 r11 rg11 rgb8-punchthrough-alpha1 srgb8-punchthrough-alpha1"
+ for format in ${formats}; do
+ export PIGLIT_SOURCE_DIR="/data/piglit"
+ RESULT=$(${cmd} ${format} -auto)
+
+ test_name="${test_base_name}_${format}"
+ case $RESULT in
+ *"$PSTRING"*) echo "${test_name}: pass";;
+ *"$SSTRING"*) echo "${test_name}: skip";;
+ *"$FSTRING"*) echo "${test_name}: fail";;
+ *) echo "${test_name}: fail";;
+ esac
+
+ done
+
+}
+normal_test "drawarrays-vertexid_gles3"
+normal_test "minmax_gles3"
+normal_test "texture-immutable-levels_gles3"
+test_oes_compressed_etc2_texture_miptree_gles3
diff --git a/android/scripts/piglit-run-glslparser.sh b/android/scripts/piglit-run-glslparser.sh
index 1cd7494..e3f58bc 100755
--- a/android/scripts/piglit-run-glslparser.sh
+++ b/android/scripts/piglit-run-glslparser.sh
@@ -1,34 +1,64 @@
#!/system/bin/sh
+#
+# piglit glslparser 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 vert and frag tests found
# looks recursively down the directory tree
-
-find ${2} -name "*.frag" -or -name "*.vert" -print0 | while read -d $'\0' file
+export PIGLIT_PLATFORM=android
+bin_path="/system/xbin/piglit/glslparsertest/glslparsertest"
+data_dir="/data/piglit/glslparser/"
+/system/bin/busybox find ${data_dir} -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 )
+ check_link=$(grep check_link ${file})
+ case "${check_link}" in
+ *true*) check_link="--check-link";;
+ *) check_link="";;
+ esac
- PSTRING="PIGLIT: {'result': 'pass'"
- SSTRING="PIGLIT: {'result': 'skip'"
- FSTRING="PIGLIT: {'result': 'fail'"
+ required_version=$(grep 'glsl_version:' ${file})
+ case "${check_link}" in
+ *3.00*) required_version="3.00";;
+ *) required_version="1.00";;
+ esac
- case $RESULT in
- *"$PSTRING"*)
- echo "glslparser ${file}: pass";;
+ RESULT=$(${bin_path} ${check_link} ${file} $RESULTEXPECTED ${required_version})
- *"$SSTRING"*) echo "glslparser ${file}: skip";;
-
- *"$FSTRING"*)
- echo "glslparser ${file}: fail";;
+ 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
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";;
diff --git a/android/scripts/piglit-run-test.sh b/android/scripts/piglit-run-test.sh
deleted file mode 100755
index 61b39ce..0000000
--- a/android/scripts/piglit-run-test.sh
+++ /dev/null
@@ -1,17 +0,0 @@
-#!/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