summaryrefslogtreecommitdiff
path: root/automated/android/piglit-shader-runner/piglit-shader-runner.sh
diff options
context:
space:
mode:
authorChase Qi <chase.qi@linaro.org>2017-03-29 15:17:39 +0800
committerChase Qi <chase.qi@linaro.org>2017-03-29 15:17:39 +0800
commit577139d1a5545b4e837078d2d817dcc8712b7661 (patch)
tree7715dbc698a330f5e6234da5e21e0ae394593817 /automated/android/piglit-shader-runner/piglit-shader-runner.sh
parent398778587abb3419f561439e7d073cca50f3b1a1 (diff)
downloadtest-definitions-pipe-577139d1a5545b4e837078d2d817dcc8712b7661.tar.gz
automated: android: migrate piglit-shader-runner
Change-Id: Iff4db263a782e1f8a1fdd373a3b8aed04580bae3 Signed-off-by: Chase Qi <chase.qi@linaro.org>
Diffstat (limited to 'automated/android/piglit-shader-runner/piglit-shader-runner.sh')
-rwxr-xr-xautomated/android/piglit-shader-runner/piglit-shader-runner.sh24
1 files changed, 24 insertions, 0 deletions
diff --git a/automated/android/piglit-shader-runner/piglit-shader-runner.sh b/automated/android/piglit-shader-runner/piglit-shader-runner.sh
new file mode 100755
index 0000000..dd96165
--- /dev/null
+++ b/automated/android/piglit-shader-runner/piglit-shader-runner.sh
@@ -0,0 +1,24 @@
+#!/bin/sh -e
+# shellcheck disable=SC1091
+
+OUTPUT="$(pwd)/output"
+RESULT_FILE="${OUTPUT}/result.txt"
+LOGFILE="${OUTPUT}/piglit-shader-runner.log"
+ANDROID_SERIAL=""
+BOOT_TIMEOUT="300"
+
+. ../../lib/sh-test-lib
+. ../../lib/android-test-lib
+
+parse_common_args "$@"
+initialize_adb
+wait_boot_completed "${BOOT_TIMEOUT}"
+create_out_dir "${OUTPUT}"
+
+adb_push "./device-script.sh" "/data/local/tmp/piglit-shader-runner/"
+info_msg "device-${ANDROID_SERIAL}: About to run piglit-shader-runner..."
+adb shell "echo /data/local/tmp/piglit-shader-runner/device-script.sh 2>&1 | su" | tee "${LOGFILE}"
+
+grep -E ".+: (pass|fail|skip)" "${LOGFILE}" \
+ | sed 's/://g' \
+ | awk '{printf("%s %s\n", $1, $2)}' >> "${RESULT_FILE}"