Skip to content

Commit dc0afb3

Browse files
author
mwasilew
authored
Merge pull request #104 from vchong/kmgk
android optee updates
2 parents 0c37311 + a3c3313 commit dc0afb3

File tree

4 files changed

+66
-0
lines changed

4 files changed

+66
-0
lines changed

automated/android/optee/optee-gtest-gatekeeper-keymaster.yaml

+1
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ metadata:
1212
- performance
1313
devices:
1414
- hi6220-hikey
15+
- hi6220-hikey-bl
1516

1617
params:
1718
# Specify device serial no. when more than one device connected.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
#!/bin/sh -e
2+
3+
OUTPUT="$(pwd)/output"
4+
BOOT_TIMEOUT="300"
5+
LOGFILE="${OUTPUT}/gtest-kmgk-stdout.log"
6+
RESULT_FILE="${OUTPUT}/result.txt"
7+
8+
usage() {
9+
echo "Usage: $0 [-s <android_serial>] [-t <boot_timeout>]" 1>&2
10+
exit 1
11+
}
12+
13+
while getopts ":s:t:" o; do
14+
case "$o" in
15+
s) ANDROID_SERIAL="${OPTARG}" ;;
16+
t) BOOT_TIMEOUT="${OPTARG}" ;;
17+
*) usage ;;
18+
esac
19+
done
20+
21+
# shellcheck disable=SC1091
22+
. ../../lib/sh-test-lib
23+
# shellcheck disable=SC1091
24+
. ../../lib/android-test-lib
25+
26+
initialize_adb
27+
wait_boot_completed "${BOOT_TIMEOUT}"
28+
create_out_dir "${OUTPUT}"
29+
30+
# Run test.
31+
info_msg "About to run OP-TEE KMGK gtest on device ${ANDROID_SERIAL}"
32+
33+
adb shell "echo /data/nativetest/KMGK_gtest/KMGK_gtest 2>&1 | su" | tee -a "${LOGFILE}"
34+
adb shell "echo /data/nativetest64/KMGK_gtest/KMGK_gtest 2>&1 | su" | tee -a "${LOGFILE}"
35+
36+
# Parse test log into RESULT_FILE
37+
grep "\[ *OK *\] [A-Za-z]" "${LOGFILE}" | awk '{printf("%s pass\n", $4)}' | tee -a "${RESULT_FILE}"
38+
grep "\[ *FAILED *\] [A-Za-z]" "${LOGFILE}" | awk '{printf("%s fail\n", $4)}' | tee -a "${RESULT_FILE}"
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
metadata:
2+
name: optee-gtest-kmgk
3+
format: "Lava-Test-Shell Test Definition 1.0"
4+
description: "OP-TEE KMGK gtest"
5+
maintainer:
6+
- victor.chong@linaro.org
7+
os:
8+
- android
9+
scope:
10+
- functional
11+
- performance
12+
devices:
13+
- hi6220-hikey
14+
- hi6220-hikey-bl
15+
16+
params:
17+
# Specify device serial no. when more than one device connected.
18+
ANDROID_SERIAL: ""
19+
# Specify timeout in seconds for wait_boot_completed
20+
BOOT_TIMEOUT: "300"
21+
22+
run:
23+
steps:
24+
- cd ./automated/android/optee
25+
- ./optee-gtest-kmgk.sh -s "${ANDROID_SERIAL}" -t "${BOOT_TIMEOUT}"
26+
- ../../utils/send-to-lava.sh ./output/result.txt

automated/android/optee/optee-xtest.yaml

+1
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ metadata:
1111
- performance
1212
devices:
1313
- hi6220-hikey
14+
- hi6220-hikey-bl
1415
- juno
1516

1617
params:

0 commit comments

Comments
 (0)