summaryrefslogtreecommitdiff
path: root/adb-push-host.yaml
blob: f17f16c890c2ae8bf40e31d1d019aa4ae96da9db (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
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