summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMilosz Wasilewski <milosz.wasilewski@linaro.org>2018-06-01 09:55:03 +0000
committerLinaro Code Review <review@review.linaro.org>2018-06-01 09:55:03 +0000
commit84f2e84f14889b3d8cc7387891a379cedf3deab6 (patch)
tree7f7449ca73cc41df1c6f22c9a1c7af34d0c06491
parentbd0f2fead8a8fc308a989c0241cf784ddd014dc3 (diff)
parentce6c7cd7d882a5d672e0c86eb703c61db8977c2e (diff)
downloadtest-definitions-parser-84f2e84f14889b3d8cc7387891a379cedf3deab6.tar.gz
Merge "Add automated/linux/pritee_test_utility"
-rwxr-xr-xautomated/linux/pritee_test_utility/pritee_test_utility.sh34
-rw-r--r--automated/linux/pritee_test_utility/pritee_test_utility.yaml22
2 files changed, 56 insertions, 0 deletions
diff --git a/automated/linux/pritee_test_utility/pritee_test_utility.sh b/automated/linux/pritee_test_utility/pritee_test_utility.sh
new file mode 100755
index 0000000..5f92beb
--- /dev/null
+++ b/automated/linux/pritee_test_utility/pritee_test_utility.sh
@@ -0,0 +1,34 @@
+#!/bin/sh
+
+. ../../lib/sh-test-lib
+OUTPUT="$(pwd)/output"
+LOG_FILE="${OUTPUT}/pritee_test_utility.log"
+RESULT_FILE="${OUTPUT}/result.txt"
+DEFAULT_OPTS="-drmpath:/usr/share/playready"
+OPTS=${DEFAULT_OPTS}
+
+if [ -n "$1" ]; then
+ OPTS="$1"
+fi
+
+create_out_dir "${OUTPUT}"
+
+chmod a+x /usr/bin/pritee_test_utility.exe
+/usr/bin/pritee_test_utility.exe "${OPTS}" | tee "${LOG_FILE}"
+
+while read -r line; do
+ line=$(echo "${line}" | tr -d '[:space:]')
+ case $line in
+ TestArea:* )
+ ta=${line#TestArea:}
+ ;;
+ TEST_* )
+ tc=$line
+ ;;
+ RESULT=* )
+ result=${line#RESULT=}
+ result=$(echo "${result}" | tr '[:upper:]' '[:lower:]')
+ echo "${ta}-${tc} ${result}" >> "${RESULT_FILE}"
+ ;;
+ esac
+done < "${LOG_FILE}"
diff --git a/automated/linux/pritee_test_utility/pritee_test_utility.yaml b/automated/linux/pritee_test_utility/pritee_test_utility.yaml
new file mode 100644
index 0000000..2c7cfae
--- /dev/null
+++ b/automated/linux/pritee_test_utility/pritee_test_utility.yaml
@@ -0,0 +1,22 @@
+metadata:
+ name: pritee_test_utility
+ format: "Lava-Test-Shell Test Definition 1.0"
+ description: "PlayReady Interface for Trusted Execution Environment Test Utility"
+ maintainer:
+ - arthur.she@linaro.org
+ os:
+ - openembedded
+ scope:
+ - functional
+ devices:
+ - hi6220-hikey
+ - dragonboard-410c
+
+params:
+ OPTS: "-drmpath:/usr/share/playready"
+
+run:
+ steps:
+ - cd automated/linux/pritee_test_utility
+ - ./pritee_test_utility.sh ${OPTS}
+ - ../../utils/send-to-lava.sh ./output/result.txt