blob: 472a10dd2b7d4061a7a4e3e59cab65eaa2f0966a (
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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
|
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 zip
- 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
- zip -r android-apk-automation.zip android-apk-automation
- echo "-------------zip 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.zip /data/local/tmp/android-apk-automation.zip
- done
- echo "-------------zip group end:$(date)--------------------" >> /tmp/adb_push_time.txt
- echo "-------------cp zip 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 shell cp /data/local/tmp/android-apk-automation.zip /data/local/tmp/android-apk-automation_${i}.zip
- done
- echo "-------------cp zip group end:$(date)--------------------" >> /tmp/adb_push_time.txt
- echo "-------------cp dir 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 shell cp -r /data/local/tmp/android-apk-automation /data/local/tmp/android-apk-automation_${i}
- done
- echo "-------------cp dir group end:$(date)--------------------" >> /tmp/adb_push_time.txt
- 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
|