From ec50dacea22072044b603eb460d15e659a7f2a9f Mon Sep 17 00:00:00 2001 From: Yongqin Liu Date: Mon, 25 Apr 2016 04:40:46 +0000 Subject: personal yaml git repository Signed-off-by: Yongqin Liu --- adb-push-host.yaml | 37 +++++++++++++++++++++++++++++++++ adb-push-target.yaml | 58 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 95 insertions(+) create mode 100644 adb-push-host.yaml create mode 100644 adb-push-target.yaml diff --git a/adb-push-host.yaml b/adb-push-host.yaml new file mode 100644 index 0000000..f17f16c --- /dev/null +++ b/adb-push-host.yaml @@ -0,0 +1,37 @@ +metadata: + name: cts-host + format: "Lava-Test-Shell Test Definition 1.0" + description: "Run CTS on Linaro android. Host side; + Get user defined CTS test command from JSON and run; + The value put in params section in this file is default, user can overwrite them by the values in JSON file." + maintainer: + - milosz.wasilewski@linaro.org + os: + - ubuntu + devices: + - kvm + scope: + - functional + +run: + steps: + - apt-get install -y git android-tools-adb time + - git clone git://git.linaro.org/qa/android-apk-automation.git + - lava-wait adb-push-send-ip + - IPADDR=`awk -F '=' '{print $2}' /tmp/lava_multi_node_cache.txt` + - if [ $IPADDR != "_MISSING_" ] + - then + - adb connect $IPADDR + - echo $IPADDR + - adb -s $IPADDR:5555 wait-for-device + - adb devices + - echo "-------------group start:$(date)--------------------">> /tmp/adb_push_time.txt + - for i in {1..10}; do + - /usr/bin/time -f "\t%E real,\t%U user,\t%S sys" -a -o /tmp/adb_push_time.txt adb push ./android-apk-automation/ /data/local/tmp/android-apk-automation/ + - done + - echo "-------------group end:$(date)--------------------" >> /tmp/adb_push_time.txt + - fi + - adb shell dmesg > /tmp/dmesg.log + - if [ -f /tmp/adb_push_time.txt ]; then lava-test-run-attach /tmp/adb_push_time.txt text/plain; fi + - if [ -f /tmp/dmesg.log ]; then lava-test-run-attach /tmp/dmesg.log text/plain; fi + - lava-sync adb-push-finished diff --git a/adb-push-target.yaml b/adb-push-target.yaml new file mode 100644 index 0000000..34bc8d1 --- /dev/null +++ b/adb-push-target.yaml @@ -0,0 +1,58 @@ +metadata: + name: multinode-target + format: "Lava-Test-Shell Test Definition 1.0" + description: "Run android test that requires host side. Target side. + The value put in params section in this file is default, user can overwrite them by the values in JSON file. + Test can be used with different host side tests" + maintainer: + - milosz.wasilewski@linaro.org + os: + - android + devices: + - panda + - panda-es + - vexpress-a9 + - vexpress-tc2 + - juno + - mn-nexus9 + scope: + - functional + - performance + +params: + # ADB_LINK parameter is used to pass proper device + # identification to the host side. Default is ETH + # which means adb-over-ethernet is used + ADB_LINK: "ETH" + +run: + steps: + - lava-test-case step1a-cat-build-info --shell cat /system/build.prop + - lava-test-case step1b-$SIGNAL_PREFIX-getprop --shell getprop + - SERIALNO=$(getprop ro.serialno) + - IPADDR=$(getprop dhcp.eth0.ipaddress) + - if [ $ADB_LINK != "ETH" ] && [ ! -z $SERIALNO ] + - then + - IPADDR=$SERIALNO + - fi + - if [ $ADB_LINK = "ETH" ] && [ ! -z $IPADDR ] + - then + - lava-test-case step2-get-adb --shell getprop service.adb.tcp.port + - lava-test-case step3-set-adb --shell setprop service.adb.tcp.port 5555 + - lava-test-case step4-set-adb-root --shell setprop service.adb.root 1 + - lava-test-case step5-capture-kmsg-levels --shell 'cat /proc/sys/kernel/printk > /data/local/tmp/kmsg_levels' + - lava-test-case step6-disable-kmsg --shell echo '1 1 1 1' > /proc/sys/kernel/printk + - lava-test-case step7-stop-adbd --shell stop adbd + - lava-test-case step8-start-adbd --shell start adbd + - fi + - if [ -z $SERIALNO ] && [ -z $IPADDR ] + - then + # if there is no serial number or IP address available, _MISSING_ is passed to the host + - IPADDR="_MISSING_" + - fi + - lava-test-case step9-send-ip --shell lava-send adb-push-send-ip ipaddr=$IPADDR + - if [ -f /data/local/tmp/kmsg_levels ] + - then + - lava-test-case step10-enable-kmsg --shell 'cat /data/local/tmp/kmsg_levels > /proc/sys/kernel/printk' + - fi + - lava-test-case step11-multinode-sync --shell lava-sync adb-push-finished -- cgit v1.2.3