summaryrefslogtreecommitdiff
path: root/automated/android/cts
diff options
context:
space:
mode:
Diffstat (limited to 'automated/android/cts')
-rwxr-xr-xautomated/android/cts/cts-runner.py6
-rwxr-xr-xautomated/android/cts/cts.sh5
-rw-r--r--automated/android/cts/cts.yaml6
3 files changed, 7 insertions, 10 deletions
diff --git a/automated/android/cts/cts-runner.py b/automated/android/cts/cts-runner.py
index 50589e3..b81b8ff 100755
--- a/automated/android/cts/cts-runner.py
+++ b/automated/android/cts/cts-runner.py
@@ -80,16 +80,12 @@ RESULT_FILE = '%s/result.txt' % OUTPUT
CTS_STDOUT = '%s/cts-stdout.txt' % OUTPUT
CTS_LOGCAT = '%s/cts-logcat.txt' % OUTPUT
TEST_PARAMS = ''
-SN = ''
parser = argparse.ArgumentParser()
parser.add_argument('-t', dest='TEST_PARAMS', required=True,
help="cts test parameters")
-parser.add_argument('-n', dest='SN', required=True,
- help='Target device serial no.')
args = parser.parse_args()
TEST_PARAMS = args.TEST_PARAMS
-SN = args.SN
if os.path.exists(OUTPUT):
suffix = datetime.datetime.now().strftime('%Y%m%d%H%M%S')
@@ -127,7 +123,7 @@ while child.isalive():
subprocess.call('echo')
subprocess.call(['echo', '--- line break ---'])
logger.info('Checking adb connectivity...')
- adb_command = "adb -s %s shell echo OK" % SN
+ adb_command = "adb shell echo OK"
adb_check = subprocess.Popen(shlex.split(adb_command))
if adb_check.wait() != 0:
subprocess.call(['adb', 'devices'])
diff --git a/automated/android/cts/cts.sh b/automated/android/cts/cts.sh
index 9f5bdc3..8e85d94 100755
--- a/automated/android/cts/cts.sh
+++ b/automated/android/cts/cts.sh
@@ -23,7 +23,7 @@ while getopts ':s:o:n:d:c:t:' opt; do
case "${opt}" in
s) SKIP_INSTALL="${OPTARG}" ;;
o) TIMEOUT="${OPTARG}" ;;
- n) SN="${OPTARG}" ;;
+ n) ANDROID_SERIAL="${OPTARG}" ;;
d) JDK="${OPTARG}" ;;
c) CTS_URL="${OPTARG}" ;;
t) TEST_PARAMS="${OPTARG}" ;;
@@ -80,7 +80,8 @@ if [ -d android-cts/results ]; then
fi
# Run CTS test.
-./cts-runner.py -t "${TEST_PARAMS}" -n "${SN}"
+info_msg "About to run dd speed test on device ${ANDROID_SERIAL}"
+./cts-runner.py -t "${TEST_PARAMS}"
# Cleanup.
rm -f /etc/apt/sources.list.d/cts.list
diff --git a/automated/android/cts/cts.yaml b/automated/android/cts/cts.yaml
index 74e65cf..d12e149 100644
--- a/automated/android/cts/cts.yaml
+++ b/automated/android/cts/cts.yaml
@@ -17,8 +17,8 @@ params:
SKIP_INSTALL: "false"
# Specify timeout in seconds for wait_boot_completed and wait_homescreen.
TIMEOUT: "300"
- # Specify adb device SN if more then one device connected.
- SN: ""
+ # Specify adb device serial no. if more then one device connected.
+ ANDROID_SERIAL: ""
JDK: "openjdk-8-jdk-headless"
# Download CTS package or copy it from local disk.
# CTS_URL: "/root/android-cts/linaro/7.1_r1/android-cts-7.1_r1.zip"
@@ -30,7 +30,7 @@ params:
run:
steps:
- cd ./automated/android/cts
- - ./cts.sh -s "${SKIP_INSTALL}" -o "${TIMEOUT}" -n "${SN}" -d "${JDK}" -c "${CTS_URL}" -t "${TEST_PARAMS}"
+ - ./cts.sh -s "${SKIP_INSTALL}" -o "${TIMEOUT}" -n "${ANDROID_SERIAL}" -d "${JDK}" -c "${CTS_URL}" -t "${TEST_PARAMS}"
# Upload test log and result files to artifactorial.
- cp -r ./android-cts/results ./output/ || true
- cp -r ./android-cts/logs ./output/ || true