summaryrefslogtreecommitdiff
path: root/android
diff options
context:
space:
mode:
authorYongqin Liu <yongqin.liu@linaro.org>2016-08-16 15:57:30 +0800
committerYongqin Liu <yongqin.liu@linaro.org>2016-08-16 15:57:30 +0800
commit859b7acdf25da10888fe613acdd1842799eedad2 (patch)
treeec10c8fb9ce6327f67aede48d6c3ce35910a4725 /android
parentae478fd5ecd92f93bbab0d0df8c83f55a1816267 (diff)
parent974eda58528c1c992a244cca486b40b5a5782826 (diff)
Merge branch 'master' of ssh://git.linaro.org/people/yongqin.liu/public/test-definitions into self-master2
Signed-off-by: Yongqin Liu <yongqin.liu@linaro.org> Conflicts: android/boottime.yaml android/devicetree-android.yaml android/lava-android-test-host.yaml android/scripts/bionic-benchmarks.sh android/scripts/tjbench.sh android/tjbench.yaml common/scripts/include/sh-test-lib common/scripts/kvm/test-kvm.sh Change-Id: Id70a5226a4f3a950a213ab65ba8b43bed8271ff6
Diffstat (limited to 'android')
-rw-r--r--android/art-microbenchmarks.yaml51
-rw-r--r--android/boottime.yaml4
-rw-r--r--android/cts-host.yaml51
l---------android/cts-target.yaml1
-rw-r--r--android/dalvik-vm-unit-tests.yaml23
-rw-r--r--android/devicetree-android.yaml2
-rw-r--r--android/ethernet-android.yaml4
-rw-r--r--android/gator-data-streaming.yaml2
-rw-r--r--android/iozone2.yaml20
-rw-r--r--android/lava-android-test-host.yaml15
l---------[-rw-r--r--]android/lava-android-test-target.yaml33
-rw-r--r--android/meminfo.yaml22
-rw-r--r--android/multinode-target.yaml63
-rw-r--r--android/pm-qa.yaml24
-rw-r--r--android/scheduler_testssuites.yaml41
-rwxr-xr-xandroid/scripts/adb_connect.sh8
-rwxr-xr-xandroid/scripts/bionic-benchmarks.sh38
-rwxr-xr-xandroid/scripts/configure-nexus5x-for-benchmarks.sh59
-rwxr-xr-xandroid/scripts/configure-nexus9-for-benchmarks.sh12
-rwxr-xr-xandroid/scripts/cts.py238
-rwxr-xr-xandroid/scripts/gatortest.sh14
-rwxr-xr-xandroid/scripts/iozone/iozone.sh13
-rwxr-xr-xandroid/scripts/iozone/iozoneparser.sh15
-rwxr-xr-xandroid/scripts/iozone2.sh98
-rwxr-xr-xandroid/scripts/meminfo.sh67
-rwxr-xr-xandroid/scripts/parse-ubenchmarks-results.sh15
-rwxr-xr-xandroid/scripts/pm-qa.sh50
-rwxr-xr-xandroid/scripts/tjbench.sh2
-rw-r--r--android/sd-mmc.yaml2
29 files changed, 837 insertions, 150 deletions
diff --git a/android/art-microbenchmarks.yaml b/android/art-microbenchmarks.yaml
new file mode 100644
index 0000000..78418de
--- /dev/null
+++ b/android/art-microbenchmarks.yaml
@@ -0,0 +1,51 @@
+metadata:
+ name: art-microbenchmarks
+ format: "Lava-Test-Shell Test Definition 1.0"
+ description: "The script configures the Nexus 9 and 5X for low variance and runs the test"
+ maintainer:
+ - vishal.bhoj@linaro.org
+ os:
+ - ubuntu
+ devices:
+ - kvm
+ scope:
+ - perfomance
+
+install:
+ steps:
+ - ./common/scripts/install-deps.sh $DEPENDENCIES $JDK $JRE
+ git-repos:
+ - https://android-git.linaro.org/git/linaro/art-testing.git
+
+params:
+ DEPENDENCIES: "android-tools-adb android-tools-fastboot libc6:i386 libncurses5:i386 libstdc++6:i386 python3 binutils"
+ JDK: "default-jdk"
+ JRE: "default-jre"
+ TEST_NAME: "art-test"
+ TARGET_DEVICE: "nexus9"
+ ITERATIONS: 10
+ MODE: 64
+ CORE: "default"
+
+run:
+ steps:
+ - lava-wait $TEST_NAME-send-ip
+ - IPADDR=`awk -F '=' '{print $2}' /tmp/lava_multi_node_cache.txt`
+ - if [ $IPADDR != "_MISSING_" ]
+ - then
+ - if [ -f ./android/scripts/configure-$TARGET_DEVICE-for-benchmarks.sh ]
+ - then
+ - . ./android/scripts/configure-$TARGET_DEVICE-for-benchmarks.sh $CORE || true
+ - fi
+ - ./art-testing/run.py -t $IPADDR --iterations $ITERATIONS --mode $MODE --output-pkl $PWD/art-microbenchmarks.pkl --output-json $PWD/art-microbenchmarks.json | tee logs.txt
+ - . ./android/scripts/parse-ubenchmarks-results.sh logs.txt
+ - if [ -f art-microbenchmarks.pkl ]; then lava-test-run-attach art-microbenchmarks.pkl; fi
+ - if [ -f art-microbenchmarks.json ]; then lava-test-run-attach art-microbenchmarks.json; fi
+ - echo "processes running"
+ - ps
+ - fi
+ - adb -s $IPADDR shell start
+ - sleep 30
+ - adb -s $IPADDR shell dumpsys battery
+ - lava-sync $TEST_NAME-finished
+
diff --git a/android/boottime.yaml b/android/boottime.yaml
index 5da119b..a6fe349 100644
--- a/android/boottime.yaml
+++ b/android/boottime.yaml
@@ -18,9 +18,9 @@ run:
- "./android/scripts/boot_time.sh"
- "dmesg > dmesg.log"
- lava-test-run-attach dmesg.log text/plain
- - "logcat -d *:V > logcat_all.log"
+ - "logcat -d -v time *:V > logcat_all.log"
- lava-test-run-attach logcat_all.log text/plain
- - "logcat -d -b events > logcat_events.log"
+ - "logcat -d -b events -v time > logcat_events.log"
- lava-test-run-attach logcat_events.log text/plain
parse:
diff --git a/android/cts-host.yaml b/android/cts-host.yaml
new file mode 100644
index 0000000..ce412a3
--- /dev/null
+++ b/android/cts-host.yaml
@@ -0,0 +1,51 @@
+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
+
+install:
+ steps:
+ - ./common/scripts/install-deps.sh $DEPENDENCIES $JDK $JRE
+
+params:
+ DEPENDENCIES: "xz-utils python-lxml python-setuptools python-pexpect android-tools-adb android-tools-fastboot zip libc6:i386 libncurses5:i386 libstdc++6:i386 lib32z1-dev libc6-dev-i386 lib32gcc1"
+ JDK: "default-jdk"
+ JRE: "default-jre"
+ CTS_URL: "http://testdata.validation.linaro.org/cts/android-cts-5.0-armv8.zip"
+ BUILD_TOOLS_URL: "http://testdata.validation.linaro.org/apks/workload-automation/build-tools.tar.gz"
+ TEST_NAME: "android-cts-5.0-armv8"
+ TEST_PARAMS: "run cts --package android.aadb --disable-reboot"
+
+run:
+ steps:
+ - wget $BUILD_TOOLS_URL -O build-tools.tar.gz
+ - tar zxvf build-tools.tar.gz
+ - AAPT_HOME=`pwd`/build-tools
+ - PATH=${AAPT_HOME}/android-4.4/:${PATH}
+ - export PATH
+ - lava-wait $TEST_NAME-send-ip
+ - IPADDR=`awk -F '=' '{print $2}' /tmp/lava_multi_node_cache.txt`
+ - if [ $IPADDR != "_MISSING_" ]
+ - then
+ - ". ./android/scripts/adb_connect.sh $IPADDR"
+ - echo $CTS_URL
+ - echo $IPADDR
+ - echo $TEST_PARAMS
+ - adb -s $IPADDR wait-for-device
+ - adb devices
+ - ./android/scripts/cts.py $CTS_URL $IPADDR $TEST_PARAMS
+ - echo "processes running"
+ - ps
+ - fi
+ - lava-sync $TEST_NAME-finished
+ - rm -fr build-tools.tar.gz ${AAPT_HOME}
diff --git a/android/cts-target.yaml b/android/cts-target.yaml
new file mode 120000
index 0000000..db27b47
--- /dev/null
+++ b/android/cts-target.yaml
@@ -0,0 +1 @@
+multinode-target.yaml \ No newline at end of file
diff --git a/android/dalvik-vm-unit-tests.yaml b/android/dalvik-vm-unit-tests.yaml
deleted file mode 100644
index 3c25748..0000000
--- a/android/dalvik-vm-unit-tests.yaml
+++ /dev/null
@@ -1,23 +0,0 @@
-metadata:
- name: dalvik-vm-unit-tests
- format: "Lava-Test-Shell Test Definition 1.0"
- description: "DalvikVM unit tests for android."
- maintainer:
- - amit.pundir@linaro.org
- os:
- - android
- scope:
- - functional
- devices:
- - arndale
- - panda
- - panda-es
- - vexpress-a9
- - vexpress-tc2
-
-run:
- steps:
- - "./android/scripts/dalvik-vm-unit-tests.sh"
-
-parse:
- pattern: "^(?P<test_case_id>.*)=(?P<result>.*)"
diff --git a/android/devicetree-android.yaml b/android/devicetree-android.yaml
index a44ad75..67ccf2d 100644
--- a/android/devicetree-android.yaml
+++ b/android/devicetree-android.yaml
@@ -3,6 +3,8 @@ metadata:
format: "Lava-Test-Shell Test Definition 1.0"
description: "This test checks for Flattened Device Tree blob for Android builds. The test verifies that device-tree
is available and contains model name of the board."
+ maintainer:
+ - milosz.wasilewski@linaro.org
os:
- android
devices:
diff --git a/android/ethernet-android.yaml b/android/ethernet-android.yaml
index e931f73..4cd5cd3 100644
--- a/android/ethernet-android.yaml
+++ b/android/ethernet-android.yaml
@@ -4,7 +4,7 @@ metadata:
description: "Ethernet test for Linaro Android build.
This test verifies if Ethernet is enabled and checks ping and packet loss."
maintainer:
- - botao.sun@linaro.org
+ - milosz.wasilewski@linaro.org
os:
- android
devices:
@@ -25,4 +25,4 @@ parse:
pattern: "(?P<test_case_id>[a-zA-Z0-9_-]+):\\s(?P<result>\\w+)"
fixupdict:
FAIL: fail
- PASS: pass \ No newline at end of file
+ PASS: pass
diff --git a/android/gator-data-streaming.yaml b/android/gator-data-streaming.yaml
index 358fb42..cbf51b4 100644
--- a/android/gator-data-streaming.yaml
+++ b/android/gator-data-streaming.yaml
@@ -6,7 +6,7 @@ metadata:
as a parameter to the gatord command to do a local capture and then depending upon
the output of this command, test results are generated."
maintainer:
- - botao.sun@linaro.org
+ - milosz.wasilewski@linaro.org
os:
- android
scope:
diff --git a/android/iozone2.yaml b/android/iozone2.yaml
new file mode 100644
index 0000000..695d333
--- /dev/null
+++ b/android/iozone2.yaml
@@ -0,0 +1,20 @@
+metadata:
+ name: iozone
+ format: "Lava-Test-Shell Test Definition 1.0"
+ description: "Run iozone test on sdcard"
+ maintainer:
+ - yongqin.liu@linaro.org
+ os:
+ - android
+ scope:
+ - performance
+ devices:
+ - juno
+
+params:
+ RECORD_RESULT_LOCAL: "FALSE"
+ LOOP_COUNT: "1"
+
+run:
+ steps:
+ - ./android/scripts/iozone2.sh --record-csv ${RECORD_RESULT_LOCAL} --loop-count ${LOOP_COUNT}
diff --git a/android/lava-android-test-host.yaml b/android/lava-android-test-host.yaml
index 1993a2a..7bc8642 100644
--- a/android/lava-android-test-host.yaml
+++ b/android/lava-android-test-host.yaml
@@ -26,11 +26,17 @@ install:
- pip install --upgrade setuptools
- cd lava-android-test
- python setup.py install
+ - apt-get install -y $JAVA_PACKAGE
deps:
- python-pip
- python-dev
- libyaml-dev
- unzip
+ - libc6:i386
+ - libncurses5:i386
+ - libstdc++6:i386
+ - android-tools-adb
+ - android-tools-fastboot
params:
TEST_NAME: "busybox"
@@ -44,13 +50,18 @@ run:
- apt-get install -y android-tools-adb android-tools-fastboot $JAVA_PACKAGE libc6:i386 libncurses5:i386 libstdc++6:i386
- lava-wait $TEST_NAME-${TEST_PARAMS// /_}-send-ip
- IPADDR=`awk -F '=' '{print $2}' /tmp/lava_multi_node_cache.txt`
- - adb connect $IPADDR
- - adb wait-for-device
+ - if [ $IPADDR != "_MISSING_" ]
+ - then
+ - ". ./android/scripts/adb_connect.sh $IPADDR"
+ - adb devices
+ - adb -s $IPADDR wait-for-device
- lava-android-test install $TEST_NAME
- if [[ $TEST_PARAMS != "" ]]; then lava-android-test run -o $TEST_NAME.results -O "$TEST_PARAMS" $TEST_NAME; fi
- if [[ $TEST_PARAMS == "" ]]; then lava-android-test run -o $TEST_NAME.results $TEST_NAME; fi
- lava-test-run-attach $TEST_NAME.results text/plain
- python android/scripts/parse-lat.py -f $TEST_NAME.results -t $TEST_NAME
+ - ps
+ - fi
- lava-sync $TEST_NAME-${TEST_PARAMS// /_}-finished
parse:
diff --git a/android/lava-android-test-target.yaml b/android/lava-android-test-target.yaml
index a705e0c..db27b47 100644..120000
--- a/android/lava-android-test-target.yaml
+++ b/android/lava-android-test-target.yaml
@@ -1,32 +1 @@
-metadata:
- name: lava-android-test-target
- format: "Lava-Test-Shell Test Definition 1.0"
- description: "Wrapper around lava-android-test. This is the target part.
- It sends the IP address of the target to host and than
- waits for the host to execute tests."
- maintainer:
- - milosz.wasilewski@linaro.org
- os:
- - android
- scope:
- - functional
- devices:
- - panda
- - panda-es
- - vexpress-a9
- - vexpress-tc2
- - wg
-
-params:
- TEST_NAME: "busybox"
- TEST_PARAMS: ""
-
-run:
- steps:
- - lava-test-case step1-cat-build-info --shell cat /system/build.prop
- - 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-stop-adbd --shell stop adbd
- - lava-test-case step5-start-adbd --shell start adbd
- - lava-test-case step6-send-ip --shell lava-send $TEST_NAME-${TEST_PARAMS// /_}-send-ip ipaddr=$(getprop dhcp.eth0.ipaddress)
- - lava-test-case step7-multinode-sync --shell lava-sync $TEST_NAME-${TEST_PARAMS// /_}-finished
+multinode-target.yaml \ No newline at end of file
diff --git a/android/meminfo.yaml b/android/meminfo.yaml
new file mode 100644
index 0000000..272913a
--- /dev/null
+++ b/android/meminfo.yaml
@@ -0,0 +1,22 @@
+metadata:
+ name: meminfo
+ format: "Lava-Test-Shell Test Definition 1.0"
+ description: "Collect the information in /proc/meminfo after boot."
+ maintainer:
+ - yongqin.liu@linaro.org
+ os:
+ - android
+ scope:
+ - functional
+ devices:
+ - juno, hikey
+
+run:
+ steps:
+ - sleep 300
+ - ./android/scripts/meminfo.sh
+ - cd /data/local/tmp
+ - if [ -f dumpsys-meminfo.txt ]; then lava-test-run-attach dumpsys-meminfo.txt text/plain; fi
+ - if [ -f proc-meminfo.txt ]; then lava-test-run-attach proc-meminfo.txt text/plain; fi
+parse:
+ pattern: "^(?P<test_case_id>\\w+),(?P<measurement>\\d+),(?P<units>\\w+),(?P<result>pass)$"
diff --git a/android/multinode-target.yaml b/android/multinode-target.yaml
new file mode 100644
index 0000000..0d2b62e
--- /dev/null
+++ b/android/multinode-target.yaml
@@ -0,0 +1,63 @@
+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:
+ TEST_NAME: "android-cts-5.0-armv8"
+ # 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 $TEST_NAME-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 $TEST_NAME-finished
+ - if [ -f /data/local/tmp/vmtf.log ]; then
+ - cd /data/local/tmp/ && gzip -c vmtf.log >vmtf.log.gz
+ - lava-test-run-attach /data/local/tmp/vmtf.log.gz application/x-gzip
+ - fi
diff --git a/android/pm-qa.yaml b/android/pm-qa.yaml
new file mode 100644
index 0000000..28b9710
--- /dev/null
+++ b/android/pm-qa.yaml
@@ -0,0 +1,24 @@
+metadata:
+ name: pm-qa
+ format: "Lava-Test-Shell Test Definition 1.0"
+ description: "Test power management (PM-QA). Currently, the test runs cpufreq, cpuidle, cpuhotplug, thermal
+ and cputopology by default and individual test can be run via JSON file too.
+ Test case documentation available in wiki: https://wiki.linaro.org/WorkingGroups/PowerManagement/Resources/TestSuite/PmQaSpecification"
+ maintainer:
+ - lisa.nguyen@linaro.org
+ os:
+ - android
+ scope:
+ - functional
+ - performance
+ devices:
+ - vexpress-a9
+ - vexpress-tc2
+ - juno
+
+run:
+ steps:
+ - './android/scripts/pm-qa.sh'
+
+parse:
+ pattern: "^(?P<test_case_id>[a-z0-9_]+):\\s+(?P<result>pass|fail|skip)"
diff --git a/android/scheduler_testssuites.yaml b/android/scheduler_testssuites.yaml
deleted file mode 100644
index f751fcf..0000000
--- a/android/scheduler_testssuites.yaml
+++ /dev/null
@@ -1,41 +0,0 @@
-metadata:
- name: big.LITTLE_Scheduler_tests
- version: 1.0
- format: "Lava-Test-Shell Test Definition 1.0"
- description: "big.LITTLE Scheduler tests: This test suite generates
- synthetic loads to validate the scheduler task placements
- functionality on big and little cores according to the load
- of the task. Test execution takes around 60 minutes"
- maintainer:
- - "naresh.kamboju@linaro.org"
- os:
- - "android"
- devices:
- - "vexpress-tc2"
- scope:
- - "functional"
- timeout: 6000
-
-install:
- steps:
- - "echo 0 > /sys/kernel/bL_switcher/active"
- - "mkdir /data/local/fts"
- - "cd /data/local/fts"
- - "wget http://people.linaro.org/~naresh.kamboju/scheduler_testrun.tar.gz"
- - "tar -xvzf scheduler_testrun.tar.gz"
- - "mv testrunner testrunner_back"
- - "cp testrunner_back/run_sched_tests.sh ."
- - "cp testrunner_back/testrunner ."
-
-run:
- steps:
- - "sh /data/local/fts/run_sched_tests.sh &> sched_output.log"
- - "cat sched_output.log | egrep -w 'succeeded|failed|deprecated'"
- - "lava-test-run-attach sched_output.log text/plain"
-
-parse:
- pattern: "^(?P<test_case_id>\\S+):\\s+(?P<result>\\S+)$"
- fixupdict:
- succeeded: pass
- failed: fail
- deprecated: skip
diff --git a/android/scripts/adb_connect.sh b/android/scripts/adb_connect.sh
new file mode 100755
index 0000000..1416c15
--- /dev/null
+++ b/android/scripts/adb_connect.sh
@@ -0,0 +1,8 @@
+#!/bin/sh
+echo "Checking IP address for $1"
+expr "$1" : '[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*$'
+if [ $? -eq 0 ]
+then
+ adb connect $1
+ IPADDR=$1:5555
+fi
diff --git a/android/scripts/bionic-benchmarks.sh b/android/scripts/bionic-benchmarks.sh
index b3d27fb..252bb4a 100755
--- a/android/scripts/bionic-benchmarks.sh
+++ b/android/scripts/bionic-benchmarks.sh
@@ -10,40 +10,26 @@ test_bionic_benchmark(){
echo "The specified $arch is not specified!"
return
fi
- local excluded_test=$2
local cmd="bionic-benchmarks${arch}"
if [ -n "$(which ${cmd})" ]; then
- for line in $(${cmd} --help 2>&1|grep BM_); do
- if [ -n "$excluded_test" ]; then
- if echo "${excluded_test}"|grep -q ${line}; then
- output_test_result "${arch}_${line}" "skip"
- continue
- fi
- fi
- local hasResult=false
- for res_line in $(${cmd} "^${line}$"|grep "BM_"|tr -s ' '|tr ' ' ','); do
- output_test_result "${arch}_${line}" "pass"
- local key=$(echo $res_line|cut -d, -f1|tr '/' '_')
- local iterations=$(echo $res_line|cut -d, -f2)
- local ns_time=$(echo $res_line|cut -d, -f3)
- local throughput=$(echo $res_line|cut -d, -f4)
- local throughput_units=$(echo $res_line|cut -d, -f5)
- output_test_result "${arch}_${key}_time" "pass" "${ns_time}" "ns/op"
- if [ -n "${throughput_units}" ];then
- output_test_result "${arch}_${key}_throught" "pass" "${throughput}" "${throughput_units}"
- fi
- hasResult=true
- done
- if ! $hasResult; then
- output_test_result "${arch}_${line}" "fail"
+ for res_line in $(${cmd}|grep "BM_"|tr -s ' '|tr ' ' ','); do
+ local key=$(echo $res_line|cut -d, -f1|tr '/' '_')
+ local iterations=$(echo $res_line|cut -d, -f2)
+ local ns_time=$(echo $res_line|cut -d, -f3)
+ local throughput=$(echo $res_line|cut -d, -f4)
+ local throughput_units=$(echo $res_line|cut -d, -f5)
+ output_test_result "${arch}_${key}" "pass"
+ output_test_result "${arch}_${key}_time" "pass" "${ns_time}" "ns/op"
+ if [ -n "${throughput_units}" ];then
+ output_test_result "${arch}_${key}_throught" "pass" "${throughput}" "${throughput_units}"
fi
done
fi
}
test_func(){
- test_bionic_benchmark "64" "BM_property_serial"
- test_bionic_benchmark "32" "BM_property_serial BM_property_read"
+ test_bionic_benchmark "64"
+ test_bionic_benchmark "32"
}
main(){
diff --git a/android/scripts/configure-nexus5x-for-benchmarks.sh b/android/scripts/configure-nexus5x-for-benchmarks.sh
new file mode 100755
index 0000000..d0cae4b
--- /dev/null
+++ b/android/scripts/configure-nexus5x-for-benchmarks.sh
@@ -0,0 +1,59 @@
+#!/bin/bash
+CPU_PATH="/sys/devices/system/cpu/cpu"
+
+set_online() {
+ local dirpath=$CPU_PATH$1/online
+ adb -s $IPADDR shell "echo 1 > $dirpath"
+}
+
+set_offline() {
+ local dirpath=$CPU_PATH$1/online
+ adb -s $IPADDR shell "echo 0 > $dirpath"
+}
+
+
+all_small() {
+ set_online 0; set_online 1; set_online 2; set_online 3;
+ set_offline 4; set_offline 5;
+}
+
+all_big() {
+ set_online 4; set_online 5;
+ set_offline 0; set_offline 1; set_offline 2; set_offline 3;
+}
+
+all_online() {
+ set_online 0; set_online 1; set_online 2;
+ set_online 3; set_online 4; set_online 5;
+}
+
+show_cpu() {
+ adb -s $IPADDR shell "cat /sys/devices/system/cpu/cpu*/online"
+}
+
+
+parse() {
+ case $1 in
+ small)
+ all_small
+ ;;
+ big)
+ all_big
+ ;;
+ default)
+ ;;
+ esac
+}
+
+set -x
+echo "configuring Nexus5X on: $IPADDR"
+adb -s $IPADDR wait-for-device
+adb -s $IPADDR root
+adb -s $IPADDR wait-for-device
+adb -s $IPADDR shell stop
+for n in {0..5}; do
+ adb -s $IPADDR shell "echo userspace > /sys/devices/system/cpu/cpu$n/cpufreq/scaling_governor"
+ adb -s $IPADDR shell "echo 1000000 > /sys/devices/system/cpu/cpu$n/cpufreq/scaling_min_freq"
+ adb -s $IPADDR shell "echo 1000000 > /sys/devices/system/cpu/cpu$n/cpufreq/scaling_max_freq"
+done
+parse "$@"
diff --git a/android/scripts/configure-nexus9-for-benchmarks.sh b/android/scripts/configure-nexus9-for-benchmarks.sh
new file mode 100755
index 0000000..d7de59c
--- /dev/null
+++ b/android/scripts/configure-nexus9-for-benchmarks.sh
@@ -0,0 +1,12 @@
+#!/bin/bash
+set -x
+echo "configuring Nexus9 on: $IPADDR"
+adb -s $IPADDR wait-for-device
+adb -s $IPADDR shell dumpsys battery
+adb -s $IPADDR shell stop
+adb -s $IPADDR shell "echo userspace > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor"
+sleep 2
+adb -s $IPADDR shell "echo 1224000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq"
+sleep 2
+adb -s $IPADDR shell "echo 1224000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq"
+sleep 2
diff --git a/android/scripts/cts.py b/android/scripts/cts.py
new file mode 100755
index 0000000..fab821f
--- /dev/null
+++ b/android/scripts/cts.py
@@ -0,0 +1,238 @@
+#!/usr/bin/env python
+#
+# CTS test for Linaro Android.
+#
+# Copyright (C) 2010 - 2015, Linaro Limited.
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+#
+# Author: Botao Sun <botao.sun@linaro.org>
+# Author: Milosz Wasilewski <milosz.wasilewski@linaro.org>
+# Author: Chase Qi <chase.qi@linaro.org>
+
+import datetime
+import gzip
+import os
+import sys
+import shlex
+import shutil
+import subprocess
+import threading
+import urllib
+import xml.etree.ElementTree as ET
+import zipfile
+import pexpect
+import time
+
+CTS_STDOUT = "cts_stdout.txt"
+CTS_LOGCAT = "cts_logcat.txt"
+
+
+class Command(object):
+ def __init__(self, cmd):
+ self.cmd = cmd
+ self.process = None
+
+ def run(self, timeout):
+ def target():
+ print '%s' % datetime.datetime.now()
+ self.process = subprocess.Popen(self.cmd, shell=True)
+ self.process.communicate()
+
+ thread = threading.Thread(target=target)
+ thread.start()
+
+ thread.join(timeout)
+ if thread.is_alive():
+ print 'Terminating process'
+ self.process.terminate()
+ thread.join()
+ return self.process.returncode
+
+
+class Heartbeat(threading.Thread):
+ def __init__(self, serial, process_list):
+ threading.Thread.__init__(self)
+ self.serial = serial
+ self.process_list = process_list
+ self.adb_ping = Command("adb -s %s shell echo \"OK\"" % serial)
+ self._finished = threading.Event()
+ self._interval = 30.0
+
+ def setInterval(self, interval):
+ self._interval = interval
+
+ def shutdown(self):
+ for process in self.process_list:
+ print "terminating process: %s" % process.pid
+ if process.poll() is None:
+ process.kill()
+ self._finished.set()
+
+ def run(self):
+ while 1:
+ if self._finished.isSet(): return
+ return_code = self.adb_ping.run(timeout=10)
+ if return_code != 0:
+ # terminate the test as adb connection is lost
+ print "terminating CTS for %s" % self.serial
+ for process in self.process_list:
+ print "terminating process: %s" % process.pid
+ if process.poll() is None:
+ process.kill()
+ self._finished.set()
+ else:
+ print "%s is alive" % self.serial
+ self._finished.wait(self._interval)
+
+
+# Switch to home path of current user to avoid any permission issue
+home_path = os.environ['HOME']
+# os.chdir(home_path)
+print os.getcwd()
+
+debug_switcher = False
+# def collect_result(testcase_id, result):
+# if debug_switcher is False:
+# subprocess.call(['lava-test-case', testcase_id, '--result', result])
+# else:
+# print ['lava-test-case', testcase_id, '--result', result]
+
+
+def result_parser(xml_file):
+ tree = ET.parse(xml_file)
+ # dump test result xml to stdout for debug
+ if debug_switcher is True:
+ ET.dump(tree)
+ root = tree.getroot()
+ print 'There are ' + str(len(root.findall('TestPackage'))) + ' Test Packages in this test result file: ' + xml_file
+ # testcase_counter = 0
+ for elem in root.findall('TestPackage'):
+ # Naming: Package Name + Test Case Name + Test Name
+ if 'abi' in elem.attrib.keys():
+ package_name = '.'.join([elem.attrib['abi'], elem.attrib['appPackageName']])
+ else:
+ package_name = elem.attrib['appPackageName']
+ tests_executed = len(elem.findall('.//Test'))
+ tests_passed = len(elem.findall('.//Test[@result="pass"]'))
+ tests_failed = len(elem.findall('.//Test[@result="fail"]'))
+ subprocess.call(['lava-test-case', package_name + '_executed', '--result', 'pass', '--measurement', str(tests_executed)])
+ subprocess.call(['lava-test-case', package_name + '_passed', '--result', 'pass', '--measurement', str(tests_passed)])
+ failed_result = 'pass'
+ if tests_failed > 0:
+ failed_result = 'fail'
+ subprocess.call(['lava-test-case', package_name + '_failed', '--result', failed_result, '--measurement', str(tests_failed)])
+ # leave the below code for now as commented
+ # might be used in future (unlikely)
+ # for testcase in elem.iter('TestCase'):
+ # testcase_name = testcase.attrib['name']
+ # for test in testcase.iter('Test'):
+ # testcase_counter = testcase_counter + 1
+ # test_name = test.attrib['name']
+ # testcase_id = '.'.join([package_name, testcase_name, test_name])
+ # result = test.attrib['result']
+ # collect_result(testcase_id, result)
+ # print 'There are ' + str(testcase_counter) + ' test cases in this test result file: ' + xml_file
+
+# download and extract the CTS zip package
+ctsurl = sys.argv[1]
+# ToDo this might fail and exit ungracefully
+ctsfile = urllib.urlretrieve(ctsurl, ctsurl.split('/')[-1])
+print "downloaded %s" % sys.argv[1]
+print "unzipping %s" % ctsurl.split('/')[-1]
+# ToDo this might fail and exit ungracefully
+with zipfile.ZipFile(ctsurl.split('/')[-1]) as z:
+ z.extractall()
+z.close()
+print "unzipped CTS package"
+os.chmod('android-cts/tools/cts-tradefed', 0755)
+
+target_device = sys.argv[2]
+# receive user input from JSON file and run
+cts_stdout = open(CTS_STDOUT, 'w')
+command = 'android-cts/tools/cts-tradefed ' + ' '.join([str(para) for para in sys.argv[3:]])
+print command
+cts_logcat_out = open(CTS_LOGCAT, 'w')
+cts_logcat_command = "adb logcat"
+cts_logcat = subprocess.Popen(shlex.split(cts_logcat_command), stdout=cts_logcat_out)
+
+if 'fvp' in open('/tmp/lava_multi_node_cache.txt').read():
+ # On Fast Models, CTS test will exit abnormally when pipe used(Bug 1904), use
+ # pexpect here as a work around.
+ child = pexpect.spawn(command, logfile=cts_stdout)
+ print 'Starting CTS %s test...' % command.split(' ')[4]
+ print 'Start time: %s' % datetime.datetime.now()
+ # Since fvp is slow, give it some time to start the test.
+ time.sleep(120)
+ # Send exit command to cts-tf shell, so that TF will exit when remaining
+ # tests complete.
+ try:
+ if not child.expect('cts-tf >'):
+ child.sendline('exit')
+ except pexpect.TIMEOUT:
+ subprocess.call(['lava-test-case', 'CTS-Command-Check', '--result', 'fail'])
+ print 'Failed to launch CTS shell, exiting...'
+ sys.exit(1)
+ while child.isalive():
+ # When expect([pexpect.EOF]) returns 0, isalive() will be set to Flase.
+ fvp_adb_check = subprocess.Popen(['adb', '-s', target_device, 'shell', 'echo', 'OK'])
+ if fvp_adb_check.wait() != 0:
+ print 'Terminating CTS test as adb connection is lost'
+ child.terminate(force=True)
+ subprocess.call(['lava-test-case', 'CTS-Command-Check', '--result', 'fail'])
+ break
+ try:
+ child.expect([pexpect.EOF], timeout=60)
+ except pexpect.TIMEOUT:
+ print '%s is running...' % command.split(' ')[4]
+ print 'End time: %s' % datetime.datetime.now()
+ cts_logcat.kill()
+else:
+ return_check = subprocess.Popen(shlex.split(command), stdout=cts_stdout)
+ # start heartbeat process
+ heartbeat = Heartbeat(target_device, [return_check, cts_logcat])
+ heartbeat.daemon = True
+ heartbeat.start()
+ if return_check.wait() != 0:
+ # even though the whole command may not run successfully, continue to submit the existing result anyway
+ # add test case CTS-Command-Check to indicate this incident
+ print 'CTS command: ' + command + ' run failed!'
+ # collect_result(testcase_id='CTS-Command-Check', result='fail')
+ subprocess.call(['lava-test-case', 'CTS-Command-Check', '--result', 'fail'])
+ heartbeat.shutdown()
+
+cts_logcat_out.close()
+cts_stdout.close()
+
+# compress then attach the CTS stdout file to LAVA bundle
+with open(CTS_STDOUT, 'rb') as f_in, gzip.open(CTS_STDOUT + '.gz', 'wb') as f_out:
+ shutil.copyfileobj(f_in, f_out)
+with open(CTS_LOGCAT, 'rb') as f_in, gzip.open(CTS_LOGCAT + '.gz', 'wb') as f_out:
+ shutil.copyfileobj(f_in, f_out)
+subprocess.call(['lava-test-run-attach', CTS_STDOUT + '.gz'])
+subprocess.call(['lava-test-run-attach', CTS_LOGCAT + '.gz'])
+
+# locate and parse the test result
+result_dir = 'android-cts/repository/results'
+test_result = 'testResult.xml'
+if os.path.exists(result_dir) and os.path.isdir(result_dir):
+ for root, dirs, files in os.walk(result_dir):
+ for name in files:
+ if name.endswith(".zip"):
+ subprocess.call(['lava-test-run-attach', os.path.join(root, name)])
+ if name == test_result:
+ result_parser(xml_file=os.path.join(root, name))
+# set exit code so LAVA can trust the results
+sys.exit(0)
diff --git a/android/scripts/gatortest.sh b/android/scripts/gatortest.sh
index e3331d5..4a72c6a 100755
--- a/android/scripts/gatortest.sh
+++ b/android/scripts/gatortest.sh
@@ -22,17 +22,9 @@
# owner: harigopal.gollamudi@linaro.org
#
###############################################################################
-
-if lsmod | grep "gator"
+if ps | grep "gatord"
then
- echo "gator_daemon_check=pass"
+ echo "gatord_daemon_check=pass"
else
- echo "gator_daemon_check=fail"
-fi
-
-if ps | grep "gator"
-then
- echo "gator_module_check=pass"
-else
- echo "gator_module_check=fail"
+ echo "gatord_daemon_check=fail"
fi
diff --git a/android/scripts/iozone/iozone.sh b/android/scripts/iozone/iozone.sh
index 5807d80..cb33b5f 100755
--- a/android/scripts/iozone/iozone.sh
+++ b/android/scripts/iozone/iozone.sh
@@ -31,8 +31,11 @@
# The original command with a -b gives excel results which are printed to
# stdout and can be parsed
-
-iozone_cmd="iozone -a -i 0 -i 2 -s 16m -V teststring "
-${iozone_cmd} > stdout.log 2>&1
-sh $PWD/iozoneparser.sh
-rm -rf stdout.log
+work_dir="/data/local/tmp"
+base_dir=$(cd $(dirname $0); pwd)
+cd "${work_dir}"
+file_stdout="${work_dir}/iozone_stdout.log"
+iozone_cmd="iozone -a -i 0 -i1 -i 2 -s 16m -V teststring "
+${iozone_cmd} > /data/local/tmp/iozone_stdout.log 2>&1
+sh ${base_dir}/iozoneparser.sh "${file_stdout}"
+#rm -rf stdout.log
diff --git a/android/scripts/iozone/iozoneparser.sh b/android/scripts/iozone/iozoneparser.sh
index c223903..aaef333 100755
--- a/android/scripts/iozone/iozoneparser.sh
+++ b/android/scripts/iozone/iozoneparser.sh
@@ -21,7 +21,16 @@
# Author: Harigopal Gollamudi <harigopal.gollamudi@linaro.org>
# Maintainer: Botao Sun <botao.sun@linaro.org>
-grep -A 13 "KB reclen write rewrite" stdout.log | sed '1d' > temp.log
+file_to_parse=$1
+if [ ! -f "${file_to_parse}" ]; then
+ echo "No file specified to parse"
+ exit 0
+fi
+work_dir="/data/local/tmp"
+cd "${work_dir}"
+
+file_tmp="${work_dir}/temp.log"
+grep -A 13 "kB reclen write rewrite" ${file_to_parse} | sed '1d' > "${file_tmp}"
while read line
do
@@ -42,6 +51,6 @@ do
echo $RandomWrite_string
echo $ReWrite_string
-done < temp.log
+done < "${file_tmp}"
-rm -rf temp.log
+rm -rf "${file_tmp}"
diff --git a/android/scripts/iozone2.sh b/android/scripts/iozone2.sh
new file mode 100755
index 0000000..681d699
--- /dev/null
+++ b/android/scripts/iozone2.sh
@@ -0,0 +1,98 @@
+#!/system/bin/sh
+#
+# iozone test
+#
+# Copyright (C) 2010 - 2014, Linaro Limited.
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+#
+# Author: Harigopal Gollamudi <harigopal.gollamudi@linaro.org>
+# Maintainer: Botao Sun <botao.sun@linaro.org>
+
+# $1 is the testing location. The -b must be specified for parser.
+# the file itself does not matter as it is not used.
+# The -b cause results reports to be printed to stdout.
+
+#uncomment the following and add cross compiled iozone to this directory.
+#mount -o remount,rw /
+#iozone_cmd=$1"/iozone -a -i 0 -i 2 -s 16m -V teststring -b iozone_results"
+
+# The original command with a -b gives excel results which are printed to
+# stdout and can be parsed
+
+local_file_path="$0"
+local_file_parent=$(cd $(dirname ${local_file_path}); pwd)
+. ${local_file_parent}/common.sh
+
+work_dir="/data/local/tmp"
+cd "${work_dir}"
+
+test_iozone(){
+ file_stdout="${work_dir}/iozone_stdout.log"
+ iozone_cmd="iozone -a -i 0 -i1 -i 2 -s 16m -V teststring "
+ ${iozone_cmd} > /data/local/tmp/iozone_stdout.log 2>&1
+ parse_output "${file_stdout}"
+ rm -rf "${file_stdout}"
+}
+
+parse_output(){
+ file_to_parse=$1
+ if [ ! -f "${file_to_parse}" ]; then
+ echo "No file specified to parse"
+ exit 0
+ fi
+
+ file_tmp="${work_dir}/temp.log"
+ grep -A 13 "kB reclen write rewrite" ${file_to_parse} | sed '1d' > "${file_tmp}"
+
+ while read line; do
+ var="$(echo $line | cut -d' ' -f2)"
+
+ Write_val="$(echo $line | cut -d' ' -f3)"
+ ReWrite_val="$(echo $line | cut -d' ' -f4)"
+ Read_val="$(echo $line | cut -d' ' -f5)"
+ Reread_val="$(echo $line | cut -d' ' -f6)"
+ RandomRead_val="$(echo $line | cut -d' ' -f7)"
+ RandomWrite_val="$(echo $line | cut -d' ' -f8)"
+
+ Write_string='iozone_Write_KB_16384_rclen'_$var' '$Write_val' 'Kbytes/sec' 'pass
+ RandomRead_string='iozone_Random_read_KB_16384_rclen'_$var' '$RandomRead_val' 'Kbytes/sec' 'pass
+ RandomWrite_string='iozone_Random_write_KB_16384_rclen'_$var' '$RandomWrite_val' 'Kbytes/sec' 'pass
+ ReWrite_string='iozone_Rewrite_KB_16384_rclen'_$var' '$ReWrite_val' 'Kbytes/sec' 'pass
+
+ echo $Write_string
+ echo $RandomRead_string
+ echo $RandomWrite_string
+ echo $ReWrite_string
+
+ output_test_result "iozone_Write_KB_16384_rclen_${var}" "pass" "${Write_val}" "Kbytes/sec"
+ output_test_result "iozone_Rewrite_KB_16384_rclen_${var}" "pass" "${ReWrite_val}" "Kbytes/sec"
+ output_test_result "iozone_Read_KB_16384_rclen_${var}" "pass" "${Write_val}" "Kbytes/sec"
+ output_test_result "iozone_Reread_KB_16384_rclen_${var}" "pass" "${ReWrite_val}" "Kbytes/sec"
+ output_test_result "iozone_Random_read_KB_16384_rclen_${var}" "pass" "${RandomRead_val}" "Kbytes/sec"
+ output_test_result "iozone_Random_write_KB_16384_rclen_${var}" "pass" "${RandomWrite_val}" "Kbytes/sec"
+
+ done < "${file_tmp}"
+
+ rm -rf "${file_tmp}"
+}
+
+
+main(){
+ var_test_func="test_iozone"
+ run_test "$@"
+}
+
+main "$@"
diff --git a/android/scripts/meminfo.sh b/android/scripts/meminfo.sh
new file mode 100755
index 0000000..f743e07
--- /dev/null
+++ b/android/scripts/meminfo.sh
@@ -0,0 +1,67 @@
+#!/system/bin/sh
+
+dir_res="/data/local/tmp"
+f_proc_mem="${dir_res}/proc-meminfo.txt"
+f_dumpsys_mem="${dir_res}/dumpsys-meminfo.txt"
+
+get_proc_meminfo(){
+ cat /proc/meminfo>${f_proc_mem}
+
+ while read line; do
+ line=$(echo ${line}|tr ': ' ','|tr -s ',')
+ unit=$(echo $line|cut -d, -f3)
+ if [ -n "${unit}" ]; then
+ echo "${line},pass"
+ else
+ echo ${line}
+ fi
+ done < ${f_proc_mem}
+}
+
+get_dumpsys_meminfo(){
+ dumpsys meminfo >${f_dumpsys_mem}
+ while read line; do
+ #Total RAM: 914468 kB (status normal)
+ if echo "${line}"|grep -q "Total RAM:"; then
+ local total_size=$(echo "${line}"|tr -d ':'|tr -s ' '|tr ' ' ','|cut -d, -f3)
+ local total_unit=$(echo "${line}"|tr -d ':'|tr -s ' '|tr ' ' ','|cut -d, -f4)
+ echo "dumpsys_total_ram,${total_size},${total_unit},pass"
+ fi
+ # Free RAM: 481904 kB (76380 cached pss + 313040 cached kernel + 92484 free)
+ #,Free,RAM,481904,kB,76380,cached,pss,313040,cached,kernel,92484,free
+ if echo "${line}"|grep -q "Free RAM:"; then
+ local unit=$(echo "${line}"|tr -d ':+()'|tr -s ' '|tr ' ' ','|cut -d, -f4)
+ local free_total_size=$(echo "${line}"|tr -d ':+()'|tr -s ' '|tr ' ' ','|cut -d, -f3)
+ local free_cached_pss_size=$(echo "${line}"|tr -d ':+()'|tr -s ' '|tr ' ' ','|cut -d, -f5)
+ local free_cached_kernel_size=$(echo "${line}"|tr -d ':+()'|tr -s ' '|tr ' ' ','|cut -d, -f8)
+ local free_free_size=$(echo "${line}"|tr -d ':+()'|tr -s ' '|tr ' ' ','|cut -d, -f11)
+ echo "dumpsys_free_total_ram,${free_total_size},${unit},pass"
+ echo "dumpsys_free_cached_pss_ram,${free_cached_pss_size},${unit},pass"
+ echo "dumpsys_free_cached_kernel_ram,${free_cached_kernel_size},${unit},pass"
+ echo "dumpsys_free_free_ram,${free_free_size},${unit},pass"
+ fi
+ # Used RAM: 368777 kB (313469 used pss + 55308 kernel)
+ if echo "${line}"|grep -q "Used RAM:"; then
+ local unit=$(echo "${line}"|tr -d ':+()'|tr -s ' '|tr ' ' ','|cut -d, -f4)
+ local used_total_size=$(echo "${line}"|tr -d ':+()'|tr -s ' '|tr ' ' ','|cut -d, -f3)
+ local used_pss_size=$(echo "${line}"|tr -d ':+()'|tr -s ' '|tr ' ' ','|cut -d, -f5)
+ local used_kernel_size=$(echo "${line}"|tr -d ':+()'|tr -s ' '|tr ' ' ','|cut -d, -f8)
+ echo "dumpsys_used_total_ram,${used_total_size},${unit},pass"
+ echo "dumpsys_used_pss_ram,${used_pss_size},${unit},pass"
+ echo "dumpsys_used_kernel_ram,${used_kernel_size},${unit},pass"
+ fi
+ # Lost RAM: 63787 kB
+ if echo "${line}"|grep -q "Lost RAM:"; then
+ local lost_size=$(echo "${line}"|tr -d ':'|tr -s ' '|tr ' ' ','|cut -d, -f3)
+ local lost_unit=$(echo "${line}"|tr -d ':'|tr -s ' '|tr ' ' ','|cut -d, -f4)
+ echo "dumpsys_lost_ram,${lost_size},${lost_unit},pass"
+ fi
+ done < ${f_dumpsys_mem}
+}
+
+main(){
+ get_proc_meminfo
+ get_dumpsys_meminfo
+}
+
+main "$@"
diff --git a/android/scripts/parse-ubenchmarks-results.sh b/android/scripts/parse-ubenchmarks-results.sh
new file mode 100755
index 0000000..f27955c
--- /dev/null
+++ b/android/scripts/parse-ubenchmarks-results.sh
@@ -0,0 +1,15 @@
+sed -n '/-----------------/,$p' $1 > results.txt
+grep -i "benchmark" results.txt > res.txt
+sed -i "s/benchmarks\/micro\///g" res.txt
+sed -i "s/\./-/" res.txt
+while IFS= read -r score; do
+for i in 1 2 3 4 5 6
+do
+export param_$i=`echo $score | awk -v x=$i '{print $x}'`
+done
+lava-test-case $param_1-$MODE.min --result pass --measurement $param_2
+lava-test-case $param_1-$MODE.max --result pass --measurement $param_3
+lava-test-case $param_1-$MODE.mean --result pass --measurement $param_4
+lava-test-case $param_1-$MODE.stdev --result pass --measurement $param_5
+lava-test-case $param_1-$MODE.stdev% --result pass --measurement $param_6
+done < res.txt
diff --git a/android/scripts/pm-qa.sh b/android/scripts/pm-qa.sh
new file mode 100755
index 0000000..4499d0a
--- /dev/null
+++ b/android/scripts/pm-qa.sh
@@ -0,0 +1,50 @@
+#!/system/bin/sh
+
+scripts_dir="/system/bin/pm-qa"
+test_func(){
+ if [ ! -d "${scripts_dir}" ]; then
+ echo "pm-qa=fail"
+ exit
+ fi
+
+ cd "${scripts_dir}"
+
+ pwd_dir=$PWD
+ tests_dirs="cpuidle cpufreq cpuhotplug cputopology thermal"
+
+ for dir in $tests_dirs; do
+ var=$dir'_sanity.sh'
+ subDir=${pwd_dir}/$dir
+ if [ -d $subDir ]; then
+ cd $subDir
+ else
+ continue
+ fi
+
+ /system/bin/sh $var
+ if [ $? -ne 1 ]; then
+ continue
+ fi
+
+ filelist=$(find . -name "*.sh" | sort)
+ for file in $filelist; do
+ path=$file
+ /system/bin/sh $path
+ done
+ cd ..
+ done
+
+ # Find instances of cpuidle_killer and kill
+ # all pids associated with it until a better
+ # solution comes up.
+ pids=$(pidof "cpuidle_killer")
+
+ for pid in $pids; do
+ kill -9 $pid
+ done
+
+ echo "pm-qa=pass"
+}
+
+test_func
+exit
diff --git a/android/scripts/tjbench.sh b/android/scripts/tjbench.sh
index 3e1643c..3d8ae81 100755
--- a/android/scripts/tjbench.sh
+++ b/android/scripts/tjbench.sh
@@ -29,7 +29,7 @@ func_tjbench(){
if [ -n "$*" ]; then
key="${key}_$*"
fi
- key=$(echo $key|tr ',' '_'|tr -d ':()/')
+ key=$(echo $key|tr ', ' '_'|tr -d ':()/')
output_test_result "${key}_CompPerf" "pass" "${compPerf}" "Mpixels/sec"
output_test_result "${key}_CompRatio" "pass" "${compRatio}" "%"
diff --git a/android/sd-mmc.yaml b/android/sd-mmc.yaml
index 40a9634..cb2e456 100644
--- a/android/sd-mmc.yaml
+++ b/android/sd-mmc.yaml
@@ -4,7 +4,7 @@ metadata:
description: "Test SD MMC on Linaro Android. The test checks for availability of external
storage device, runs df command to check partition and tries to write on sd card."
maintainer:
- - botao.sun@linaro.org
+ - milosz.wasilewski@linaro.org
os:
- android
devices: