From 31a299d80c147ef2cebeb2dd9eab420bfa196277 Mon Sep 17 00:00:00 2001 From: Yongqin Liu Date: Fri, 7 Nov 2014 22:44:12 +0800 Subject: 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 --- android/glsl_fs_pointcoord_gles2.yaml | 28 ------------ android/glslparser_gles2.yaml | 28 ------------ android/invalid_es_queries_gles2.yaml | 28 ------------ android/minmax_gles2.yaml | 28 ------------ android/multiple-shader-objects_gles2.yaml | 28 ------------ android/piglit_gles2.yaml | 20 +++++++++ android/piglit_gles3.yaml | 20 +++++++++ android/piglit_glslparser.yaml | 20 +++++++++ android/piglit_shader_runner.yaml | 20 +++++++++ android/scripts/piglit-gles-2.0.sh | 48 +++++++++++++++++++++ android/scripts/piglit-gles-3.0.sh | 68 ++++++++++++++++++++++++++++++ android/scripts/piglit-run-glslparser.sh | 60 +++++++++++++++++++------- android/scripts/piglit-run-shader.sh | 41 +++++++++++++++--- android/scripts/piglit-run-test.sh | 17 -------- android/shader_runner_gles2.yaml | 28 ------------ 15 files changed, 276 insertions(+), 206 deletions(-) delete mode 100644 android/glsl_fs_pointcoord_gles2.yaml delete mode 100644 android/glslparser_gles2.yaml delete mode 100644 android/invalid_es_queries_gles2.yaml delete mode 100644 android/minmax_gles2.yaml delete mode 100644 android/multiple-shader-objects_gles2.yaml create mode 100644 android/piglit_gles2.yaml create mode 100644 android/piglit_gles3.yaml create mode 100644 android/piglit_glslparser.yaml create mode 100644 android/piglit_shader_runner.yaml create mode 100755 android/scripts/piglit-gles-2.0.sh create mode 100755 android/scripts/piglit-gles-3.0.sh delete mode 100755 android/scripts/piglit-run-test.sh delete mode 100644 android/shader_runner_gles2.yaml (limited to 'android') diff --git a/android/glsl_fs_pointcoord_gles2.yaml b/android/glsl_fs_pointcoord_gles2.yaml deleted file mode 100644 index 6cd28ef..0000000 --- a/android/glsl_fs_pointcoord_gles2.yaml +++ /dev/null @@ -1,28 +0,0 @@ -metadata: - name: glsl_fs_pointcoord_gles2 - version: 1.0 - format: "Lava-Test-Shell Test Definition 1.0" - description: "glsl_fs_pointcoord_gles2 test for android" - maintainer: - - milosz.wasilewski@linaro.org - os: - - android - scope: - - functional - devices: - - panda - - panda-es - -run: - steps: - - "export PIGLIT_PLATFORM=android" - - "cd test-definitions/android/scripts" - - "./homescreen.sh" - - "./piglit-run-test.sh /system/xbin/piglit/piglit-spec-gles2/glsl-fs-pointcoord_gles2 -auto" - -parse: - pattern: "(?P.*-*):\\s+(?P(pass|fail))" - fixupdict: - PASS: pass - FAIL: fail - SKIP: skip diff --git a/android/glslparser_gles2.yaml b/android/glslparser_gles2.yaml deleted file mode 100644 index 7091fef..0000000 --- a/android/glslparser_gles2.yaml +++ /dev/null @@ -1,28 +0,0 @@ -metadata: - name: glslparser_gles2 - version: 1.0 - format: "Lava-Test-Shell Test Definition 1.0" - description: "glslparser_gles2 test for android" - maintainer: - - milosz.wasilewski@linaro.org - os: - - android - scope: - - functional - devices: - - panda - - panda-es - -run: - steps: - - "export PIGLIT_PLATFORM=android" - - "cd test-definitions/android/scripts" - - "./homescreen.sh" - - "./piglit-run-glslparser.sh /system/xbin/piglit/glslparsertest/glslparsertest_gles2 /data/glslparser-data" - -parse: - pattern: "(?P.*-*):\\s+(?P(pass|fail))" - fixupdict: - PASS: pass - FAIL: fail - SKIP: skip diff --git a/android/invalid_es_queries_gles2.yaml b/android/invalid_es_queries_gles2.yaml deleted file mode 100644 index 98a2077..0000000 --- a/android/invalid_es_queries_gles2.yaml +++ /dev/null @@ -1,28 +0,0 @@ -metadata: - name: invalid_es3_queries_gles2 - version: 1.0 - format: "Lava-Test-Shell Test Definition 1.0" - description: "invalid_es3_queries_gles2 test for android" - maintainer: - - milosz.wasilewski@linaro.org - os: - - android - scope: - - functional - devices: - - panda - - panda-es - -run: - steps: - - "export PIGLIT_PLATFORM=android" - - "cd test-definitions/android/scripts" - - "./homescreen.sh" - - "./piglit-run-test.sh /system/xbin/piglit/piglit-spec-gles2/invalid-es3-queries_gles2 -auto" - -parse: - pattern: "(?P.*-*):\\s+(?P(pass|fail))" - fixupdict: - PASS: pass - FAIL: fail - SKIP: skip diff --git a/android/minmax_gles2.yaml b/android/minmax_gles2.yaml deleted file mode 100644 index b746518..0000000 --- a/android/minmax_gles2.yaml +++ /dev/null @@ -1,28 +0,0 @@ -metadata: - name: minmax_gles2 - version: 1.0 - format: "Lava-Test-Shell Test Definition 1.0" - description: "minmax_gles2 test for android" - maintainer: - - milosz.wasilewski@linaro.org - os: - - android - scope: - - functional - devices: - - panda - - panda-es - -run: - steps: - - "export PIGLIT_PLATFORM=android" - - "cd test-definitions/android/scripts" - - "./homescreen.sh" - - "./piglit-run-test.sh /system/xbin/piglit/piglit-spec-gles2/minmax_gles2" - -parse: - pattern: "(?P.*-*):\\s+(?P(pass|fail))" - fixupdict: - PASS: pass - FAIL: fail - SKIP: skip diff --git a/android/multiple-shader-objects_gles2.yaml b/android/multiple-shader-objects_gles2.yaml deleted file mode 100644 index f0f924c..0000000 --- a/android/multiple-shader-objects_gles2.yaml +++ /dev/null @@ -1,28 +0,0 @@ -metadata: - name: multiple_shader_objects_gles2 - version: 1.0 - format: "Lava-Test-Shell Test Definition 1.0" - description: "multiple_shader_objects_gles2 test for android" - maintainer: - - milosz.wasilewski@linaro.org - os: - - android - scope: - - functional - devices: - - panda - - panda-es - -run: - steps: - - "export PIGLIT_PLATFORM=android" - - "cd test-definitions/android/scripts" - - "./homescreen.sh" - - "./piglit-run-test.sh /system/xbin/piglit/piglit-spec-gles2/multiple-shader-objects_gles2 -auto" - -parse: - pattern: "(?P.*-*):\\s+(?P(pass|fail))" - fixupdict: - PASS: pass - FAIL: fail - SKIP: skip diff --git a/android/piglit_gles2.yaml b/android/piglit_gles2.yaml new file mode 100644 index 0000000..11b5289 --- /dev/null +++ b/android/piglit_gles2.yaml @@ -0,0 +1,20 @@ +metadata: + name: piglit_gles2.0 + version: 1.0 + format: "Lava-Test-Shell Test Definition 1.0" + description: "piglit test for android on gles-2.0" + maintainer: + - yongqin.liu@linaro.org + os: + - android + scope: + - functional + devices: + - juno + +run: + steps: + - "./android/scripts/piglit-gles-2.0.sh" + +parse: + pattern: "(?P.*-*):\\s+(?P(pass|skip|fail))" diff --git a/android/piglit_gles3.yaml b/android/piglit_gles3.yaml new file mode 100644 index 0000000..c9ff2bf --- /dev/null +++ b/android/piglit_gles3.yaml @@ -0,0 +1,20 @@ +metadata: + name: piglit_gles3.0 + version: 1.0 + format: "Lava-Test-Shell Test Definition 1.0" + description: "piglit test for android on gles-3.0" + maintainer: + - yongqin.liu@linaro.org + os: + - android + scope: + - functional + devices: + - juno + +run: + steps: + - "./android/scripts/piglit-gles-3.0.sh" + +parse: + pattern: "(?P.*-*):\\s+(?P(pass|skip|fail))" diff --git a/android/piglit_glslparser.yaml b/android/piglit_glslparser.yaml new file mode 100644 index 0000000..ad93756 --- /dev/null +++ b/android/piglit_glslparser.yaml @@ -0,0 +1,20 @@ +metadata: + name: glslparser + version: 1.0 + format: "Lava-Test-Shell Test Definition 1.0" + description: "piglit glslparser test for android" + maintainer: + - yongqin.liu@linaro.org + os: + - android + scope: + - functional + devices: + - juno + +run: + steps: + - "./android/scripts/piglit-run-glslparser.sh" + +parse: + pattern: "(?P.*-*):\\s+(?P(pass|skip|fail))" diff --git a/android/piglit_shader_runner.yaml b/android/piglit_shader_runner.yaml new file mode 100644 index 0000000..3895d83 --- /dev/null +++ b/android/piglit_shader_runner.yaml @@ -0,0 +1,20 @@ +metadata: + name: shader_runner + version: 1.0 + format: "Lava-Test-Shell Test Definition 1.0" + description: "piglit shader_runner test for android" + maintainer: + - yongqin.liu@linaro.org + os: + - android + scope: + - functional + devices: + - juno + +run: + steps: + - "./android/scripts/piglit-run-shader.sh" + +parse: + pattern: "(?P.*-*):\\s+(?P(pass|skip|fail))" 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 diff --git a/android/shader_runner_gles2.yaml b/android/shader_runner_gles2.yaml deleted file mode 100644 index 94b9976..0000000 --- a/android/shader_runner_gles2.yaml +++ /dev/null @@ -1,28 +0,0 @@ -metadata: - name: shader_runner_gles2 - version: 1.0 - format: "Lava-Test-Shell Test Definition 1.0" - description: "shader_runner_gles2 test for android" - maintainer: - - milosz.wasilewski@linaro.org - os: - - android - scope: - - functional - devices: - - panda - - panda-es - -run: - steps: - - "export PIGLIT_PLATFORM=android" - - "cd test-definitions/android/scripts" - - "./homescreen.sh" - - "./piglit-run-shader.sh /system/xbin/piglit/piglit-shader-test/shader_runner_gles2 /data/shader-data" - -parse: - pattern: "(?P.*-*):\\s+(?P(pass|fail))" - fixupdict: - PASS: pass - FAIL: fail - SKIP: skip -- cgit v1.2.3