summaryrefslogtreecommitdiff
path: root/android
diff options
context:
space:
mode:
authorYongqin Liu <yongqin.liu@linaro.org>2014-11-15 18:58:28 +0800
committerMilosz Wasilewski <milosz.wasilewski@linaro.org>2014-11-17 11:52:04 +0000
commit3d6d14b9f79a99813247725078e1dc03ec0c6369 (patch)
tree0bb1b93d474b55d8d94c3afa505a6e6784819d4d /android
parent33739d9e92fad362a94a35dd8c45eeee3bf5ca8b (diff)
piglit scripts: POSIX Compliant Update
This change is to make the test script to be POSIX compliant. Also fix the problem of using -print for busybox find command Change-Id: Id24410d3eae9d93f2e02ee630207fdd896b648ae Signed-off-by: Yongqin Liu <yongqin.liu@linaro.org>
Diffstat (limited to 'android')
-rwxr-xr-xandroid/scripts/piglit-gles-2.0.sh5
-rwxr-xr-xandroid/scripts/piglit-gles-3.0.sh10
-rwxr-xr-xandroid/scripts/piglit-run-glslparser.sh5
-rwxr-xr-xandroid/scripts/piglit-run-shader.sh6
4 files changed, 16 insertions, 10 deletions
diff --git a/android/scripts/piglit-gles-2.0.sh b/android/scripts/piglit-gles-2.0.sh
index fadf58c..db1544d 100755
--- a/android/scripts/piglit-gles-2.0.sh
+++ b/android/scripts/piglit-gles-2.0.sh
@@ -23,7 +23,8 @@
#
###############################################################################
-export PIGLIT_PLATFORM=android
+PIGLIT_PLATFORM=android
+export PIGLIT_PLATFORM
PSTRING='PIGLIT: {"result": "pass"'
SSTRING='PIGLIT: {"result": "skip"'
@@ -31,7 +32,7 @@ FSTRING='PIGLIT: {"result": "fail"'
gles2_bin_dir="/system/xbin/piglit/piglit-spec-gles2"
-function normal_test(){
+normal_test(){
cmd="${gles2_bin_dir}/$1"
test_name="${1}"
RESULT=$(${cmd} -auto)
diff --git a/android/scripts/piglit-gles-3.0.sh b/android/scripts/piglit-gles-3.0.sh
index 8a82bff..afce5af 100755
--- a/android/scripts/piglit-gles-3.0.sh
+++ b/android/scripts/piglit-gles-3.0.sh
@@ -23,7 +23,8 @@
#
###############################################################################
-export PIGLIT_PLATFORM=android
+PIGLIT_PLATFORM=android
+export PIGLIT_PLATFORM
PSTRING='PIGLIT: {"result": "pass"'
SSTRING='PIGLIT: {"result": "skip"'
@@ -31,7 +32,7 @@ FSTRING='PIGLIT: {"result": "fail"'
gles3_bin_dir=/system/xbin/piglit/piglit-spec-gles3
-function normal_test(){
+normal_test(){
cmd="${gles3_bin_dir}/$1"
test_name="${1}"
RESULT=$(${cmd} -auto)
@@ -43,12 +44,13 @@ function normal_test(){
esac
}
-function test_oes_compressed_etc2_texture_miptree_gles3(){
+test_oes_compressed_etc2_texture_miptree_gles3(){
+ PIGLIT_SOURCE_DIR="/data/piglit"
+ export PIGLIT_SOURCE_DIR
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}"
diff --git a/android/scripts/piglit-run-glslparser.sh b/android/scripts/piglit-run-glslparser.sh
index e3f58bc..d632c6c 100755
--- a/android/scripts/piglit-run-glslparser.sh
+++ b/android/scripts/piglit-run-glslparser.sh
@@ -25,10 +25,11 @@
# find and loop over the vert and frag tests found
# looks recursively down the directory tree
-export PIGLIT_PLATFORM=android
+PIGLIT_PLATFORM=android
+export PIGLIT_PLATFORM
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
+/system/bin/busybox find ${data_dir} -name "*.frag" -or -name "*.vert" | while read file
do
RESULTFOUND=$(grep expect_result ${file} )
case $RESULTFOUND in
diff --git a/android/scripts/piglit-run-shader.sh b/android/scripts/piglit-run-shader.sh
index 6f783f8..8353b6e 100755
--- a/android/scripts/piglit-run-shader.sh
+++ b/android/scripts/piglit-run-shader.sh
@@ -26,13 +26,15 @@
# find and loop over the shader tests found
# recursively in the /data/piglit/shader directory
-export PIGLIT_PLATFORM=android
+PIGLIT_PLATFORM=android
+export PIGLIT_PLATFORM
+
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
+/system/bin/busybox find ${data_dir} -name *.shader_test | while read file
do
RESULT=$(${bin_path} ${file} -auto )