diff options
author | Milosz Wasilewski <milosz.wasilewski@linaro.org> | 2018-06-21 11:38:11 +0100 |
---|---|---|
committer | Milosz Wasilewski <milosz.wasilewski@linaro.org> | 2018-06-21 11:38:11 +0100 |
commit | 4e6ef8abf0d67985340442b6ef957f4effc8c957 (patch) | |
tree | 03ca5963e134f250a90c91c5493380750f3417a0 | |
parent | 034b0225a68fc7814529bd428da49c881cfd70b9 (diff) |
android: common: remove deprecated tests and scripts
Change-Id: If0699e2843e019480a61e62aeae94918989c040a
Signed-off-by: Milosz Wasilewski <milosz.wasilewski@linaro.org>
163 files changed, 0 insertions, 8694 deletions
diff --git a/android/0xbench.yaml b/android/0xbench.yaml deleted file mode 100644 index 95b04ff9..00000000 --- a/android/0xbench.yaml +++ /dev/null @@ -1,24 +0,0 @@ -metadata: - name: 0xbench - format: "Lava-Test Test Definition 1.0" - description: "0xbench integrates a series of benchmarks for Android system into the comprehensive benchmark suite. - The test suite constitutes of OpenGL|ES, 2D Canvas, 3D graphics, C library and System call." - maintainer: - - harigopal.gollamudi@linaro.org - os: - - android - scope: - - performance - devices: - - arndale - - panda - - panda-es - - vexpress-a9 - - vexpress-tc2 - -run: - steps: - - "./android/scripts/0xbench/0xbench.sh" - -parse: - pattern: "^(?P<test_case_id>\\S*\\s*\\S+)\\s+(?P<measurement>[\\d\\.]+)\\s+(?P<units>\\S+)\\s+(?P<result>\\S+)$" diff --git a/android/art-microbenchmarks.yaml b/android/art-microbenchmarks.yaml deleted file mode 100644 index 78418dee..00000000 --- a/android/art-microbenchmarks.yaml +++ /dev/null @@ -1,51 +0,0 @@ -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/bigLITTLE.yaml b/android/bigLITTLE.yaml deleted file mode 100644 index d3dd6317..00000000 --- a/android/bigLITTLE.yaml +++ /dev/null @@ -1,24 +0,0 @@ -metadata: - format: "Lava-Test-Shell Test Definition 1.0" - name: bigLITTLE - description: "This test suite covers big.LITTLE switching functionality and stress tests. The main focus is to test - big.LITTLE switching while system switches its cores from A15 to A7 and vice versa." - os: - - android - scope: - - functional - devices: - - vexpress-tc2 - maintainer: - - harigopal.gollamudi@linaro.org - - naresh.kamboju@linaro.org - -run: - steps: - - "./android/scripts/bigLITTLE/bigLITTLE.sh" - -parse: - pattern: "^(?P<test_case_id>\\S+)\\s+:\\s+(?P<result>\\S+)$" - fixupdict: - PASS: pass - FAIL: fail diff --git a/android/binder.yaml b/android/binder.yaml deleted file mode 100644 index ac39ffc8..00000000 --- a/android/binder.yaml +++ /dev/null @@ -1,26 +0,0 @@ -metadata: - name: binder - format: "Lava-Test-Shell Test Definition 1.0" - description: "Binder test's uses binderAddInts to measures the rate at which a short - binder IPC operation can be performed. The test consist of a client sending - a parcel containing two integers to server which in turn adds the two integers - and sends the sum back to client." - os: - - android - scope: - - functional - devices: - - arndale - - panda - - vexpress-a9 - - vexpress-tc2 - - juno - maintainer: - - amit.pundir@linaro.org - -run: - steps: - - "./android/scripts/binder.sh" - -parse: - pattern: "^(?P<test_case_id>.*)=(?P<result>.*)" diff --git a/android/bionic-benchmark.yaml b/android/bionic-benchmark.yaml deleted file mode 100644 index e6f522fd..00000000 --- a/android/bionic-benchmark.yaml +++ /dev/null @@ -1,20 +0,0 @@ -metadata: - name: bionic-benchmarks-with-units - format: "Lava-Test-Shell Test Definition 1.0" - description: "collect the bionic-benchmarks data and try to analyse" - maintainer: - - yongqin.liu@linaro.org - os: - - android - scope: - - performance - devices: - - juno - -params: - RECORD_RESULT_LOCAL: "FALSE" - LOOP_COUNT: "1" - -run: - steps: - - ./android/scripts/bionic-benchmarks.sh --record-csv ${RECORD_RESULT_LOCAL} --loop-count ${LOOP_COUNT} diff --git a/android/bionic_libc_tests.yaml b/android/bionic_libc_tests.yaml deleted file mode 100644 index 42baf260..00000000 --- a/android/bionic_libc_tests.yaml +++ /dev/null @@ -1,23 +0,0 @@ -metadata: - name: bionic_libc_tests - format: "Lava-Test-Shell Test Definition 1.0" - description: "This test suite checks Bionic libc routines for android. NOTE: this test will be replaced - with the cts test after migration." - maintainer: - - yongqin.liu@linaro.org - os: - - android - scope: - - functional - devices: - - juno - -run: - steps: - - /system/bin/run-bionic-tests.sh - -parse: - pattern: "(?P<test_case_id>.*-*)\\s+:\\s+(?P<result>(PASS|FAIL))" - fixupdict: - PASS: pass - FAIL: fail diff --git a/android/bootchart.yaml b/android/bootchart.yaml deleted file mode 100644 index ac4f7db6..00000000 --- a/android/bootchart.yaml +++ /dev/null @@ -1,20 +0,0 @@ -metadata: - name: bootchart - format: "Lava-Test-Shell Test Definition 1.0" - description: "collect the bootchart data and try to analyse" - maintainer: - - yongqin.liu@linaro.org - os: - - android - scope: - - functional - devices: - - juno - -params: - OPERATION: "stop" - BOOTCHART_TIME: "120" - -run: - steps: - - ./android/scripts/bootchart.sh $OPERATION $BOOTCHART_TIME diff --git a/android/boottime.yaml b/android/boottime.yaml deleted file mode 100644 index 2e65c44f..00000000 --- a/android/boottime.yaml +++ /dev/null @@ -1,18 +0,0 @@ -metadata: - name: android-boottime - format: "Lava-Test-Shell Test Definition 1.0" - description: "Checks android boot time to UI - It relies on the dmesg and logcat information" - maintainer: - - milosz.wasilewski@linaro.org - - yongqin.liu@linaro.org - os: - - android - scope: - - functional - devices: - - juno - -run: - steps: - - "./android/scripts/boot_time.sh" diff --git a/android/boottime2.yaml b/android/boottime2.yaml deleted file mode 100644 index b4044bde..00000000 --- a/android/boottime2.yaml +++ /dev/null @@ -1,24 +0,0 @@ -metadata: - name: boottime2 - format: "Lava-Test-Shell Test Definition 1.0" - description: "collect the boottime data many times and try to analyse, - when run more than 4 times(including), the average will be - calculated without the maximum and the minmun, if run less - than or equal to 3 time, the average will be calculated with - all data" - maintainer: - - yongqin.liu@linaro.org - os: - - android - scope: - - performance - devices: - - juno - -params: - OPERATION: "COLLECT" - COLLECT_NO: "1" - -run: - steps: - - ./android/scripts/boottime2.sh ${OPERATION} ${COLLECT_NO} diff --git a/android/busybox.yaml b/android/busybox.yaml deleted file mode 100644 index 5e002163..00000000 --- a/android/busybox.yaml +++ /dev/null @@ -1,25 +0,0 @@ -metadata: - name: busybox - format: "Lava-Test-Shell Test Definition 1.0" - description: "BusyBox combines tiny versions of many common UNIX utilities into a single small executable Test. Busybox for android - covers test's like mkdir, touch, ls, ps, whoami, which, basename, cp, rm, dmesg and grep." - maintainer: - - senthil.kumaran@linaro.org - - amit.pundir@linaro.org - os: - - android - scope: - - functional - devices: - - arndale - - panda - - panda-es - - vexpress-a9 - - vexpress-tc2 - -run: - steps: - - "./android/scripts/busybox.sh" - -parse: - pattern: "^(?P<test_case_id>.*)=(?P<result>.*)" diff --git a/android/cachecoherency.yaml b/android/cachecoherency.yaml deleted file mode 100644 index 2e08b6c2..00000000 --- a/android/cachecoherency.yaml +++ /dev/null @@ -1,27 +0,0 @@ -metadata: - format: "Lava-Test Test Definition 1.0" - name: cachecoherency. - description: "Cachecoherency test for android tries to maximize randomized traffic to memory from processor and I/O using - stressapptest." - maintainer: - - harigopal.gollamudi@linaro.org - os: - - android - scope: - - functional - devices: - - arndale - - panda - - panda-es - - vexpress-a9 - - vexpress-tc2 - -run: - steps: - - "./android/scripts/cachecoherency.sh" - -parse: - pattern: "^(?P<test_case_id>\\S+)\\s*:\\s*(?P<result>\\w+)\\s*-\\s*\\S*\\s*\\S*\\s*\\S*\\s*\\S*\\s*\\S*$" - fixupdict: - PASS: pass - FAIL: fail diff --git a/android/cts-host.yaml b/android/cts-host.yaml deleted file mode 100644 index 5da83730..00000000 --- a/android/cts-host.yaml +++ /dev/null @@ -1,56 +0,0 @@ -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: - - dpkg --add-architecture i386 - - apt-get update - - ./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 - # increase the heap size. KVM devices in LAVA default to ~250M of heap - - export _JAVA_OPTIONS="-Xmx350M" - - java -version - - ./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 deleted file mode 120000 index db27b472..00000000 --- a/android/cts-target.yaml +++ /dev/null @@ -1 +0,0 @@ -multinode-target.yaml
\ No newline at end of file diff --git a/android/devicetree-android.yaml b/android/devicetree-android.yaml deleted file mode 100644 index 67ccf2da..00000000 --- a/android/devicetree-android.yaml +++ /dev/null @@ -1,33 +0,0 @@ -metadata: - name: device-tree - 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: - - panda - - panda-es - - vexpress-a9 - - vexpress-tc2 - - rtsm_foundation-armv8 - - rtsm_fvp_base-aemv8a - - arndale - - aa9 - - juno - scope: - - functional - environment: - - lava-test-shell - -run: - steps: - - "./android/scripts/devicetree-android.sh" - -parse: - pattern: "(?P<test_case_id>[a-zA-Z0-9_-]+):\\s(?P<result>\\w+)" - fixupdict: - FAIL: fail - PASS: pass diff --git a/android/ethernet-android.yaml b/android/ethernet-android.yaml deleted file mode 100644 index 4cd5cd34..00000000 --- a/android/ethernet-android.yaml +++ /dev/null @@ -1,28 +0,0 @@ -metadata: - name: ethernet-android - format: "Lava-Test-Shell Test Definition 1.0" - description: "Ethernet test for Linaro Android build. - This test verifies if Ethernet is enabled and checks ping and packet loss." - maintainer: - - milosz.wasilewski@linaro.org - os: - - android - devices: - - panda - - panda-es - - vexpress-a9 - - vexpress-tc2 - - arndale - - juno - scope: - - functional - -run: - steps: - - "./android/scripts/ethernet-android.sh" - -parse: - pattern: "(?P<test_case_id>[a-zA-Z0-9_-]+):\\s(?P<result>\\w+)" - fixupdict: - FAIL: fail - PASS: pass diff --git a/android/gator-data-streaming.yaml b/android/gator-data-streaming.yaml deleted file mode 100644 index cbf51b4b..00000000 --- a/android/gator-data-streaming.yaml +++ /dev/null @@ -1,30 +0,0 @@ -metadata: - name: gator-data-streaming - format: "Lava-Test-Shell Test Definition 1.0" - description: "Gator Data Streaming Test checks DS5 profiling feature for Android builds. The - test creates a sample session XML file called 'session.xml', this file is passed - 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: - - milosz.wasilewski@linaro.org - os: - - android - scope: - - functional - devices: - - arndale - - panda - - panda-es - - vexpress-a9 - - vexpress-tc2 - - juno - -run: - steps: - - "./android/scripts/gator-data-streaming.sh" - -parse: - pattern: "(?P<test_case_id>[a-zA-Z0-9_-]+):\\s(?P<result>\\w+)" - fixupdict: - FAIL: fail - PASS: pass diff --git a/android/gatortest.yaml b/android/gatortest.yaml deleted file mode 100644 index 9227fbcc..00000000 --- a/android/gatortest.yaml +++ /dev/null @@ -1,25 +0,0 @@ -metadata: - format: "Lava-Test Test Definition 1.0" - name: gatortest - description: "Gatortest for android checks availability of gator daemon and module on target which - is required to enable profiling between host and target machines." - maintainer: - - harigopal.gollamudi@linaro.org - os: - - android - scope: - - functional - devices: - - arndale - - panda - - panda-es - - vexpress-a9 - - vexpress-tc2 - - juno - -run: - steps: - - "./android/scripts/gatortest.sh" - -parse: - pattern: "^(?P<test_case_id>\\w+)=(?P<result>\\w+)$" diff --git a/android/glmark2.yaml b/android/glmark2.yaml deleted file mode 100644 index 9791cd7d..00000000 --- a/android/glmark2.yaml +++ /dev/null @@ -1,23 +0,0 @@ -metadata: - format: "Lava-Test Test Definition 1.0" - name: glmark2 - description: "Glmark2 test for android is an OpenGL 2.0 and ES 2.0 benchmark. The Glmark2 test suite is used to - measure different aspects of OpenGL (ES) 2.0 performance like video, graphics and display." - maintainer: - - harigopal.gollamudi@linaro.org - os: - - android - scope: - - performance - devices: - - arndale - - panda - - panda-es - - juno - -run: - steps: - - "./android/scripts/glmark2.sh" - -parse: - pattern: "^\\(\\s+\\d*\\):\\s+(?P<test_case_id>\\S+)\\:\\s(?P<units>\\S+):\\s(?P<measurement>[\\d.]+)\\s+\\S+:\\s[\\d.]+\\s\\S+\\s(?P<result>\\S+)" diff --git a/android/gtest.yaml b/android/gtest.yaml deleted file mode 100644 index 2f152b0f..00000000 --- a/android/gtest.yaml +++ /dev/null @@ -1,28 +0,0 @@ -metadata: - name: gtest - format: "Lava-Test-Shell Test Definition 1.0" - description: "Run gtest based tests on Android" - maintainer: - - chase.qi@linaro.org - - milosz.wasilewski@linaro.org - os: - - android - scope: - - functional - devices: - - panda - - panda-es - - juno - - vexpress-a9 - - vexpress-tc2 - - ifc6410 - -params: - # Use absolute path and modify the TESTS parameter in test plan to run other or 64bit test programs. - TESTS: '/data/nativetest/ion-unit-tests/ion-unit-tests /data/nativetest/backtrace_test/backtrace_test' - # Change the value of LOOPS parameter in test plan to run test program multiple times. - LOOPS: 1 - -run: - steps: - - ./android/scripts/gtest.sh "$TESTS" $LOOPS diff --git a/android/homescreen.yaml b/android/homescreen.yaml deleted file mode 100644 index 38ff6468..00000000 --- a/android/homescreen.yaml +++ /dev/null @@ -1,24 +0,0 @@ -metadata: - name: homescreen - format: "Lava-Test-Shell Test Definition 1.0" - description: "Test to check if the homescreen is up for Linaro android builds." - maintainer: - - vishal.bhoj@linaro.org - os: - - android - scope: - - functional - devices: - - arndale - - panda - - panda-es - - vexpress-a9 - - vexpress-tc2 - - juno - -run: - steps: - - "./android/scripts/homescreen.sh" - -parse: - pattern: "^(?P<test_case_id>.*)=(?P<result>.*)" diff --git a/android/ime.yaml b/android/ime.yaml deleted file mode 100644 index ae1922d1..00000000 --- a/android/ime.yaml +++ /dev/null @@ -1,24 +0,0 @@ -metadata: - format: "Lava-Test Test Definition 1.0" - name: ime - description: "IME test for linaro android builds checks for all available input method editors." - maintainer: - - harigopal.gollamudi@linaro.org - os: - - android - scope: - - functional - devices: - - arndale - - panda - - panda-es - - vexpress-a9 - - vexpress-tc2 - - juno - -run: - steps: - - "./android/scripts/ime.sh" - -parse: - pattern: "^(?P<test_case_id>ime)=(?P<result>\\w+)$" diff --git a/android/installapk.yaml b/android/installapk.yaml deleted file mode 100644 index af66a560..00000000 --- a/android/installapk.yaml +++ /dev/null @@ -1,39 +0,0 @@ -metadata: - name: install-apk - format: "Lava-Test-Shell Test Definition 1.0" - description: "The script installs apk on the target device" - maintainer: - - milosz.wasilewski@linaro.org - os: - - ubuntu - devices: - - kvm - scope: - - functional - -install: - deps: - - wget - - android-tools-adb - -params: - TEST_NAME: "installchromium" - DOWNLOAD_URL: "" - -run: - steps: - - 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" - - adb devices - - adb -s $IPADDR wait-for-device - - if [ ! -z $DOWNLOAD_URL ] - - then - - lava-test-case download-apk --shell wget -O test.apk $DOWNLOAD_URL - - lava-test-case install-apk --shell adb -s $IPADDR install test.apk - - fi - - adb disconnect - - fi - - lava-sync $TEST_NAME-finished diff --git a/android/iozone.yaml b/android/iozone.yaml deleted file mode 100644 index 98a7a14a..00000000 --- a/android/iozone.yaml +++ /dev/null @@ -1,26 +0,0 @@ -metadata: - format: "Lava-Test Test Definition 1.0" - name: iozone - description: "Iozone test for linaro android is a filesystem benchmark tool. The benchmark - tests file I/O performance for Read, write, re-read, re-write, read backwards, - read strided, fread, fwrite, random read, pread ,mmap, aio_read and aio_write." - maintainer: - - harigopal.gollamudi@linaro.org - os: - - android - scope: - - performance - devices: - - arndale - - panda - - panda-es - - vexpress-a9 - - vexpress-tc2 - - juno - -run: - steps: - - "./android/scripts/iozone/iozone.sh" - -parse: - pattern: "^(?P<test_case_id>\\w+)\\s+(?P<measurement>\\d+)\\s+(?P<units>\\S+)\\s+(?P<result>\\w+)$" diff --git a/android/lava-android-test-host.yaml b/android/lava-android-test-host.yaml deleted file mode 100644 index b9f45b8f..00000000 --- a/android/lava-android-test-host.yaml +++ /dev/null @@ -1,65 +0,0 @@ -metadata: - name: lava-android-test-host - format: "Lava-Test-Shell Test Definition 1.0" - description: "Wrapper around lava-android-test. This is the host part. - It runs on KVM device type in LAVA and installs lava-android-test - on it. Tests are executed using TEST_NAME parameter. Default - test tu run is 'busybox'. Optional test parameters are - specified using TEST_PARAMS parameter. There is optional - JAVA_PACKAGE parameter to be used in case different - Java version is needed. It defaults to openjdk-6-jre-headless. - This test definition should be run on Ubuntu images." - maintainer: - - milosz.wasilewski@linaro.org - os: - - android - scope: - - functional - devices: - - kvm - -install: - git-repos: - - http://git.linaro.org/git/lava/lava-android-test.git - steps: - # workaround to outdated setuptools in 14.04 image - - 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" - TEST_PARAMS: "" - JAVA_PACKAGE: "openjdk-6-jre-headless" - -run: - steps: - - lava-wait $TEST_NAME-${TEST_PARAMS// /_}-send-ip - - IPADDR=`awk -F '=' '{print $2}' /tmp/lava_multi_node_cache.txt` - - 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: - pattern: "^TESTCASE:\\s(?P<test_case_id>\\S+)\\s-\\s(?P<result>\\w+)" diff --git a/android/lava-android-test-target.yaml b/android/lava-android-test-target.yaml deleted file mode 120000 index db27b472..00000000 --- a/android/lava-android-test-target.yaml +++ /dev/null @@ -1 +0,0 @@ -multinode-target.yaml
\ No newline at end of file diff --git a/android/libc-bench.yaml b/android/libc-bench.yaml deleted file mode 100644 index fd64f492..00000000 --- a/android/libc-bench.yaml +++ /dev/null @@ -1,23 +0,0 @@ -metadata: - name: libc-bench - format: "Lava-Test-Shell Test Definition 1.0" - description: "Run libc-bench command to benchmark the - performance of bionic. - The source is here now: - git://android.git.linaro.org/platform/external/libc-bench" - maintainer: - - yongqin.liu@linaro.org - os: - - android - scope: - - performance - devices: - - juno - -params: - RECORD_RESULT_LOCAL: "FALSE" - LOOP_COUNT: "1" - -run: - steps: - - ./android/scripts/libc-bench.sh --record-csv ${RECORD_RESULT_LOCAL} --loop-count ${LOOP_COUNT} diff --git a/android/linaro_android_kernel_test.yaml b/android/linaro_android_kernel_test.yaml deleted file mode 100644 index 5f347625..00000000 --- a/android/linaro_android_kernel_test.yaml +++ /dev/null @@ -1,25 +0,0 @@ -metadata: - name: linaro_android_kernel_test - format: "Lava-Test-Shell Test Definition 1.0" - description: "Linaro Android kernel test suite comprises of kernel feature tests which are uniquie to android. - The test suite runs following kernel tests: ashmem, ashmem-expanded, alarmdev, logger, binder, - sync, vfat, evdev and swp-swpb." - maintainer: - - yongqin.liu@linaro.org - os: - - android - scope: - - functional - devices: - - juno - -run: - steps: - - /system/bin/linaro-android-kernel-tests.sh - -parse: - pattern: "^\\[(?P<test_case_id>\\w+)\\]:\\s*test\\s*(?P<result>\\w+)" - fixupdict: - passed: pass - failed: fail - skipped: skip diff --git a/android/media_codecs_functional_tests.yaml b/android/media_codecs_functional_tests.yaml deleted file mode 100644 index 15948bcb..00000000 --- a/android/media_codecs_functional_tests.yaml +++ /dev/null @@ -1,26 +0,0 @@ -metadata: - name: media_codecs_functional_tests - format: "Lava-Test-Shell Test Definition 1.0" - description: "Media functional codecs test suite for linaro android verifies arm based audio/video software - codecs available in Android AOSP release. These codecs are used in implementation of SW based - OMX decoders. Some of these codecs are developed by Google like VP8/VP9 and some others by - third parties like PacketVideo for mp3." - maintainer: - - edmund.szeto@linaro.org - os: - - android - scope: - - functional - devices: - - juno - -run: - steps: - - "./android/scripts/media_codecs_functional_tests.sh" - -parse: - pattern: "^\\[(?P<test_case_id>\\w+)\\]:\\s*test\\s*(?P<result>\\w+)" - fixupdict: - passed: pass - failed: fail - skipped: skip diff --git a/android/meminfo.yaml b/android/meminfo.yaml deleted file mode 100644 index 272913a5..00000000 --- a/android/meminfo.yaml +++ /dev/null @@ -1,22 +0,0 @@ -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/memtester.yaml b/android/memtester.yaml deleted file mode 100644 index 45848cb9..00000000 --- a/android/memtester.yaml +++ /dev/null @@ -1,25 +0,0 @@ -metadata: - format: "Lava-Test Test Definition 1.0" - name: memtester - description: "Memtester for android is userspace utility to test for faulty memory subsystem - or faulty memory modules. The test checks 1MB of memory and runs all tests once." - maintainer: - - harigopal.gollamudi@linaro.org - os: - - android - scope: - - functional - devices: - - arndale - - panda - - panda-es - - vexpress-a9 - - vexpress-tc2 - - juno - -run: - steps: - - "./android/scripts/memtester.sh" - -parse: - pattern: "^(?P<test_case_id>\\w+\\s+\\w+)\\s*:\\s+(?P<result>\\w+)$" diff --git a/android/mmtest.yaml b/android/mmtest.yaml deleted file mode 100644 index 4c27b43e..00000000 --- a/android/mmtest.yaml +++ /dev/null @@ -1,26 +0,0 @@ -metadata: - format: "Lava-Test Test Definition 1.0" - name: mmtest - description: "Multimedia Framework Test for android. The test downloads sample audio, video and videoeditor - media into sdcard and runs all instrumentation framework test under com.android.mediaframeworktest - package with downloaded media." - maintainer: - - harigopal.gollamudi@linaro.org - os: - - android - scope: - - functional - devices: - - arndale - - panda - - panda-es - - vexpress-a9 - - vexpress-tc2 - - juno - -run: - steps: - - "./android/scripts/mmtest.sh" - -parse: - pattern: "^\\s*(?P<test_case_id>test\\w+)\\s+(?P<result>\\w+)\\s*$" diff --git a/android/monkey_long_run.yaml b/android/monkey_long_run.yaml deleted file mode 100644 index 819bd49d..00000000 --- a/android/monkey_long_run.yaml +++ /dev/null @@ -1,27 +0,0 @@ -metadata: - name: monkey_long_run - format: "Lava-Test-Shell Test Definition 1.0" - description: "Monkey long run performs stress testing for stability using monkey command which - generates pesudo-random streams of user events such as clicks, touches, or gestures - as well as some system level events. Currently, monkey long run test runs with a set - blacklist packages which are known to fail." - maintainer: - - yongqin.liu@linaro.org - os: - - android - scope: - - functional - devices: - - juno - -params: - BLACK_LIST: "/data/juno_monkey_blacklist" - EVENT_COUNT: "30000" - -run: - steps: - - lava-test-case run-monkey --shell monkey -s 1 --pct-touch 10 --pct-motion 20 --pct-nav 20 --pct-majornav 30 --pct-appswitch 20 --throttle 500 --pkg-blacklist-file $BLACK_LIST $EVENT_COUNT -parse: - pattern: "## Network (?P<test_case_id>stats):\\s(?P<result>elapsed)\\stime=(?P<measurement>\\d+)(?P<units>ms)" - fixupdict: - elapsed: pass diff --git a/android/multinode-target.yaml b/android/multinode-target.yaml deleted file mode 100644 index 33dc7d2b..00000000 --- a/android/multinode-target.yaml +++ /dev/null @@ -1,76 +0,0 @@ -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" - ETH_IFACE: "eth0" - # timeout value to wait until the ip ia available for ping LAVA_SERVER_IP - PING_TIMEOUT: 10 - -run: - steps: - - cat /system/build.prop - - getprop - - SERIALNO=$(getprop ro.serialno) - - IPADDR=$(getprop dhcp.$ETH_IFACE.ipaddress) - - if [ -z "${IPADDR}" ]; then - - IPADDR=$(ifconfig $ETH_IFACE|grep "inet addr:") - - IPADDR=${IPADDR#*:} - - IPADDR=${IPADDR%% *} - - fi - - if [ $ADB_LINK != "ETH" ] && [ ! -z $SERIALNO ] - - then - - IPADDR=$SERIALNO - - fi - - if [ $ADB_LINK = "ETH" ] && [ ! -z $IPADDR ] - - then - - cat /proc/sys/kernel/printk > /data/local/tmp/kmsg_levels - - echo '1 1 1 1' > /proc/sys/kernel/printk - - getprop service.adb.tcp.port - - setprop service.adb.tcp.port 5555 - - setprop service.adb.root 1 - - stop adbd - - start adbd - - sleep 5 - - ping_count=0 - - while ! LC_ALL=C ping -W1 -c1 ${LAVA_SERVER_IP} ; do - - sleep 1; ping_count=$((ping_count + 1)); [ ${ping_count} -ge ${PING_TIMEOUT} ] && exit 1 - - done - - 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-send $TEST_NAME-send-ip ipaddr=$IPADDR - - if [ -f /data/local/tmp/kmsg_levels ] - - then - - cat /data/local/tmp/kmsg_levels > /proc/sys/kernel/printk - - fi - # sleep here to allow for output of kernel messages - - sleep 10 - - lava-sync $TEST_NAME-finished - - sleep 10 - - lava-test-case test-finished --shell true diff --git a/android/optee-xtest.yaml b/android/optee-xtest.yaml deleted file mode 100644 index 0dce7daa..00000000 --- a/android/optee-xtest.yaml +++ /dev/null @@ -1,24 +0,0 @@ -metadata: - name: optee-xtest - format: "Lava-Test-Shell Test Definition 1.0" - description: "OP-TEE sanity test suite" - maintainer: - - chase.qi@linaro.org - os: - - android - scope: - - functional - - performance - devices: - - hi6220-hikey - - juno - -params: - # Test suite level: [0-15] - LEVEL: "0" - # Available test suite: regression, benchmark - TEST_SUITE: "regression" - -run: - steps: - - './android/scripts/optee-xtest.sh ${LEVEL} ${TEST_SUITE}' diff --git a/android/piglit_gles2.yaml b/android/piglit_gles2.yaml deleted file mode 100644 index 29ba1726..00000000 --- a/android/piglit_gles2.yaml +++ /dev/null @@ -1,21 +0,0 @@ -metadata: - name: piglit_gles2.0 - version: 1.0 - format: "Lava-Test-Shell Test Definition 1.0" - description: "Piglit is a collection of automated tests for OpenGL implementations. piglit_gles2.0 - runs OpenGL ES 2.0 tests." - maintainer: - - yongqin.liu@linaro.org - os: - - android - scope: - - functional - devices: - - juno - -run: - steps: - - "./android/scripts/piglit-gles-2.0.sh" - -parse: - pattern: "(?P<test_case_id>.*-*):\\s+(?P<result>(pass|skip|fail))" diff --git a/android/piglit_gles3.yaml b/android/piglit_gles3.yaml deleted file mode 100644 index ba5372cd..00000000 --- a/android/piglit_gles3.yaml +++ /dev/null @@ -1,21 +0,0 @@ -metadata: - name: piglit_gles3.0 - version: 1.0 - format: "Lava-Test-Shell Test Definition 1.0" - description: "Piglit is a collection of automated tests for OpenGL implementations. - piglit_gles3.0 runs OpenGL ES 3.0 tests." - maintainer: - - yongqin.liu@linaro.org - os: - - android - scope: - - functional - devices: - - juno - -run: - steps: - - "./android/scripts/piglit-gles-3.0.sh" - -parse: - pattern: "(?P<test_case_id>.*-*):\\s+(?P<result>(pass|skip|fail))" diff --git a/android/piglit_glslparser.yaml b/android/piglit_glslparser.yaml deleted file mode 100644 index 796d58df..00000000 --- a/android/piglit_glslparser.yaml +++ /dev/null @@ -1,21 +0,0 @@ -metadata: - name: glslparser - version: 1.0 - format: "Lava-Test-Shell Test Definition 1.0" - description: "piglit glslparser test for android. The GLSL Parser provides a front end - for parsing and operating on OpenGL Shading Language code. " - maintainer: - - yongqin.liu@linaro.org - os: - - android - scope: - - functional - devices: - - juno - -run: - steps: - - "./android/scripts/piglit-run-glslparser.sh" - -parse: - pattern: "(?P<test_case_id>.*-*):\\s+(?P<result>(pass|skip|fail))" diff --git a/android/piglit_shader_runner.yaml b/android/piglit_shader_runner.yaml deleted file mode 100644 index 2a079bb8..00000000 --- a/android/piglit_shader_runner.yaml +++ /dev/null @@ -1,21 +0,0 @@ -metadata: - name: shader_runner - version: 1.0 - format: "Lava-Test-Shell Test Definition 1.0" - description: "Piglit shader_runner test suite for android. The test suite runs - shader tests using OpenGL shaders." - maintainer: - - yongqin.liu@linaro.org - os: - - android - scope: - - functional - devices: - - juno - -run: - steps: - - "./android/scripts/piglit-run-shader.sh" - -parse: - pattern: "(?P<test_case_id>.*-*):\\s+(?P<result>(pass|skip|fail))" diff --git a/android/ping_dns.yaml b/android/ping_dns.yaml deleted file mode 100644 index 0b99c1eb..00000000 --- a/android/ping_dns.yaml +++ /dev/null @@ -1,17 +0,0 @@ -metadata: - name: ping_dns - format: "Lava-Test-Shell Test Definition 1.0" - description: "Ping test to check dns. The test runs ping command on www.google.com to - test dns with count set to 10." - maintainer: - - yongqin.liu@linaro.org - os: - - android - scope: - - functional - devices: - - juno - -run: - steps: - - lava-test-case ping-dns --shell ping -c10 www.google.com diff --git a/android/pm-qa.yaml b/android/pm-qa.yaml deleted file mode 100644 index 28b9710a..00000000 --- a/android/pm-qa.yaml +++ /dev/null @@ -1,24 +0,0 @@ -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/scripts/0xbench/0xbench.sh b/android/scripts/0xbench/0xbench.sh deleted file mode 100755 index 5f2f3227..00000000 --- a/android/scripts/0xbench/0xbench.sh +++ /dev/null @@ -1,74 +0,0 @@ -#!/system/bin/sh -# -# 0xbench test. -# -# Copyright (C) 2012, 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. -# owner: harigopal.gollamudi@linaro.org - - -#######################################android_0xbenchmark_kill.py - -pid=`ps |grep org.zeroxlab.zeroxbenchmark|tr -s " "|cut -d' ' -f2` -kill $pid -rm -rf /data/data/org.zeroxlab.zeroxbenchmark/files* -rm -rf /data/data/org.zeroxlab.zeroxbenchmark/shared_prefs* - -########################################android_0xbenchmark_modify_path.py - -source=$PWD/android/scripts/0xbench/ZeroxBench_Preference.xml -target="/data/data/org.zeroxlab.zeroxbenchmark/shared_prefs/ZeroxBench_Preference.xml" - -target_dir="/data/data" - -group="None" -owner="None" - -group=`ls -l /data/data/|grep org.zeroxlab.zeroxbenchmark|tr -s " "|cut -d \ -f 2` -owner=`ls -l /data/data/|grep org.zeroxlab.zeroxbenchmark|tr -s " "|cut -d \ -f 3` - -target_dir="/data/data/org.zeroxlab.zeroxbenchmark/shared_prefs" -mkdir $target_dir -chown $owner:$group $target_dir -chmod 771 $target_dir -cp $source $target - -chown $owner:$group $target -chmod 660 $target -target_dir="/data/data/org.zeroxlab.zeroxbenchmark/files" -mkdir $target_dir -chown $owner:$group $target_dir -chmod 771 $target_dir - -########################################0xbench.py - -save_dir="/data/data/org.zeroxlab.zeroxbenchmark/files" - -#options to come from app which runs activity manager -logcat -c - -am start -n org.zeroxlab.zeroxbenchmark/org.zeroxlab.zeroxbenchmark.Benchmark --ez autorun true --ez math true --ez 2d true - - -######################################## - -while [ ! -f /data/data/org.zeroxlab.zeroxbenchmark/files/0xBenchmark.bundle ] -do - sleep 2 -done - -logcat -d | grep "0xbench_test_case:" |tr -s " "|cut -d \ -f 4,5,6,7,8 > 0xBenchmarkresult.txt -cat 0xBenchmarkresult.txt diff --git a/android/scripts/0xbench/ZeroxBench_Preference.xml b/android/scripts/0xbench/ZeroxBench_Preference.xml deleted file mode 100644 index 6f07a12f..00000000 --- a/android/scripts/0xbench/ZeroxBench_Preference.xml +++ /dev/null @@ -1,5 +0,0 @@ -<?xml version='1.0' encoding='utf-8' standalone='yes' ?> -<map> -<string name="KEY_RESULT_CUSTOM_DIR">/data/data/org.zeroxlab.zeroxbenchmark/files</string> -<int name="KEY_RESULT_SELECTION" value="1" /> -</map> diff --git a/android/scripts/adb_connect.sh b/android/scripts/adb_connect.sh deleted file mode 100755 index 1416c159..00000000 --- a/android/scripts/adb_connect.sh +++ /dev/null @@ -1,8 +0,0 @@ -#!/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/bigLITTLE/bigLITTLE.sh b/android/scripts/bigLITTLE/bigLITTLE.sh deleted file mode 100755 index 0ca294f7..00000000 --- a/android/scripts/bigLITTLE/bigLITTLE.sh +++ /dev/null @@ -1,27 +0,0 @@ -#!/system/bin/sh -# -# big.LITTLE switcher 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> - -echo "run_stress_switcher_tests" -sh /system/bin/run_stress_switcher_tests.sh -a > stdout.log 2>&1 -cat stdout.log | egrep -w "PASS|FAIL" -rm -rf stdout.log diff --git a/android/scripts/binder.sh b/android/scripts/binder.sh deleted file mode 100755 index f708ba0c..00000000 --- a/android/scripts/binder.sh +++ /dev/null @@ -1,30 +0,0 @@ -#!/system/bin/sh -# -# Binder test. -# -# Copyright (C) 2012, 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: Amit Pundir <amit.pundir@linaro.org> -# - -chmod 777 /data/nativebenchmark/binderAddInts -/data/nativebenchmark/binderAddInts -n 10 -if [ $? -eq 0 ]; then - echo "binder=pass" -else - echo "binder=fail" -fi diff --git a/android/scripts/bionic-benchmarks.sh b/android/scripts/bionic-benchmarks.sh deleted file mode 100755 index 085f790a..00000000 --- a/android/scripts/bionic-benchmarks.sh +++ /dev/null @@ -1,45 +0,0 @@ -#!/system/bin/sh - -local_file_path="$0" -local_file_parent=$(cd $(dirname ${local_file_path}); pwd) -. ${local_file_parent}/common.sh - -test_bionic_benchmark(){ - local arch=$1 - local cmd="" - if [ "X$arch" = "X32" ]; then - cmd="/data/benchmarktest/bionic-benchmarks/bionic-benchmarks32" - elif [ "X$arch" = "X64" ]; then - cmd="/data/benchmarktest64/bionic-benchmarks/bionic-benchmarks64" - else - echo "The specified $arch is not specified!" - return - fi - chmod +x ${cmd} - if [ -n "$(which ${cmd})" ]; then - for res_line in $(${cmd} --color_print=false |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" - test_bionic_benchmark "32" -} - -main(){ - var_test_func="test_func" - run_test "$@" -} - -main "$@" diff --git a/android/scripts/boot_time.sh b/android/scripts/boot_time.sh deleted file mode 100755 index 52408a47..00000000 --- a/android/scripts/boot_time.sh +++ /dev/null @@ -1,117 +0,0 @@ -#!/system/bin/sh -# -# Android boot time test. -# -# Copyright (C) 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: Yongqin Liu <yongqin.liu@linaro.org> -# Author: Milosz Wasilewski <milosz.wasilewski@linaro.org> -# -# Use the following information in logcat to record the android boot time -# I/SurfaceFlinger( 683): Boot is finished (91104 ms) -# Use dmesg to check the boot time from beginning of clock ticks -# to the moment rootfs is mounted. -# The test requires dc to be available in rootfs - -local_file_path="$0" -local_file_parent=$(cd $(dirname ${local_file_path}); pwd) -. ${local_file_parent}/common.sh -G_VERBOSE_OUTPUT=TRUE - -# so that we could run this script without lava environment -# like pushing this script and the common.sh to /data/local/tmp, -# then we can run this script via adb shell -cd /data/local/tmp - -LOG_DMESG="dmesg.log" -dmesg > ${LOG_DMESG} - -# dmeg line example -# [ 7.410422] init: Starting service 'logd'... -getTime(){ - local key=$1 - if [ -z "${key}" ]; then - return - fi - - local key_line=$(grep "${key}" ${LOG_DMESG}) - if [ -n "${key_line}" ]; then - local timestamp=$(echo "${key_line}"|awk '{print $2}' | awk -F "]" '{print $1}') - echo "${timestamp}" - fi -} - -# dmesg starts before all timers are initialized, so kernel reports time as 0.0. -# we can't work around this without external time metering. -# here we presume kernel message starts from 0 -CONSOLE_SECONDS_START=0 -CONSOLE_SECONDS_END=$(getTime "Freeing unused kernel memory") -CONSOLE_SECONDS=`echo "$CONSOLE_SECONDS_END $CONSOLE_SECONDS_START - p" | dc` -output_test_result "KERNEL_BOOT_TIME" "pass" "${CONSOLE_SECONDS}" "s" - -POINT_FS_MOUNT_START=$(getTime "Freeing unused kernel memory:"|tail -n1) -POINT_FS_MOUNT_END=$(getTime "init: Starting service 'logd'...") -FS_MOUNT_TIME=`echo "${POINT_FS_MOUNT_END} ${POINT_FS_MOUNT_START} - p" | dc` -output_test_result "FS_MOUNT_TIME" "pass" "${FS_MOUNT_TIME}" "s" - -POINT_FS_DURATION_START=$(getTime "init: /dev/hw_random not found"|tail -n1) -POINT_FS_DURATION_END=$(getTime "init: Starting service 'logd'...") -FS_MOUNT_DURATION=`echo "${POINT_FS_DURATION_END} ${POINT_FS_DURATION_START} - p" | dc` -output_test_result "FS_MOUNT_DURATION" "pass" "${FS_MOUNT_DURATION}" "s" - -POINT_SERVICE_BOOTANIM_START=$(getTime "init: Starting service \'bootanim\'...") -POINT_SERVICE_BOOTANIM_END=$(getTime "init: Service 'bootanim'.* exited with status") -BOOTANIM_TIME=`echo "${POINT_SERVICE_BOOTANIM_END} ${POINT_SERVICE_BOOTANIM_START} - p" | dc` -output_test_result "BOOTANIM_TIME" "pass" "${BOOTANIM_TIME}" "s" - -TIME_INFO=$(logcat -d -s SurfaceFlinger:I|grep "Boot is finished") -if [ -z "${TIME_INFO}" ]; then - output_test_result "ANDROID_BOOT_TIME" "fail" "-1" "s" -else - while echo "${TIME_INFO}"|grep -q "("; do - TIME_INFO=$(echo "${TIME_INFO}"|cut -d\( -f2-) - done - TIME_VALUE=$(echo "${TIME_INFO}"|cut -d\ -f1) - ANDROID_BOOT_TIME=`echo $TIME_VALUE 1000 / p | dc` - output_test_result "ANDROID_BOOT_TIME" "pass" "${ANDROID_BOOT_TIME}" "s" -fi - -SERVICE_START_TIME_INFO=$(dmesg |grep "healthd:"|head -n 1) -SERVICE_START_TIME_END=$(echo "$SERVICE_START_TIME_INFO"|cut -d] -f 1|cut -d[ -f2| tr -d " ") -if [ -z "${SERVICE_START_TIME_END}" ]; then - output_test_result "ANDROID_SERVICE_START_TIME" "fail" "-1" "s" -else - SERVICE_START_TIME=`echo "$SERVICE_START_TIME_END $CONSOLE_SECONDS_START - p" | dc` - output_test_result "ANDROID_SERVICE_START_TIME" "pass" "${SERVICE_START_TIME}" "s" -fi - -echo "$CONSOLE_SECONDS $TIME_VALUE 1000 / + p" -TOTAL_SECONDS=`echo "$CONSOLE_SECONDS $TIME_VALUE 1000 / + p" | dc` -output_test_result "TOTAL_BOOT_TIME" "pass" "${TOTAL_SECONDS}" "s" - -# attach dmesg and logcat -if [ -n "$(which lava-test-run-attach)" ]; then - lava-test-run-attach ${LOG_DMESG} text/plain - - logcat -d -v time *:V > logcat_all.log - lava-test-run-attach logcat_all.log text/plain - - logcat -d -b events -v time > logcat_events.log - lava-test-run-attach logcat_events.log text/plain -fi - -exit 0 diff --git a/android/scripts/bootchart.sh b/android/scripts/bootchart.sh deleted file mode 100755 index fbf40b8b..00000000 --- a/android/scripts/bootchart.sh +++ /dev/null @@ -1,160 +0,0 @@ -#!/system/bin/sh -# -# script to start and stop bootchart test. -# -# Copyright (C) 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. -# -# owner: yongqin.liu@linaro.org -# -############################################################################### - -local_file_path="$0" -local_file_parent=$(dirname "${local_file_path}") -local_file_parent=$(cd "${local_file_parent}"||exit; pwd) -# shellcheck source=android/scripts/common.sh -. "${local_file_parent}/common.sh" - -LOGROOT="/data/bootchart" -start_f="${LOGROOT}/start" -enabled_f="${LOGROOT}/enabled" -stop_f="${LOGROOT}/stop" -DATA_TMP="/data/local/tmp" -TARBALL="${DATA_TMP}/bootchart.tgz" - -start_bootchart(){ - echo "${BOOTCHART_TIME}" > ${start_f} - if [ $? -ne 0 ]; then - output_test_result "start_bootchart" "fail" - else - output_test_result "start_bootchart" "pass" - fi -} - -enabled_bootchart(){ - touch ${enabled_f} - if [ $? -ne 0 ]; then - output_test_result "enabled_bootchart" "fail" - else - output_test_result "enabled_bootchart" "pass" - fi -} - -stop_bootchart(){ - echo 1 > ${stop_f} - if [ $? -ne 0 ]; then - output_test_result "stop_bootchart" "fail" - else - output_test_result "stop_bootchart" "pass" - fi - rm -fr ${start_f} ${enabled_f} - if [ $? -ne 0 ]; then - output_test_result "rm_start_file" "fail" - else - output_test_result "rm_start_file" "pass" - fi -} - -collect_data(){ - FILES="header proc_stat.log proc_ps.log proc_diskstats.log kernel_pacct" - if [ ! -d "${LOGROOT}" ]; then - echo "There is no ${LOGROOT} directory!" - return - fi - cd ${LOGROOT} || exit 1 - exist_files="" - for f in ${FILES}; do - if [ -f "${f}" ]; then - exist_files="${exist_files} ${f}" - fi - done - if [ -z "${exist_files}" ]; then - output_test_result "bootchart_collect_data" "fail" - exit 1 - fi - # shellcheck disable=SC2086 - tar -czvf ${TARBALL} ${exist_files} - if [ $? -ne 0 ]; then - output_test_result "bootchart_collect_data" "fail" - exit 1 - else - output_test_result "bootchart_collect_data" "pass" - fi - - bootchart_parse_cmd="/system/bin/bootchart_parse" - bootchart_paser_res="${DATA_TMP}/bootchart_parse.result" - if [ -x "${bootchart_parse_cmd}" ]; then - ${bootchart_parse_cmd} > "${bootchart_paser_res}" - if [ $? -ne 0 ]; then - output_test_result "bootchart_parse" "fail" - cd ${DATA_TMP} || exit 1 - [ -f "bootchart_parse.result" ] && lava-test-run-attach bootchart_parse.result text/plain - exit 1 - else - output_test_result "bootchart_parse" "pass" - while read -r line; do - test_case_cmd=$(echo "${line}" |cut -d, -f1) - start_time=$(echo "${line}" |cut -d, -f2) - end_time=$(echo "${line}" |cut -d, -f3) - output_test_result "${test_case_cmd}_starttime" "pass" "${start_time}" "ms" - output_test_result "${test_case_cmd}_endtime" "pass" "${end_time}" "ms" - done < "${bootchart_paser_res}" - fi - rm -fr "${bootchart_paser_res}" - fi - - # shellcheck disable=SC2086 - rm -fr ${FILES} - - cd ${DATA_TMP} || exit 1 - if [ -n "$(which lava-test-run-attach)" ]; then - [ -f "bootchart.tgz" ] && lava-test-run-attach bootchart.tgz application/x-gzip - [ -f "lava_test_shell_raw_data.csv" ] && lava-test-run-attach lava_test_shell_raw_data.csv text/plain - fi -} - -main(){ - OPERATION="${1}" - if [ "X${OPERATION}" = "X" ]; then - echo "Please specify the operation of start or stop" - exit 1 - fi - BOOTCHART_TIME="${2}" - if [ "X${BOOTCHART_TIME}" = "X" ]; then - BOOTCHART_TIME=120 - fi - export BOOTCHART_TIME - - case "X${OPERATION}" in - "Xstart") - start_bootchart - enabled_bootchart - ;; - "Xstop") - stop_bootchart - #wait the file to be synced to disk completely - sleep 5 - collect_data - ;; - *) - output_test_result "bootchart" "fail" - exit 1 - ;; - esac -} - -main "$@" diff --git a/android/scripts/boottime2.sh b/android/scripts/boottime2.sh deleted file mode 100755 index ac437957..00000000 --- a/android/scripts/boottime2.sh +++ /dev/null @@ -1,335 +0,0 @@ -#!/system/bin/sh - -############################################################################## -## Description about this boot time measuring script #### -############################################################################## -## This script will be run on the device, it has following 2 functions: -## 1. collecting the dmesg log and logcat information, and save them under -## /data/local/tmp/boottime -## directory in the name for following format: -## logcat_all_${COLLECT_NO}.log : -## collected via command "logcat -d -v time *:V" -## logcat_events_${COLLECT_NO}.log: -## collected via command "logcat -d -b events -v time" -## dmesg_${COLLECT_NO}.log: -## collected via command "dmesg" -## when this script is run as following: -## ./android/scripts/boottime2.sh COLLECT ${COLLECT_NO} -## -## 2. analyzing boottime inforamtion from the collected log information -## when this script is run as following: -## ./android/scripts/boottime2.sh ANALYZE ${COLLECT_NO} -## -## it will get the average of multiple iterations for the boot time, -## so that to get more stable and accurate boot time information: -## -## iterations < 4: the average will be calculated with all data -## iterations >= 4: the average will be calculated with maximum -## and minimum will be removed -## For each iteration, it will get following boot time information: -## (assuming kernel started at 0 timestamp in this script) -## -## TOTAL_BOOT_TIME: -## the sum of KERNEL_BOOT_TIME and ANDROID_BOOT_TIME -## -## KERNEL_BOOT_TIME: -## from kernel started to line "Freeing unused kernel memory" printed, -## it does not include kernel loading and uncompression part done -## by bootloader or kernel itself -## -## ANDROID_BOOT_TIME: -## the sum of INIT_TO_SURFACEFLINGER_START_TIME and SURFACEFLINGER_BOOT_TIME -## -## SURFACEFLINGER_BOOT_TIME: the time information is gotten from the line -## contains "Boot is finished" like following in logcat: -## 1-01 00:00:27.158 I/SurfaceFlinger( 1835): Boot is finished (13795 ms) -## the time here means the time from surfaceflinger service started -## to the time boot animation finished. -## it does not include the time from init start to the time -## surfaceflinger service started -## -## Also following time values are gotten from dmesg log information, -## they are not accurate as what we expects, but are able to be used for -## reference and used for checking our boot time improvements -## -## INIT_TO_SURFACEFLINGER_START_TIME: -## from the time "Freeing unused kernel memory" printed in dmesg -## to the time "init: Starting service 'surfaceflinger'..." is printed -## -## FS_MOUNT_TIME: -## from the time "Freeing unused kernel memory:" printed -## to the time "init: Starting service 'logd'..." printed. -## -## FS_MOUNT_DURATION: -## from the line "init: /dev/hw_random not found" printed -## to the time "init: Starting service 'logd'..." printed -## -## BOOTANIM_TIME: -## from the time "init: Starting service 'bootanim'..." printed -## to the time "init: Service 'bootanim'.* exited with status" printed -## -## ANDROID_SERVICE_START_TIME: -## from the time kernel started to the time healthd service started -## -## ANDROID_UI_SHOWN: -## time from freeing unused kernel memory to the time -## when UI is shown on display -############################################################################## - -local_file_path="$0" -local_file_parent=$(dirname "${local_file_path}") -local_file_parent=$(cd "${local_file_parent}"||exit; pwd) -# shellcheck source=android/scripts/common.sh -. "${local_file_parent}/common.sh" - -local_tmp="/data/local/tmp/" -dir_boottime_data="${local_tmp}/boottime" -F_RAW_DATA_CSV="${dir_boottime_data}/boot_time_raw_data.csv" -F_STATISTIC_DATA_CSV="${dir_boottime_data}/boot_time_statistic_data.csv" - - -# dmeg line example -# [ 7.410422] init: Starting service 'logd'... -getTime(){ - key=$1 - if [ -z "${key}" ]; then - return - fi - - key_line=$(grep -i "${key}" "${LOG_DMESG}") - if [ -n "${key_line}" ]; then - timestamp=$(echo "${key_line}"|awk '{print $2}' | awk -F "]" '{print $1}') - echo "${timestamp}" - fi -} - - -# logcat_all line example -# 01-01 00:00:26.313 I/SurfaceFlinger( 1850): Boot is finished (11570 ms) -getTimeStampFromLogcat(){ - key=$1 - if [ -z "${key}" ]; then - return - fi - - key_line=$(grep -i "${key}" "${LOG_LOGCAT_ALL}") - if [ -n "${key_line}" ]; then - timestamp_sec=$(echo "${key_line}"|awk '{print $2}' | awk -F ":" '{print $3}') - timestamp_min=$(echo "${key_line}"|awk '{print $2}' | awk -F ":" '{print $2}') - timestamp=$(echo "${timestamp_sec} ${timestamp_min}" | awk '{printf "%.3f",$1 + $2 * 60;}') - echo "${timestamp}" - fi -} - - -getBootTimeInfoFromDmesg(){ - COLLECT_NO=$1 - - LOG_LOGCAT_ALL="${dir_boottime_data}/logcat_all_${COLLECT_NO}.log" - LOG_DMESG="${dir_boottime_data}/dmesg_${COLLECT_NO}.log" - - # dmesg starts before all timers are initialized, so kernel reports time as 0.0. - # we can't work around this without external time metering. - # here we presume kernel message starts from 0 - CONSOLE_SECONDS_START=0 - CONSOLE_SECONDS_END=$(getTime "Freeing unused kernel memory") - if [ ! -z "${CONSOLE_SECONDS_END}" ] && [ ! -z "${CONSOLE_SECONDS_START}" ]; then - KERNEL_BOOT_TIME=$(echo "${CONSOLE_SECONDS_END} ${CONSOLE_SECONDS_START} - p" | dc) - output_test_result "KERNEL_BOOT_TIME" "pass" "${KERNEL_BOOT_TIME}" "s" - fi - - POINT_FS_MOUNT_START=$(getTime "Freeing unused kernel memory:"|tail -n1) - POINT_FS_MOUNT_END=$(getTime "init: Starting service 'logd'...") - if [ ! -z "${POINT_FS_MOUNT_END}" ] && [ ! -z "${POINT_FS_MOUNT_START}" ]; then - FS_MOUNT_TIME=$(echo "${POINT_FS_MOUNT_END} ${POINT_FS_MOUNT_START} - p" | dc) - output_test_result "FS_MOUNT_TIME" "pass" "${FS_MOUNT_TIME}" "s" - fi - - POINT_FS_DURATION_START=$(getTime "init: /dev/hw_random not found"|tail -n1) - POINT_FS_DURATION_END=$(getTime "init: Starting service 'logd'...") - if [ ! -z "${POINT_FS_DURATION_END}" ] && [ ! -z "${POINT_FS_DURATION_START}" ]; then - FS_MOUNT_DURATION=$(echo "${POINT_FS_DURATION_END} ${POINT_FS_DURATION_START} - p" | dc) - output_test_result "FS_MOUNT_DURATION" "pass" "${FS_MOUNT_DURATION}" "s" - fi - - POINT_SERVICE_BOOTANIM_START=$(getTime "init: Starting service 'bootanim'..."|tail -n1) - POINT_SERVICE_BOOTANIM_END=$(getTime "init: Service 'bootanim'.* exited with status"|tail -n1) - if [ ! -z "${POINT_SERVICE_BOOTANIM_END}" ] && [ ! -z "${POINT_SERVICE_BOOTANIM_START}" ]; then - BOOTANIM_TIME=$(echo "${POINT_SERVICE_BOOTANIM_END} ${POINT_SERVICE_BOOTANIM_START} - p" | dc) - output_test_result "BOOTANIM_TIME" "pass" "${BOOTANIM_TIME}" "s" - fi - - POINT_INIT_START=$(getTime "Freeing unused kernel memory") - POINT_SERVICE_SURFACEFLINGER_START=$(getTime "init: Starting service 'surfaceflinger'..."|tail -n1) - if [ ! -z "${POINT_SERVICE_SURFACEFLINGER_START}" ] && [ ! -z "${POINT_INIT_START}" ]; then - INIT_TO_SURFACEFLINGER_START_TIME=$(echo "${POINT_SERVICE_SURFACEFLINGER_START} ${POINT_INIT_START} - p" | dc) - output_test_result "INIT_TO_SURFACEFLINGER_START_TIME" "pass" "${INIT_TO_SURFACEFLINGER_START_TIME}" "s" - fi - - POINT_SURFACEFLINGER_BOOT=$(getTimeStampFromLogcat "Boot is finished") - POINT_SURFACEFLINGER_START=$(getTimeStampFromLogcat "SurfaceFlinger is starting") - POINT_LAUNCHER_DISPLAYED=$(getTimeStampFromLogcat "Displayed com.android.launcher") - - ## When there are 2 lines of "Boot is finished", - ## it mostly means that the surfaceflinger service restarted by some reason - ## but here when there are multiple lines of "Boot is finished", - ## use the last one line, and report the case later after checked all the logs - SURFACEFLINGER_BOOT_TIME_INFO=$(grep "Boot is finished" "${LOG_LOGCAT_ALL}"|tail -n1) - if [ -n "${SURFACEFLINGER_BOOT_TIME_INFO}" ]; then - while echo "${SURFACEFLINGER_BOOT_TIME_INFO}"|grep -q "("; do - SURFACEFLINGER_BOOT_TIME_INFO=$(echo "${SURFACEFLINGER_BOOT_TIME_INFO}"|cut -d\( -f2-) - done - SURFACEFLINGER_BOOT_TIME_MS=$(echo "${SURFACEFLINGER_BOOT_TIME_INFO}"|cut -d\ -f1) - SURFACEFLINGER_BOOT_TIME=$(echo "${SURFACEFLINGER_BOOT_TIME_MS}" | awk '{printf "%.3f",$1/1000;}') - output_test_result "SURFACEFLINGER_BOOT_TIME" "pass" "${SURFACEFLINGER_BOOT_TIME}" "s" - - if [ ! -z "${POINT_SURFACEFLINGER_BOOT}" ] && [ ! -z "${POINT_LAUNCHER_DISPLAYED}" ] && [ ! -z "${POINT_SURFACEFLINGER_START}" ] && [ ! -z "${INIT_TO_SURFACEFLINGER_START_TIME}" ]; then - - min=$(echo "${POINT_LAUNCHER_DISPLAYED} ${POINT_SURFACEFLINGER_BOOT}" | awk '{if ($1 < $2) printf $1; else print $2}') - - ## In case timestamp of "Boot is finished" is smaller than timestamp of "Displayed com.android.launcher" we calculate ANDROID_UI_SHOWN as "Boot is finished" time minus difference - ## between two timestamps plus INIT_TO_SURFACEFLINGER_START_TIME - if [ "${min}" = "${POINT_SURFACEFLINGER_BOOT}" ]; then - ANDROID_UI_SHOWN=$(echo "${POINT_SURFACEFLINGER_BOOT} ${POINT_SURFACEFLINGER_START} ${POINT_SURFACEFLINGER_BOOT} ${POINT_LAUNCHER_DISPLAYED} ${INIT_TO_SURFACEFLINGER_START_TIME}" | awk '{printf "%.3f",$1 - $2 + $4 - $3 + $5;}') - ## I case timestamp of "Boot is finished" is greater than timestamp of "Displayed com.android.launcher" we use "Boot is finished" time plus INIT_TO_SURFACEFLINGER_START_TIME - ## as ANDROID_UI_SHOWN - else - ANDROID_UI_SHOWN=$(echo "${POINT_SURFACEFLINGER_BOOT} ${POINT_SURFACEFLINGER_START} ${INIT_TO_SURFACEFLINGER_START_TIME}" | awk '{printf "%.3f",$1 - $2 + $3;}') - fi - output_test_result "ANDROID_UI_SHOWN" "pass" "${ANDROID_UI_SHOWN}" "s" - fi - fi - - - if [ ! -z "${INIT_TO_SURFACEFLINGER_START_TIME}" ] && [ ! -z "${SURFACEFLINGER_BOOT_TIME}" ] ; then - ANDROID_BOOT_TIME=$(echo "${INIT_TO_SURFACEFLINGER_START_TIME} ${SURFACEFLINGER_BOOT_TIME}" | awk '{printf "%.3f",$1 + $2;}') - output_test_result "ANDROID_BOOT_TIME" "pass" "${ANDROID_BOOT_TIME}" "s" - fi - - SERVICE_START_TIME_INFO=$(grep "healthd:" "${LOG_DMESG}"|head -n 1) - SERVICE_START_TIME_END=$(echo "${SERVICE_START_TIME_INFO}"|cut -d] -f 1|cut -d[ -f2| tr -d " ") - if [ ! -z "${SERVICE_START_TIME_END}" ] && [ ! -z "${CONSOLE_SECONDS_START}" ]; then - SERVICE_START_TIME=$(echo "${SERVICE_START_TIME_END} ${CONSOLE_SECONDS_START} - p" | dc) - output_test_result "ANDROID_SERVICE_START_TIME" "pass" "${SERVICE_START_TIME}" "s" - fi - - if [ ! -z "${KERNEL_BOOT_TIME}" ] && [ ! -z "${ANDROID_BOOT_TIME}" ] ; then - TOTAL_SECONDS=$(echo "${KERNEL_BOOT_TIME} ${ANDROID_BOOT_TIME}" | awk '{printf "%.3f",$1 + $2;}') - output_test_result "TOTAL_BOOT_TIME" "pass" "${TOTAL_SECONDS}" "s" - fi -} - -OPERATION=$1 -if [ "X${OPERATION}" = "XCOLLECT" ]; then - G_VERBOSE_OUTPUT=FALSE - G_RECORD_LOCAL_CSV=FALSE - COLLECT_NO=$2 - mkdir -p ${dir_boottime_data} - - # shellcheck disable=SC2035 - logcat -d -v time *:V > "${dir_boottime_data}/logcat_all_${COLLECT_NO}.log" - output_test_result "BOOTTIME_LOGCAT_ALL_COLLECT" "pass" - logcat -d -b events -v time > "${dir_boottime_data}/logcat_events_${COLLECT_NO}.log" - output_test_result "BOOTTIME_LOGCAT_EVENTS_COLLECT" "pass" - dmesg > "${dir_boottime_data}/dmesg_${COLLECT_NO}.log" - output_test_result "BOOTTIME_DMESG_COLLECT" "pass" -elif [ "X${OPERATION}" = "XANALYZE" ]; then - count=$2 - ## Check if there is any case that the surfaceflinger service - ## was started several times - i=1 - service_started_once=true - no_boot_timeout_force_display=true - while ${service_started_once}; do - if [ $i -gt "$count" ]; then - break - fi - ## check the existence of "Boot is finished" - LOG_LOGCAT_ALL="${dir_boottime_data}/logcat_all_${i}.log" - android_boottime_lines=$(grep -c "Boot is finished" "${LOG_LOGCAT_ALL}") - if [ "${android_boottime_lines}" -ne 1 ]; then - echo "There are ${android_boottime_lines} existences of 'Boot is finished' in file: ${LOG_LOGCAT_ALL}" - echo "Please check the status first" - service_started_once=false - fi - - if grep -q "BOOT TIMEOUT: forcing display enabled" "${LOG_LOGCAT_ALL}"; then - no_boot_timeout_force_display=false - echo "There are boot timeout problem in file: ${LOG_LOGCAT_ALL}" - echo "Please check the status first" - break - fi - - LOG_DMESG="${dir_boottime_data}/dmesg_${i}.log" - ## check the service of bootanim - bootanim_lines=$(grep -c "init: Service 'bootanim'.* exited with status" "${LOG_DMESG}") - if [ "${bootanim_lines}" -ne 1 ]; then - echo "bootanim service seems to be started more than once in file: ${LOG_DMESG}" - echo "Please check the status first" - service_started_once=false - fi - i=$((i+1)) - done - - if ! ${no_boot_timeout_force_display}; then - output_test_result "NO_BOOT_TIMEOUT_FORCE_DISPLAY" "fail" - fi - if ! ${service_started_once}; then - output_test_result "SERVICE_STARTED_ONCE" "fail" - fi - - if ${no_boot_timeout_force_display} && ${service_started_once}; then - no_checking_problem=true - else - no_checking_problem=false - fi - - if ${no_checking_problem}; then - i=1 - G_RESULT_NOT_RECORD=TRUE - G_RECORD_LOCAL_CSV=TRUE - export G_RECORD_LOCAL_CSV G_RESULT_NOT_RECORD - while true; do - if [ $i -gt "$count" ]; then - break - fi - getBootTimeInfoFromDmesg ${i} - i=$((i+1)) - done - G_RESULT_NOT_RECORD=FALSE - export G_RESULT_NOT_RECORD - if [ "X${G_RECORD_LOCAL_CSV}" = "XTRUE" ]; then - statistic ${F_RAW_DATA_CSV} 2 |tee ${F_STATISTIC_DATA_CSV} - sed -i 's/=/,/' "${F_STATISTIC_DATA_CSV}" - - G_RECORD_LOCAL_CSV=FALSE - export G_RECORD_LOCAL_CSV - while read -r line; do - if ! echo "$line"|grep -q ,; then - continue - fi - key=$(echo "$line"|cut -d, -f1) - measurement=$(echo "$line"|cut -d, -f2) - units=$(echo "$line"|cut -d, -f3) - output_test_result "${key}" "pass" "${measurement}" "${units}" - done < "${F_STATISTIC_DATA_CSV}" - fi - - output_test_result "SERVICE_STARTED_ONCE" "pass" - fi - - # set again for following output_test_result - G_RECORD_LOCAL_CSV=FALSE - cd ${local_tmp}|| exit 1 - tar -czvf boottime.tgz boottime - if [ -n "$(which lava-test-run-attach)" ]; then - lava-test-run-attach boottime.tgz application/x-gzip - fi - output_test_result "BOOTTIME_ANALYZE" "pass" -else - G_VERBOSE_OUTPUT=FALSE - G_RECORD_LOCAL_CSV=FALSE - export G_VERBOSE_OUTPUT G_RECORD_LOCAL_CSV - echo "Not recognised operation" - output_test_result "BOOTTIME" "fail" -fi diff --git a/android/scripts/busybox.sh b/android/scripts/busybox.sh deleted file mode 100755 index 06c756ca..00000000 --- a/android/scripts/busybox.sh +++ /dev/null @@ -1,60 +0,0 @@ -#!/system/bin/sh -# -# Busybox 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: Senthil Kumaran <senthil.kumaran@linaro.org> -# Maintainer: Amit Pundir <amit.pundir@linaro.org> - -test_func(){ - if [ ! -f /system/bin/busybox ]; then - echo "busybox=unexist" - exit - fi - - if /system/bin/busybox [ $# -lt 1 ]; then - return 0 - fi - test_cmd=$1 - /system/bin/busybox "$@" 1>/dev/null 2>/dev/null - if /system/bin/busybox [ $? -ne 0 ]; then - echo "${test_cmd}=fail" - else - echo "${test_cmd}=pass" - fi -} - -rm -r /data/busybox 1>/dev/null 2>/dev/null - -tgt_dir="/data/local/tmp/" -test_func mkdir ${tgt_dir}/busybox -test_func touch ${tgt_dir}/busybox/test.txt -test_func ls ${tgt_dir}/busybox/test.txt -test_func ps -test_func whoami -test_func which busybox -test_func basename /data/busybox/test.txt -test_func cp ${tgt_dir}/busybox/test.txt ${tgt_dir}/busybox/test2.txt -test_func rm ${tgt_dir}/busybox/test2.txt -test_func dmesg -test_func grep service /init.rc - -rm -r /data/busybox 1>/dev/null 2>/dev/null - -# clean exit so that lava-test-shell can trust the results -exit 0 diff --git a/android/scripts/cachecoherency.sh b/android/scripts/cachecoherency.sh deleted file mode 100755 index f53f9b56..00000000 --- a/android/scripts/cachecoherency.sh +++ /dev/null @@ -1,26 +0,0 @@ -#!/system/bin/sh -# -# cachecoherency test. -# -# Copyright (C) 2013, 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. -# -# owner: harigopal.gollamudi@linaro.org -# -############################################################################## - -stressapptest -M 16 --cc_test -s 10 diff --git a/android/scripts/common.sh b/android/scripts/common.sh deleted file mode 100644 index b2f90916..00000000 --- a/android/scripts/common.sh +++ /dev/null @@ -1,297 +0,0 @@ -#!/system/bin/sh - -G_LOOP_COUNT=12 -G_RECORD_LOCAL_CSV=TRUE -G_VERBOSE_OUTPUT=FALSE -G_RESULT_NOT_RECORD=FALSE -F_RAW_DATA_CSV="/data/local/tmp/lava_test_shell_raw_data.csv" -F_STATISTIC_DATA_CSV="/data/local/tmp/lava_test_shell_statistic_data.csv" -var_test_func="" - -## Description: -## output the max value of the passed 2 parameters -## Usage: -## f_max "${val1}" "${val2}" -## Example: -## max=$(f_max "1.5" "2.0") -f_max(){ - val1=$1 - val2=$2 - [ -z "$val1" ] && echo "$val2" - [ -z "$val2" ] && echo "$val1" - - echo "$val1,$val2"|awk -F, '{if($1<$2) print $2; else print $1}' -} - -## Description: -## output the min value of the passed 2 parameters -## Usage: -## f_min "${val1}" "${val2}" -## Example: -## min=$(f_min "1.5" "2.0") -f_min(){ - val1=$1 - val2=$2 - [ -z "$val1" ] && echo "$val1" - [ -z "$val2" ] && echo "$val2" - - echo "$val1,$val2"|awk -F, '{if($1>$2) print $2; else print $1}' -} - -## Description: -## calculate the average value for specified csv file. -## The first field of that csv file should be the key/name of that line, -## Lines have the same key should be together. -## Usage: -## statistic "${csv_file_path}" "${file_number}" -## Example: -## statistic "$f_res_starttime" 2 -## Note: -## if less than 4 samples for that key/item there, average will be calculated as total/count -## if 4 or more samples for that key/item there, average will be calculated with max and min excluded -statistic(){ - f_data=$1 - if ! [ -f "$f_data" ]; then - return - fi - field_no=$2 - if [ -z "$field_no" ]; then - field_no=2 - fi - total=0 - max=0 - min=0 - old_key="" - new_key="" - count=0 - units="" - sort "${f_data}" >"${f_data}.sort" - while read -r line; do - line=$(echo "$line"|tr ' ' '~') - if ! echo "$line"|grep -q ,; then - continue - fi - new_key=$(echo "$line"|cut -d, -f1) - measurement_units=$(echo "$line"|cut -d, -f${field_no}) - if echo "${measurement_units}"|grep -q '~'; then - value=$(echo "${measurement_units}"|cut -d~ -f1) - else - value=${measurement_units} - fi - - if [ "X${new_key}" = "X${old_key}" ]; then - total=$(echo "${total},${value}"|awk -F, '{printf "%.2f",$1+$2;}') - count=$(echo "${count},1"|awk -F, '{printf $1+$2;}') - max=$(f_max "$max" "$value") - min=$(f_min "$min" "$value") - else - if [ "X${old_key}" != "X" ]; then - if [ "${count}" -ge 4 ]; then - average=$(echo "${total},${max},${min},$count"|awk -F, '{printf "%.2f",($1-$2-$3)/($4-2);}') - else - average=$(echo "${total},$count"|awk -F, '{printf "%.2f",$1/$2;}') - fi - if [ -z "${units}" ]; then - echo "${old_key}=${average}" - else - echo "${old_key}=${average},${units}" - fi - fi - total="${value}" - max="${value}" - min="${value}" - old_key="${new_key}" - count=1 - if echo "${measurement_units}"|grep -q '~'; then - units=$(echo "${measurement_units}"|cut -d~ -f2) - else - units="" - fi - fi - done < "${f_data}.sort" - if [ "X${new_key}" != "X" ]; then - if [ $count -ge 4 ]; then - average=$(echo "${total},${max},${min},$count"|awk -F, '{printf "%.2f",($1-$2-$3)/($4-2);}') - else - average=$(echo "${total},$count"|awk -F, '{printf "%.2f",$1/$2;}') - fi - if [ -z "${units}" ]; then - echo "${new_key}=${average}" - else - echo "${new_key}=${average},${units}" - fi - fi - rm "${f_data}.sort" -} - -## Description: -## output the test result to console and add for lava-test-shell, -## also write into one csv file for comparing manually -## Usage: -## output_test_result $test_name $result [ $measurement [ $units ] ] -## Note: -## G_RECORD_LOCAL_CSV: when this environment variant is set to "TRUE", -## the result will be recorded in a csv file in the following path: -## rawdata/final_result.csv -## G_VERBOSE_OUTPUT: when this environment variant is set to "TRUE", and only it is TRUE, -## the verbose informain about the result will be outputed -output_test_result(){ - test_name=$1 - result=$2 - measurement=$3 - units=$4 - - if [ -z "${test_name}" ] || [ -z "$result" ]; then - return - fi - output="" - lava_paras="" - output_csv="" - if [ -z "$units" ]; then - units="points" - fi - if [ -z "${measurement}" ]; then - output="${test_name}=${result}" - lava_paras="${test_name} --result ${result}" - else - output="${test_name}=${measurement} ${units}" - lava_paras="${test_name} --result ${result} --measurement ${measurement} --units ${units}" - output_csv="${test_name},${measurement} ${units}" - fi - - if [ "X${G_VERBOSE_OUTPUT}" = "XTRUE" ];then - echo "${output}" - fi - - cmd="lava-test-case" - if [ "X${G_RESULT_NOT_RECORD}" = "XFALSE" ] && [ -n "$(which $cmd)" ];then - # shellcheck disable=SC2086 - $cmd ${lava_paras} - elif [ "X${G_VERBOSE_OUTPUT}" = "XTRUE" ];then - echo "$cmd ${lava_paras}" - fi - if [ "X${G_RECORD_LOCAL_CSV}" = "XTRUE" ]; then - if [ -n "${output_csv}" ]; then - echo "${output_csv}">>${F_RAW_DATA_CSV} - fi - fi -} - -func_print_usage_common(){ - script_name=$(basename "$0") - echo "${script_name} [--record-csv TRUE|others] [--loop-count LOOP_COUNT]" - echo " --record-csv: specify if record the result in csv format in file ${F_RAW_DATA_CSV}" - echo " Only record the file when TRUE is specified." - echo " --loop-count: specify the number that how many times should be run for each application to get the average result, default is 12" - echo " --verbose-output: output the result and lava-test-case command for each test case each time it is run" - echo "${script_name} [--help|-h]" - echo " print out this usage." -} - -func_parse_parameters_common(){ - para_loop_count="" - while [ -n "$1" ]; do - case "X$1" in - X--record-csv) - para_record_csv=$2 - if [ -z "${para_record_csv}" ]; then - echo "Please specify the value for --record-csv option" - exit 1 - fi - shift 2 - ;; - X--verbose-output) - para_verbose_output=$2 - if [ -z "${para_verbose_output}" ]; then - echo "Please specify the value for --verbose-output option" - exit 1 - fi - shift 2 - ;; - X--loop-count) - para_loop_count=$2 - if [ -z "${para_loop_count}" ]; then - echo "Please specify the value for --loop-count option" - exit 1 - fi - shift 2 - ;; - X-h|X--help) - func_print_usage_common - exit 1 - ;; - X-*) - echo "Unknown option: $1" - func_print_usage_common - exit 1 - ;; - X*) - func_print_usage_common - exit 1 - ;; - esac - done - - if [ -n "${para_loop_count}" ]; then - tmp_str=$(echo "${para_loop_count}"|tr -d '[:digit:]') - if [ -z "${tmp_str}" ]; then - G_LOOP_COUNT=${para_loop_count} - else - echo "The specified LOOP_COUNT(${para_loop_count}) is not valid" - exit 1 - fi - fi - - if [ -n "${para_record_csv}" ] && [ "X${para_record_csv}" = "XTRUE" ];then - G_RECORD_LOCAL_CSV=TRUE - elif [ -n "${para_record_csv}" ];then - G_RECORD_LOCAL_CSV=FALSE - fi - - if [ -n "${para_verbose_output}" ] && [ "X${para_verbose_output}" = "XTRUE" ];then - G_VERBOSE_OUTPUT=TRUE - elif [ -n "${para_record_csv}" ];then - G_VERBOSE_OUTPUT=FALSE - fi -} - -## Description: -## common framework to run test multiple times -## also write result into one csv file for comparing manually -## Usage: -## output_test_result $test_name $result [ $measurement [ $units ] ] -## Note: -## RECORD_RESULT_LOCAL: when this environment variant is set to "TRUE", -## the result will be recorded in a csv file in the following path: -## rawdata/final_result.csv -run_test(){ - func_parse_parameters_common "$@" - if [ "X${G_RECORD_LOCAL_CSV}" = "XTRUE" ]; then - [ -f "${F_RAW_DATA_CSV}" ] && rm "${F_RAW_DATA_CSV}" - [ -f "${F_STATISTIC_DATA_CSV}" ] && rm "${F_STATISTIC_DATA_CSV}" - mkdir -p "$(dirname ${F_RAW_DATA_CSV})" - fi - - loop_index=0 - while [ "${loop_index}" -lt "${G_LOOP_COUNT}" ]; do - if [ -n "${var_test_func}" ]; then - ${var_test_func} - fi - loop_index=$((loop_index + 1)) - done - - if [ "X${G_RECORD_LOCAL_CSV}" = "XTRUE" ]; then - statistic ${F_RAW_DATA_CSV} 2 |tee ${F_STATISTIC_DATA_CSV} - sed -i 's/=/,/' "${F_STATISTIC_DATA_CSV}" - - attach_cmd="lava-test-run-attach" - if [ -n "$(which ${attach_cmd})" ]; then - if [ -f "${F_RAW_DATA_CSV}" ]; then - ${attach_cmd} ${F_RAW_DATA_CSV} text/plain - fi - if [ -f "${F_STATISTIC_DATA_CSV}" ]; then - ${attach_cmd} ${F_STATISTIC_DATA_CSV} text/plain - fi - fi - fi -} diff --git a/android/scripts/configure-nexus5x-for-benchmarks.sh b/android/scripts/configure-nexus5x-for-benchmarks.sh deleted file mode 100755 index e68ff56d..00000000 --- a/android/scripts/configure-nexus5x-for-benchmarks.sh +++ /dev/null @@ -1,60 +0,0 @@ -#!/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 -adb -s $IPADDR wait-for-device -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 deleted file mode 100755 index d7de59c7..00000000 --- a/android/scripts/configure-nexus9-for-benchmarks.sh +++ /dev/null @@ -1,12 +0,0 @@ -#!/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 deleted file mode 100755 index a55c7236..00000000 --- a/android/scripts/cts.py +++ /dev/null @@ -1,238 +0,0 @@ -#!/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('Module'): - # Naming: Package Name + Test Case Name + Test Name - if 'abi' in elem.attrib.keys(): - package_name = '.'.join([elem.attrib['abi'], elem.attrib['name']]) - else: - package_name = elem.attrib['name'] - 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/results' -test_result = 'test_result.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/dalvik-vm-unit-tests.sh b/android/scripts/dalvik-vm-unit-tests.sh deleted file mode 100755 index 9c40c73f..00000000 --- a/android/scripts/dalvik-vm-unit-tests.sh +++ /dev/null @@ -1,30 +0,0 @@ -#!/system/bin/sh -# -# Dalvik-VM unit tests. -# -# Copyright (C) 2012, 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: Amit Pundir <amit.pundir@linaro.org> -# - -chmod 777 /data/nativetest/dalvik-vm-unit-tests/dalvik-vm-unit-tests -/data/nativetest/dalvik-vm-unit-tests/dalvik-vm-unit-tests -if [ $? -eq 0 ]; then - echo "dalvik-vm-unit-tests=pass" -else - echo "dalvik-vm-unit-tests=fail" -fi diff --git a/android/scripts/devicetree-android.sh b/android/scripts/devicetree-android.sh deleted file mode 100755 index b38bd174..00000000 --- a/android/scripts/devicetree-android.sh +++ /dev/null @@ -1,95 +0,0 @@ -#!/system/bin/sh -# -# Device Tree test cases for Linaro Android -# -# 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: Botao Sun <botao.sun@linaro.org> - -check_return_fail() { - if [ $? -ne 0 ]; then - fail_test "$1" - return 0 - else - return 1 - fi -} - -fail_test() { - local reason=$1 - echo "${TEST}: FAIL - ${reason}" -} - -pass_test() { - echo "${TEST}: PASS" -} - -check_root() { - if [ `whoami` = "root" ]; then - return 0 - else - return 1 - fi -} - -## Test case definitions - -# Check if /proc/device-tree is available -test_has_proc_device_tree() { - TEST="has_proc_device_tree" - - if [ ! -d /proc/device-tree ]; then - fail_test "Unable to find /proc/device-tree" - return 1 - fi - - find /proc/device-tree - - pass_test -} - -# Check if model is not empty -test_device_tree_model_not_empty() { - TEST="device_tree_model_not_empty" - - if [ ! -f /proc/device-tree/model ]; then - fail_test "Unable to find /proc/device-tree/model" - return 1 - fi - - model=`cat /proc/device-tree/model` - if [ -z "$model" ]; then - fail_test "Empty model description at /proc/device-tree/model" - return 1 - fi - - echo "MODEL: $model" 1>&2 - - pass_test -} - -# check we're root -if ! check_root; then - error_msg "Please run the test case as root" -fi - -# run the tests -test_has_proc_device_tree -test_device_tree_model_not_empty - -# clean exit so lava-test can trust the results -exit 0 diff --git a/android/scripts/ethernet-android.sh b/android/scripts/ethernet-android.sh deleted file mode 100755 index 276f1da4..00000000 --- a/android/scripts/ethernet-android.sh +++ /dev/null @@ -1,155 +0,0 @@ -#!/system/bin/sh -# -# Ethernet test cases for Linaro Android -# -# 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: Botao Sun <botao.sun@linaro.org> - -check_return_fail() { - if [ $? -ne 0 ]; then - fail_test "$1" - return 0 - else - return 1 - fi -} - -fail_test() { - local reason=$1 - echo "${TEST}: FAIL - ${reason}" -} - -pass_test() { - echo "${TEST}: PASS" -} - -## Test case definitions -# Check Ethernet can be disabled or not -test_disable_ethernet() { - TEST="disable_ethernet" - - echo `which busybox` - busybox ifconfig eth0 down - - if [ $? -ne 0 ]; then - fail_test "Ethernet disable failed" - return 1 - fi - - sleep 20 - - echo "###########################################" - busybox ifconfig -a - echo "###########################################" - - busybox ifconfig eth0 | grep "inet addr" - - if [ $? -ne 1 ]; then - fail_test "Ethernet IP address still exists" - return 1 - fi - - pass_test -} - -# Check Ethernet can be enabled or not -test_enable_ethernet() { - TEST="enable_ethernet" - - echo `which busybox` - busybox ifconfig eth0 up - - if [ $? -ne 0 ]; then - fail_test "Ethernet enable failed" - return 1 - fi - - sleep 20 - - echo "###########################################" - busybox ifconfig -a - echo "###########################################" - - busybox ifconfig eth0 | grep "inet addr" - - if [ $? -ne 0 ]; then - fail_test "Ethernet IP not found" - return 1 - fi - - pass_test -} - -# Ethernet ping test -test_ethernet_ping() { - TEST="ethernet_ping" - - echo `which busybox` - busybox ifconfig eth0 up - - sleep 20 - - echo "###########################################" - busybox ifconfig -a - echo "###########################################" - - busybox ifconfig eth0 | grep "inet addr" - if [ $? -ne 0 ]; then - fail_test "Ethernet IP not found" - return 1 - fi - - # Get ip address from Ethernet interface - ip_address_line=`busybox ifconfig eth0 | grep "inet addr"` - echo $ip_address_line - - ip_address_element=$(echo $ip_address_line | awk '{print $2}') - echo $ip_address_element - - ip_address=$(echo $ip_address_element | awk -F: '{print $2}') - echo $ip_address - - # Ping test here - ping -c 5 -I ${ip_address} www.google.com - if [ $? -ne 0 ]; then - fail_test "Ping test failed from $ip_address" - return 1 - fi - - # Packet loss report - packet_loss_line=`ping -c 5 -I ${ip_address} www.google.com | grep "packet loss"` - echo $packet_loss_line - - packet_loss=$(echo $packet_loss_line | awk '{print $6}') - echo "The packet loss rate is $packet_loss" - - if [ "$packet_loss" != "0%" ]; then - fail_test "Packet loss happened, rate is $packet_loss" - return 1 - fi - - pass_test -} - -# run the tests -test_disable_ethernet -test_enable_ethernet -test_ethernet_ping - -# clean exit so lava-test can trust the results -exit 0 diff --git a/android/scripts/gator-data-streaming.sh b/android/scripts/gator-data-streaming.sh deleted file mode 100755 index 88957331..00000000 --- a/android/scripts/gator-data-streaming.sh +++ /dev/null @@ -1,111 +0,0 @@ -#!/system/bin/sh -# -# Gator data streaming test for Linaro Android -# -# 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: Botao Sun <botao.sun@linaro.org> - -check_return_fail() { - if [ $? -ne 0 ]; then - fail_test "$1" - return 0 - else - return 1 - fi -} - -fail_test() { - local reason=$1 - echo "${TEST}: FAIL - ${reason}" -} - -pass_test() { - echo "${TEST}: PASS" -} - -check_root() { - if [ `whoami` = "root" ]; then - return 0 - else - return 1 - fi -} - -# Create sample XML file as a template -echo "<?xml version=\"1.0\" encoding=\"US-ASCII\" ?> " > $EXTERNAL_STORAGE/session.xml -echo "<session version=\"1\" output_path=\"x\" call_stack_unwinding=\"yes\" parse_debug_info=\"yes\" " >> $EXTERNAL_STORAGE/session.xml -echo "high_resolution=\"no\" buffer_mode=\"streaming\" sample_rate=\"normal\" duration=\"10\" " >> $EXTERNAL_STORAGE/session.xml -echo "target_host=\"linaro-android-boards\" target_port=\"8080\"> " >> $EXTERNAL_STORAGE/session.xml -echo "</session>" >> $EXTERNAL_STORAGE/session.xml - -## Test case definitions - -# Check whether session.xml is available -test_session_xml_not_empty() { - TEST="session_xml_not_empty" - - if [ ! -f $EXTERNAL_STORAGE/session.xml ]; then - fail_test "Unable to find $EXTERNAL_STORAGE/session.xml" - return 1 - fi - - session_file=`cat $EXTERNAL_STORAGE/session.xml` - if [ -z "$session_file" ]; then - fail_test "Empty template session XML file at $EXTERNAL_STORAGE/session.xml" - return 1 - fi - - pass_test -} - -# Check the gator data streaming command -test_gator_data_streaming_cmd() { - TEST="gator_data_streaming_cmd" - /system/bin/gatord -s $EXTERNAL_STORAGE/session.xml -o $EXTERNAL_STORAGE/linaro-android-gator-data-streaming.apc - if [ $? -ne 0 ]; then - fail_test "Run gator data streaming command failed" - return 1 - fi - - pass_test -} - -# Check whether data streaming result is available -test_gator_data_streaming_result() { - TEST="gator_data_streaming_result" - if [ ! -d $EXTERNAL_STORAGE/linaro-android-gator-data-streaming.apc ]; then - fail_test "Gator data streaming result folder doesn't exist" - return 1 - elif [ ! -f $EXTERNAL_STORAGE/linaro-android-gator-data-streaming.apc/captured.xml ]; then - fail_test "File captured.xml doesn't exist" - return 1 - elif [ ! -s $EXTERNAL_STORAGE/linaro-android-gator-data-streaming.apc/captured.xml ]; then - fail_test "File captured.xml is empty" - return 1 - fi - - pass_test -} - -# run the tests -test_session_xml_not_empty -test_gator_data_streaming_cmd -test_gator_data_streaming_result - -# clean exit so lava-test can trust the results -exit 0 diff --git a/android/scripts/gatortest.sh b/android/scripts/gatortest.sh deleted file mode 100755 index 4a72c6a2..00000000 --- a/android/scripts/gatortest.sh +++ /dev/null @@ -1,30 +0,0 @@ -#!/system/bin/sh -# -# gator test. -# -# Copyright (C) 2013, 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. -# -# owner: harigopal.gollamudi@linaro.org -# -############################################################################### -if ps | grep "gatord" -then - echo "gatord_daemon_check=pass" -else - echo "gatord_daemon_check=fail" -fi diff --git a/android/scripts/glmark2.sh b/android/scripts/glmark2.sh deleted file mode 100755 index 8377aa2a..00000000 --- a/android/scripts/glmark2.sh +++ /dev/null @@ -1,30 +0,0 @@ -#!/system/bin/sh -# -# glmark2 -# -# Copyright (C) 2013, 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. -# owner: harigopal.gollamudi@linaro.org -# - -logcat -c -am start org.linaro.glmark2/.Glmark2Activity -if logcat -v time | grep -qnri "Set up failed" -then - echo "successfully exited" - logcat -d | grep "I/glmark2" | sed -e 's/] /_/g' -e 's/=/_/g' -e 's/,/_/g' -e 's/;/_/g' -e 's/<//g' -e 's/>//g' -e 's/\[//g' -e 's/\///g' -e 's/Iglmark2//g' -e 's/( 4435)://g' | awk 'BEGIN{FS=""} {print $0 " pass "}' - exit 0 -fi diff --git a/android/scripts/gtest.sh b/android/scripts/gtest.sh deleted file mode 100755 index a57b2c4d..00000000 --- a/android/scripts/gtest.sh +++ /dev/null @@ -1,99 +0,0 @@ -#!/system/bin/sh -# -# gtest test case for Linux Linaro Android -# -# Copyright (C) 2012 - 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: Chase Qi <chase.qi@linaro.org> -# Milosz Wasilewski <milosz.wasilewski@linaro.org> -# - -TESTS=$1 -ScriptDIR="`pwd`" -FilesDIR="/data/data/org.linaro.gparser/files" - -# Download and install gparser.apk -wget http://testdata.validation.linaro.org/tools/gparser.apk -chmod -R 777 $ScriptDIR -pm install "$ScriptDIR/gparser.apk" -mkdir $FilesDIR -# Print the most recent 50 lines and exit logcat -logcat -t 50 - -for i in $TESTS; do - # Use the last field as test case name, NF refers to the - # number of fields of the whole string. - TestCaseName="`echo $i |awk -F '/' '{print $NF}'`" - - if [ -f $i ]; then - chmod 755 $i - LOOPS=$2 - Count=1 - else - echo "$i file NOT found." - lava-test-case $TestCaseName --result fail - continue - fi - - while [ $Count -le $LOOPS ]; do - # Run tests. - echo "Running $TestCaseName tests (iteration $Count) . . ." - # Nonzero exit code will terminate test script, use "||true" as work around. - $i --gtest_output="xml:$ScriptDIR/$TestCaseName-$Count.xml" || true - if [ -f $ScriptDIR/$TestCaseName-$Count.xml ]; then - echo "Generated XML report successfully." - else - echo "$TestCaseName-$Count XML report NOT found." - lava-test-case $TestCaseName --result fail - continue - fi - - # Parse test result. - cp $ScriptDIR/$TestCaseName-$Count.xml $FilesDIR/TestResults.xml - chmod -R 777 $FilesDIR - # Start gparser MainActivity, TestResults.xml will be parsed automatically. - # Parsed result will be saved as ParsedTestResults.txt under the same directory. - am start -n org.linaro.gparser/.MainActivity - sleep 15 - # Stop gparser for the next loop. - am force-stop org.linaro.gparser - # Print the most recent 50 lines and exit logcat - logcat -t 50 - if [ -f $FilesDIR/ParsedTestResults.txt ]; then - echo "XML report parsed successfully." - mv $FilesDIR/ParsedTestResults.txt $ScriptDIR/$TestCaseName-$Count.ParsedTestResults.txt - else - echo "Failed to parse $TestCaseName-$Count test result." - lava-test-case $TestCaseName --result fail - continue - fi - - # Collect test results. - while read line; do - TestCaseID="`echo $line | awk '{print $1}'`" - TestResult="`echo $line | awk '{print $2}'`" - TestDuration="`echo $line | awk '{print $3}'`" - # Use test case name as prefix to amend TestCaseID. - lava-test-case $TestCaseName.$TestCaseID --result $TestResult --measurement $TestDuration --units s - done < $ScriptDIR/$TestCaseName-$Count.ParsedTestResults.txt - - Count=$((Count+1)) - done -done - -# Uninstall gparser -pm uninstall org.linaro.gparser diff --git a/android/scripts/homescreen.sh b/android/scripts/homescreen.sh deleted file mode 100755 index cbc2201b..00000000 --- a/android/scripts/homescreen.sh +++ /dev/null @@ -1,38 +0,0 @@ -#!/system/bin/sh -# -# Homescreen test. -# -# Copyright (C) 2012, 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: Vishal Bhoj <vishal.bhoj@linaro.org> -# - -timeout=0 -while(true) -do - echo "Waiting for Homescreen ..." - if logcat -d | grep -rni "Displayed com.android.launcher/com.android.launcher2.Launcher:" ; then - echo "Homescreen=pass" - break - fi - sleep 60 - timeout=$((timeout+1)) - if [ $timeout = 30 ]; then - echo "Homescreen=fail" - break; - fi -done diff --git a/android/scripts/ime.sh b/android/scripts/ime.sh deleted file mode 100755 index 6a4b1144..00000000 --- a/android/scripts/ime.sh +++ /dev/null @@ -1,36 +0,0 @@ -#!/system/bin/sh -# -# ime test. -# -# Copyright (C) 2013, 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. -# -# owner: harigopal.gollamudi@linaro.org -# -############################################################################## - -test_func(){ - if [ ! -f /system/bin/ime ]; then - echo "ime=fail" - exit - fi - - /system/bin/ime list -a - echo "ime=pass" -} - -test_func diff --git a/android/scripts/iozone/iozone.sh b/android/scripts/iozone/iozone.sh deleted file mode 100755 index 5807d804..00000000 --- a/android/scripts/iozone/iozone.sh +++ /dev/null @@ -1,38 +0,0 @@ -#!/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 - -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 diff --git a/android/scripts/iozone/iozoneparser.sh b/android/scripts/iozone/iozoneparser.sh deleted file mode 100755 index c2239032..00000000 --- a/android/scripts/iozone/iozoneparser.sh +++ /dev/null @@ -1,47 +0,0 @@ -#!/system/bin/sh -# -# iozoneparser -# -# 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> - -grep -A 13 "KB reclen write rewrite" stdout.log | sed '1d' > temp.log - -while read line -do - var="$(echo $line | cut -d' ' -f2)" - - Write_val="$(echo $line | cut -d' ' -f3)" - ReWrite_val="$(echo $line | cut -d' ' -f4)" - RandomRead_val="$(echo $line | cut -d' ' -f5)" - RandomWrite_val="$(echo $line | cut -d' ' -f6)" - - 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 - -done < temp.log - -rm -rf temp.log diff --git a/android/scripts/libc-bench.sh b/android/scripts/libc-bench.sh deleted file mode 100755 index 961a743a..00000000 --- a/android/scripts/libc-bench.sh +++ /dev/null @@ -1,60 +0,0 @@ -#!/system/bin/sh - -local_file_path="$0" -local_file_parent=$(cd $(dirname ${local_file_path}); pwd) -. ${local_file_parent}/common.sh - -test_stringbench(){ - local cmd=$1 && shift - local prefix=$1 && shift - if [ -z "${cmd}" ]; then - return - fi - if [ ! -x "${cmd}" ]; then - return - fi - if [ -n "$prefix" ]; then - prefix="${prefix}_" - fi - - local oldkey="" - local newkey="" - local value_line=""= - for res_line in $(${cmd} |tr -d ' '); do - if echo "${res_line}"|grep -q '^b_'; then - if [ -n "${oldkey}" ] && [ -n "${value_line}" ]; then - local time_value=$(echo ${value_line}|cut -d, -f1|cut -d: -f2) - local virt_value=$(echo ${value_line}|cut -d, -f2|cut -d: -f2) - local res_value=$(echo ${value_line}|cut -d, -f3|cut -d: -f2) - local dirty_value=$(echo ${value_line}|cut -d, -f4|cut -d: -f2) - output_test_result "${prefix}${oldkey}_time" "pass" "${time_value}" "seconds" - output_test_result "${prefix}${oldkey}_virt" "pass" "${virt_value}" "kB" - output_test_result "${prefix}${oldkey}_res" "pass" "${res_value}" "kB" - output_test_result "${prefix}${oldkey}_dirty" "pass" "${dirty_value}" "kB" - fi - newkey=$(echo $res_line|tr -c '[:alnum:]' '_'|tr -s '_' |sed 's/_$//') - value_line="" - oldkey=${newkey} - continue - fi - - if echo "${res_line}"|grep -q '^time:'; then - value_line="${res_line}" - continue - fi - done -} - -test_func(){ - stringbench="/system/xbin/libcbench" - stringbench64="/system/xbin/libcbench64" - test_stringbench "${stringbench}" "32Bit" - test_stringbench "${stringbench64}" "64Bit" -} - -main(){ - var_test_func="test_func" - run_test "$@" -} - -main "$@" diff --git a/android/scripts/media_codecs_functional_tests.sh b/android/scripts/media_codecs_functional_tests.sh deleted file mode 100755 index 66421e67..00000000 --- a/android/scripts/media_codecs_functional_tests.sh +++ /dev/null @@ -1,38 +0,0 @@ -#!/system/bin/sh -# -# Media Codecs Functional Tests -# -# Copyright (C) 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. -# -# owner: edmund.szeto@linaro.org -# -############################################################################## - -test_func(){ - if [ ! -f /system/bin/linaro-android-userspace-tests.sh ]; then - echo "[media_codecs_functional_tests]: test failed" - exit - fi - - /system/bin/linaro-android-userspace-tests.sh -} - -test_func - -# clean exit so that lava-test-shell can trust the results -exit 0 diff --git a/android/scripts/meminfo.sh b/android/scripts/meminfo.sh deleted file mode 100755 index f743e07b..00000000 --- a/android/scripts/meminfo.sh +++ /dev/null @@ -1,67 +0,0 @@ -#!/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/memtester.sh b/android/scripts/memtester.sh deleted file mode 100755 index d5c37ab8..00000000 --- a/android/scripts/memtester.sh +++ /dev/null @@ -1,26 +0,0 @@ -#!/system/bin/sh -# -# memtester 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> - -memtester 1M 1 | sed -n '/ ok/p' | sed -e 's/ok/pass/g' > stdout.log 2>&1 -cat stdout.log -rm -rf stdout.log diff --git a/android/scripts/mmtest.sh b/android/scripts/mmtest.sh deleted file mode 100755 index 53983586..00000000 --- a/android/scripts/mmtest.sh +++ /dev/null @@ -1,101 +0,0 @@ -#!/system/bin/sh -# -# mmtest test. -# -# Copyright (C) 2013, 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. -# -# owner: harigopal.gollamudi@linaro.org -# -############################################################################### - -cd /mnt/sdcard -logcat -c - -echo "mmtest start" - -netcfg eth0 dhcp -setprop net.dns1 8.8.8.8 - -echo "Content downloading" - -cd /mnt/media_rw/sdcard0 -mkdir media_api -cd media_api - -wget http://samplemedia.linaro.org/Mmtest/media_api/goldenThumbnail.png - -mkdir music -mkdir video -mkdir videoeditor - -cd music -wget http://samplemedia.linaro.org/Mmtest/media_api/music/MP3_48KHz_128kbps_s_1_17.mp3 -wget http://samplemedia.linaro.org/Mmtest/media_api/music/MP3_48KHz_128kbps_s_1_17_ABR.mp3 -wget http://samplemedia.linaro.org/Mmtest/media_api/music/MP3_48KHz_128kbps_s_1_17_CBR.mp3 -wget http://samplemedia.linaro.org/Mmtest/media_api/music/MP3_48KHz_128kbps_s_1_17_ID3V1.mp3 -wget http://samplemedia.linaro.org/Mmtest/media_api/music/MP3_48KHz_128kbps_s_1_17_ID3V1_ID3V2.mp3 -wget http://samplemedia.linaro.org/Mmtest/media_api/music/MP3_48KHz_128kbps_s_1_17_ID3V2.mp3 -wget http://samplemedia.linaro.org/Mmtest/media_api/music/MP3_48KHz_128kbps_s_1_17_VBR.mp3 -wget http://samplemedia.linaro.org/Mmtest/media_api/music/SHORTMP3.mp3 -wget http://samplemedia.linaro.org/Mmtest/media_api/music/ants.mid -wget http://samplemedia.linaro.org/Mmtest/media_api/music/bzk_chic.wav -wget http://samplemedia.linaro.org/Mmtest/media_api/music/sine_200+1000Hz_44K_mo.wav -wget http://samplemedia.linaro.org/Mmtest/media_api/music/test_amr_ietf.amr - -cd ../video -wget http://samplemedia.linaro.org/Mmtest/media_api/video/H263_56_AAC_24.3gp -wget http://samplemedia.linaro.org/Mmtest/media_api/video/H263_56_AMRNB_6.3gp -wget http://samplemedia.linaro.org/Mmtest/media_api/video/H263_500_AMRNB_12.3gp -wget http://samplemedia.linaro.org/Mmtest/media_api/video/H264_320_AAC_64.3gp -wget http://samplemedia.linaro.org/Mmtest/media_api/video/H264_320_AMRNB_6.3gp -wget http://samplemedia.linaro.org/Mmtest/media_api/video/H264_500_AAC_128.3gp -wget http://samplemedia.linaro.org/Mmtest/media_api/video/H264_HVGA_500_NO_AUDIO.3gp -wget http://samplemedia.linaro.org/Mmtest/media_api/video/H264_QVGA_500_NO_AUDIO.3gp -wget http://samplemedia.linaro.org/Mmtest/media_api/video/MPEG4_320_AAC_64.mp4 -wget http://samplemedia.linaro.org/Mmtest/media_api/video/big-buck-bunny_trailer.webm -wget http://samplemedia.linaro.org/Mmtest/media_api/video/border_large.3gp - -cd ../videoeditor -wget http://samplemedia.linaro.org/Mmtest/media_api/videoeditor/AACLC_44.1kHz_256kbps_s_1_17.mp4 -wget http://samplemedia.linaro.org/Mmtest/media_api/videoeditor/AACLC_48KHz_256Kbps_s_1_17.3gp -wget http://samplemedia.linaro.org/Mmtest/media_api/videoeditor/AMRNB_8KHz_12.2Kbps_m_1_17.3gp -wget http://samplemedia.linaro.org/Mmtest/media_api/videoeditor/H263_profile0_176x144_10fps_96kbps_0_25.3gp -wget http://samplemedia.linaro.org/Mmtest/media_api/videoeditor/H263_profile0_176x144_10fps_256kbps_0_25.3gp -wget http://samplemedia.linaro.org/Mmtest/media_api/videoeditor/H263_profile0_176x144_10fps_256kbps_1_17.3gp -wget http://samplemedia.linaro.org/Mmtest/media_api/videoeditor/H263_profile0_176x144_15fps_128kbps_1_35.3gp -wget http://samplemedia.linaro.org/Mmtest/media_api/videoeditor/H263_profile0_176x144_15fps_256kbps_AACLC_16kHz_32kbps_m_0_26.3gp -wget http://samplemedia.linaro.org/Mmtest/media_api/videoeditor/H263_profile0_176x144_15fps_256kbps_AACLC_32kHz_128kbps_s_0_26.3gp -wget http://samplemedia.linaro.org/Mmtest/media_api/videoeditor/H263_profile0_176x144_15fps_256kbps_AACLC_32kHz_128kbps_s_1_17.3gp -wget http://samplemedia.linaro.org/Mmtest/media_api/videoeditor/H264_BP_176x144_15fps_144kbps_AMRNB_8kHz_12.2kbps_m_1_17.3gp -wget http://samplemedia.linaro.org/Mmtest/media_api/videoeditor/H264_BP_640x480_12.5fps_256kbps_AACLC_16khz_24kbps_s_0_26.mp4 -wget http://samplemedia.linaro.org/Mmtest/media_api/videoeditor/H264_BP_640x480_15fps_384kbps_60_0.mp4 -wget http://samplemedia.linaro.org/Mmtest/media_api/videoeditor/H264_BP_640x480_15fps_1200Kbps_AACLC_48KHz_32kbps_m_1_17.3gp -wget http://samplemedia.linaro.org/Mmtest/media_api/videoeditor/H264_BP_640x480_12.5fps_256kbps_AACLC_16khz_24kbps_s_0_26.mp4 -wget http://samplemedia.linaro.org/Mmtest/media_api/videoeditor/H264_BP_640x480_15fps_384kbps_60_0.mp4 - - -if [ -f /mnt/media_rw/sdcard0/media_api/music/test_amr_ietf.amr ] -then -echo "file is downloaded" -fi - -logcat -c - -am instrument -r -e targetDir /storage/sdcard0/media_api/music -w com.android.mediaframeworktest/.MediaFrameworkTestRunner > stdout.log - -egrep "INSTRUMENTATION_STATUS: test=|INSTRUMENTATION_STATUS_CODE:" stdout.log |cut -d'=' -f 2 |cut -d ':' -f 2 |xargs -n 4 |sed -e 's/0/pass/g' -e 's/-1/fail/g' -e 's/-2/fail/g' | awk '{$1=""; print $3" "$4}' diff --git a/android/scripts/optee-xtest.sh b/android/scripts/optee-xtest.sh deleted file mode 100755 index 14ccb649..00000000 --- a/android/scripts/optee-xtest.sh +++ /dev/null @@ -1,115 +0,0 @@ -#!/system/bin/sh -# -# Run OP-TEE sanity test suite. -# -# Copyright (C) 2010 - 2016, 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: Chase Qi <chase.qi@linaro.org> - -LEVEL="$1" -TEST_SUITE="$2" - -pass_fail_parser() { - local field="$1" - # Collect test case ID and case name, then join them with minus. - grep "^\* ${TEST_SUITE}" "${TEST_SUITE}"_output.txt \ - | cut -d "_" -f"${field}"- \ - | sed 's/ /-/g' > "${TEST_SUITE}"_case_list.txt - - # Get test result for each test case, update result file and send to LAVA. - rm -f "${TEST_SUITE}"_result.txt - while read line; do - test_id=$(echo "${line}" | awk -F'-' '{ print $1 }') - test_case="${line}" - test_result=$(grep -m 1 "^${TEST_SUITE}.*${test_id} [OK|FAILED]" \ - "${TEST_SUITE}"_output.txt | awk '{ print $2 }') - - if [ "${test_result}" = "OK" ]; then - echo "${test_case} pass" >> "${TEST_SUITE}"_result.txt - lava-test-case "${test_case}" --result "pass" - else - echo "${test_case} fail" >> "${TEST_SUITE}"_result.txt - lava-test-case "${test_case}" --result "fail" - fi - done < "${TEST_SUITE}"_case_list.txt - - rm -f "${TEST_SUITE}"_case_list.txt -} - -benchmark_parser() { - while read line; do - test_id=$(echo "${line}" | awk -F'-' '{ print $1 }') - test_case=$(echo "${line}" | awk '{ print $1 }') - test_result=$(echo "${line}" | awk '{ print $2 }') - sed -n "/^\* ${TEST_SUITE}.*_${test_id}/,/${TEST_SUITE}.*_${test_id} [OK|FAILED]/p" \ - "${TEST_SUITE}"_output.txt > "${test_id}"_benchmark_raw.txt - - grep "[0-9].*|" "${test_id}"_benchmark_raw.txt \ - | awk -v test_case="${test_case}" '{data_size=$1; speed=$NF; \ - print test_case"-"data_size" "speed; }' \ - > "${test_id}"_benchmark.txt - rm -f "${test_id}"_benchmark_raw.txt - - while read line; do - test_case=$(echo "${line}" | awk '{ print $1 }') - test_measurement=$(echo "${line}" | awk '{ print $2 }') - lava-test-case "${test_case}" --result "${test_result}" \ - --measurement "${test_measurement}" --units "kB/s" - done < "${test_id}"_benchmark.txt - done < "${TEST_SUITE}"_result.txt -} - -stats_parser() { - for i in "subtests" "test cases"; do - stats=$(egrep "^[0-9]+ $i of which [0-9]+ failed" \ - "${TEST_SUITE}"_output.txt) - total=$(echo "${stats}" | awk '{print $1}') - fails=$(echo "${stats}" | awk '{print $(NF-1)}') - passes=$(( total - fails )) - - test "$i" = "test cases" && i="tests" - lava-test-case "xtest-$i-fails" --result "pass" \ - --measurement "${fails}" --units "tests" - lava-test-case "xtest-$i-passes" --result "pass" \ - --measurement "${passes}" --units "tests" - lava-test-case "xtest-$i-fail-rate" --result "pass" \ - --measurement "${fails}"/"${total}" --units "percent" - done - - skip=$(egrep "^[0-9]+ test case was skipped" \ - "${TEST_SUITE}"_output.txt | awk '{print $1}') - lava-test-case xtest-tests-skipped --result "pass" \ - --measurement "${skip}" --units "tests" - -} - -# Run xtest -xtest -l "${LEVEL}" -t "${TEST_SUITE}" 2>&1 | tee "${TEST_SUITE}"_output.txt -if [ $? -eq 0 ]; then - lava-test-case "optee-xtest-run" --result "pass" -else - lava-test-case "optee-xtest-run" --result "fail" -fi - -# Parse test result. -stats_parser -if [ "${TEST_SUITE}" = "regression" ]; then - pass_fail_parser 3 -elif [ "${TEST_SUITE}" = "benchmark" ]; then - pass_fail_parser 4 - benchmark_parser -fi diff --git a/android/scripts/parse-lat.py b/android/scripts/parse-lat.py deleted file mode 100644 index 584ef71c..00000000 --- a/android/scripts/parse-lat.py +++ /dev/null @@ -1,54 +0,0 @@ -import json -from base64 import standard_b64decode -from os import mkdir, chdir, path -from optparse import OptionParser -from random import choice -from string import ascii_uppercase -from subprocess import call - - -if __name__ == '__main__': - usage = "usage: %prog -f <results file> -t <test name>" - parser = OptionParser(usage=usage) - parser.add_option("-f", "--file", dest="filename", - help="result file", metavar="FILE") - parser.add_option("-t", "--testcase", dest="testcase", - help="lava-android-test test name") - - (options, args) = parser.parse_args() - - if not options.filename: - parser.error("Results file is mandatory") - if not options.testcase: - parser.error("Test name is mandatory") - - source = file(options.filename, "rb") - bundle = json.loads(source.read()) - - for run in bundle['test_runs']: - test_id = run['test_id'] - print "total number of results in %s: %s" % (test_id, len(run['test_results'])) - for index, result in enumerate(run['test_results']): - print "TESTCASE: %s-[%s.%s] - %s (%s)" % ( - options.testcase, - test_id.replace(" ", "_"), - result['test_case_id'].replace(" ", "_"), - result['result'], - index) - print "LAVA TEST CASE SECTION FINISHED!" - if 'attachments' in run: - attachments_dir_name = ''.join(choice(ascii_uppercase) for _ in range(6)) - mkdir(attachments_dir_name) - for attachment in run['attachments']: - print "Extracting %s to %s" % (attachment['pathname'], attachments_dir_name) - attachment_file = open( - path.join(attachments_dir_name, - attachment['pathname']), - 'wb') - attachment_file.write(standard_b64decode(attachment['content'])) - attachment_file.close() - chdir(attachments_dir_name) - call(["lava-test-run-attach", - attachment['pathname'], - attachment['mime_type']]) - chdir("..") diff --git a/android/scripts/parse-ubenchmarks-results.sh b/android/scripts/parse-ubenchmarks-results.sh deleted file mode 100755 index f27955c1..00000000 --- a/android/scripts/parse-ubenchmarks-results.sh +++ /dev/null @@ -1,15 +0,0 @@ -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/piglit-gles-2.0.sh b/android/scripts/piglit-gles-2.0.sh deleted file mode 100755 index db1544da..00000000 --- a/android/scripts/piglit-gles-2.0.sh +++ /dev/null @@ -1,49 +0,0 @@ -#!/system/bin/sh -# -# piglit gles2.0 test. -# -# Copyright (C) 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. -# -# owner: yongqin.liu@linaro.org -# -############################################################################### - -PIGLIT_PLATFORM=android -export PIGLIT_PLATFORM - -PSTRING='PIGLIT: {"result": "pass"' -SSTRING='PIGLIT: {"result": "skip"' -FSTRING='PIGLIT: {"result": "fail"' - -gles2_bin_dir="/system/xbin/piglit/piglit-spec-gles2" - -normal_test(){ - cmd="${gles2_bin_dir}/$1" - test_name="${1}" - RESULT=$(${cmd} -auto) - case $RESULT in - *"$PSTRING"*) echo "${test_name}: pass";; - *"$SSTRING"*) echo "${test_name}: skip";; - *"$FSTRING"*) echo "${test_name}: fail";; - *) echo "${test_name}: fail";; - esac -} - -normal_test "glsl-fs-pointcoord_gles2" -normal_test "minmax_gles2" -normal_test "multiple-shader-objects_gles2" diff --git a/android/scripts/piglit-gles-3.0.sh b/android/scripts/piglit-gles-3.0.sh deleted file mode 100755 index afce5af7..00000000 --- a/android/scripts/piglit-gles-3.0.sh +++ /dev/null @@ -1,70 +0,0 @@ -#!/system/bin/sh -# -# piglit gles3.0 test. -# -# Copyright (C) 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. -# -# owner: yongqin.liu@linaro.org -# -############################################################################### - -PIGLIT_PLATFORM=android -export PIGLIT_PLATFORM - -PSTRING='PIGLIT: {"result": "pass"' -SSTRING='PIGLIT: {"result": "skip"' -FSTRING='PIGLIT: {"result": "fail"' - -gles3_bin_dir=/system/xbin/piglit/piglit-spec-gles3 - -normal_test(){ - cmd="${gles3_bin_dir}/$1" - test_name="${1}" - RESULT=$(${cmd} -auto) - case $RESULT in - *"$PSTRING"*) echo "${test_name}: pass";; - *"$SSTRING"*) echo "${test_name}: skip";; - *"$FSTRING"*) echo "${test_name}: fail";; - *) echo "${test_name}: fail";; - esac -} - -test_oes_compressed_etc2_texture_miptree_gles3(){ - PIGLIT_SOURCE_DIR="/data/piglit" - export PIGLIT_SOURCE_DIR - cmd="${gles3_bin_dir}/oes_compressed_etc2_texture-miptree_gles3" - test_base_name="oes_compressed_etc2_texture-miptree_gles3" - formats="rgb8 srgb8 rgba8 srgb8-alpha8 r11 rg11 rgb8-punchthrough-alpha1 srgb8-punchthrough-alpha1" - for format in ${formats}; do - RESULT=$(${cmd} ${format} -auto) - - test_name="${test_base_name}_${format}" - case $RESULT in - *"$PSTRING"*) echo "${test_name}: pass";; - *"$SSTRING"*) echo "${test_name}: skip";; - *"$FSTRING"*) echo "${test_name}: fail";; - *) echo "${test_name}: fail";; - esac - - done - -} -normal_test "drawarrays-vertexid_gles3" -normal_test "minmax_gles3" -normal_test "texture-immutable-levels_gles3" -test_oes_compressed_etc2_texture_miptree_gles3 diff --git a/android/scripts/piglit-run-glslparser.sh b/android/scripts/piglit-run-glslparser.sh deleted file mode 100755 index d632c6c4..00000000 --- a/android/scripts/piglit-run-glslparser.sh +++ /dev/null @@ -1,65 +0,0 @@ -#!/system/bin/sh -# -# piglit glslparser test. -# -# Copyright (C) 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. -# -# owner: yongqin.liu@linaro.org -# -############################################################################### - -# find and loop over the vert and frag tests found -# looks recursively down the directory tree -PIGLIT_PLATFORM=android -export PIGLIT_PLATFORM -bin_path="/system/xbin/piglit/glslparsertest/glslparsertest" -data_dir="/data/piglit/glslparser/" -/system/bin/busybox find ${data_dir} -name "*.frag" -or -name "*.vert" | while read file -do - RESULTFOUND=$(grep expect_result ${file} ) - case $RESULTFOUND in - *fail*) RESULTEXPECTED="fail";; - *pass*) RESULTEXPECTED="pass";; - *) RESULTEXPECTED="pass";; - esac - - check_link=$(grep check_link ${file}) - case "${check_link}" in - *true*) check_link="--check-link";; - *) check_link="";; - esac - - required_version=$(grep 'glsl_version:' ${file}) - case "${check_link}" in - *3.00*) required_version="3.00";; - *) required_version="1.00";; - esac - - RESULT=$(${bin_path} ${check_link} ${file} $RESULTEXPECTED ${required_version}) - - PSTRING='PIGLIT: {"result": "pass"' - SSTRING='PIGLIT: {"result": "skip"' - FSTRING='PIGLIT: {"result": "fail"' - - case $RESULT in - *"$PSTRING"*) echo "glslparser ${file}: pass";; - *"$SSTRING"*) echo "glslparser ${file}: skip";; - *"$FSTRING"*) echo "glslparser ${file}: fail";; - *) echo "glslparser ${file}: fail";; - esac -done diff --git a/android/scripts/piglit-run-shader.sh b/android/scripts/piglit-run-shader.sh deleted file mode 100755 index 8353b6eb..00000000 --- a/android/scripts/piglit-run-shader.sh +++ /dev/null @@ -1,54 +0,0 @@ -#!/system/bin/sh -# -# piglit shader test. -# -# Copyright (C) 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. -# -# owner: yongqin.liu@linaro.org -# -############################################################################### - -# find and loop over the shader tests found -# recursively in the /data/piglit/shader directory - -PIGLIT_PLATFORM=android -export PIGLIT_PLATFORM - -bin_path="/system/xbin/piglit/piglit-shader-test/shader_runner" -data_dir="/data/piglit/shader" -glsl_es1_data_dir="${data_dir}/glsl-es-1.00/" -glsl_es3_data_dir="${data_dir}/glsl-es-3.00/" - -/system/bin/busybox find ${data_dir} -name *.shader_test | while read file -do - RESULT=$(${bin_path} ${file} -auto ) - - PSTRING='PIGLIT: {"result": "pass"' - SSTRING='PIGLIT: {"result": "skip"' - FSTRING='PIGLIT: {"result": "fail"' - - case $RESULT in - *"$PSTRING"*) echo "${file}: pass";; - - *"$SSTRING"*) echo "${file}: skip";; - - *"$FSTRING"*) echo "${file}: fail";; - - *) echo "${file}: fail";; - esac -done diff --git a/android/scripts/pm-qa.sh b/android/scripts/pm-qa.sh deleted file mode 100755 index 4499d0a8..00000000 --- a/android/scripts/pm-qa.sh +++ /dev/null @@ -1,50 +0,0 @@ -#!/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/sd-mmc.sh b/android/scripts/sd-mmc.sh deleted file mode 100755 index 4add54f9..00000000 --- a/android/scripts/sd-mmc.sh +++ /dev/null @@ -1,114 +0,0 @@ -#!/system/bin/sh -# -# SD MMC test cases for Linaro Android -# -# 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: Botao Sun <botao.sun@linaro.org> - -check_return_fail() { - if [ $? -ne 0 ]; then - fail_test "$1" - return 0 - else - return 1 - fi -} - -fail_test() { - local reason=$1 - echo "${TEST}: FAIL - ${reason}" -} - -pass_test() { - echo "${TEST}: PASS" -} - -## Test case definitions -# Check if EXTERNAL_STORAGE is available -test_has_variable_external_storage() { - TEST="has_variable_external_storage" - - # Add 1 minute sleep time to avoid SD card partition is unavailable during the system boot - sleep 60 - - if [ -z "$EXTERNAL_STORAGE" ]; then - fail_test "The value of EXTERNAL_STORAGE is empty" - return 1 - fi - - echo "The value of EXTERNAL_STORAGE is $EXTERNAL_STORAGE" - - pass_test -} - -# Print the output of "df" command -test_print_df_output() { - TEST="print_df_output" - - df_return=`df` - if [ $? -ne 0 ]; then - fail_test "Run df command failed" - return 1 - fi - - if [ -z "$df_return" ]; then - fail_test "The return value of df command is empty" - return 1 - else - echo "$df_return" - fi - - pass_test -} - -# Write to SD card partition -test_write_on_sd_card() { - TEST="write_on_sd_card" - - if [ ! -d "$EXTERNAL_STORAGE" ]; then - fail_test "Unable to find $EXTERNAL_STORAGE" - return 1 - fi - - written_message="abcdefghijklmn" - echo $written_message > $EXTERNAL_STORAGE/sd-mmc-test.txt - - if [ ! -f "$EXTERNAL_STORAGE/sd-mmc-test.txt" ]; then - fail_test "Failed to write to external storage $EXTERNAL_STORAGE" - return 1 - fi - - file_content=`cat $EXTERNAL_STORAGE/sd-mmc-test.txt` - - if [ "$file_content" != "$written_message" ]; then - fail_test "Writing test on SD card failed, original string doesn't match the result" - return 1 - fi - - echo "The content of SD MMC test file is: $file_content" - - pass_test -} - -# run the tests -test_has_variable_external_storage -test_print_df_output -test_write_on_sd_card - -# clean exit so lava-test can trust the results -exit 0 diff --git a/android/scripts/skia.sh b/android/scripts/skia.sh deleted file mode 100755 index 736d04c6..00000000 --- a/android/scripts/skia.sh +++ /dev/null @@ -1,60 +0,0 @@ -#!/system/bin/sh -# -# Skia test. -# -# Copyright (C) 2012, 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: Fahad Kunnathadi <fahad.k@linaro.org> -# Author: HariGopal <harigopal.gollamudi@linaro.org> - -skia_test_exec(){ - - logcat -c - - DIRECTORY=$1 - if [ ! -d "$DIRECTORY" ]; then - mkdir $DIRECTORY; - fi - - SKIA_TEST=$2 - if [ -e "$DIRECTORY/$SKIA_TEST.txt" ]; then - #echo "File exists for $SKIA_TEST" - rm -f $DIRECTORY/$SKIA_TEST.txt - else - touch "$DIRECTORY/$SKIA_TEST.txt" - fi - - touch "$DIRECTORY/tmp.txt" - OPTIONS=$3 - - #echo "skia test executing: $SKIA_TEST" - skia_bench -repeat $OPTIONS -timers w -config 565 -match $SKIA_TEST - #echo "skia writing into $DIRECTORY/$SKIA_TEST.txt" - - logcat -d | grep "running bench" |tr -s " "|cut -d \ -f 8,9,10,12,14 - #logcat -d -s "skia:*" > $DIRECTORY/tmp.txt - #awk -F':' '{print $2 $3}' $DIRECTORY/tmp.txt > $DIRECTORY/$SKIA_TEST.txt - -} - -DEFAULT_PATH="/data/skia" - -logcat -c - -skia_test_exec $DEFAULT_PATH rects 1000 -skia_test_exec $DEFAULT_PATH bitmap 1000 -skia_test_exec $DEFAULT_PATH repeat 1000 diff --git a/android/scripts/stringbench.sh b/android/scripts/stringbench.sh deleted file mode 100755 index 34ee40f8..00000000 --- a/android/scripts/stringbench.sh +++ /dev/null @@ -1,41 +0,0 @@ -#!/system/bin/sh - -local_file_path="$0" -local_file_parent=$(cd $(dirname ${local_file_path}); pwd) -. ${local_file_parent}/common.sh - -test_stringbench(){ - local cmd=$1 && shift - local prefix=$1 && shift - if [ -z "${cmd}" ]; then - return - fi - if [ ! -x "${cmd}" ]; then - return - fi - if [ -n "$prefix" ]; then - prefix="${prefix}_" - fi - - for res_line in $(${cmd} |tr ' ' '_'); do - local test_case_id=$(echo $res_line|cut -d: -f1|tr -c '[:alnum:]:.' '_'|tr -s '_' |sed 's/_$//') - local measurement_units=$(echo $res_line|cut -d: -f2) - local measurement=$(echo ${measurement_units}|cut -d_ -f2) - local units=$(echo ${measurement_units}|cut -d_ -f2) - output_test_result "${prefix}${test_case_id}" "pass" "${measurement}" "seconds" - done -} - -test_func(){ - stringbench="/system/xbin/stringbench" - stringbench64="/system/xbin/stringbench64" - test_stringbench "${stringbench}" "32Bit" - test_stringbench "${stringbench64}" "64Bit" -} - -main(){ - var_test_func="test_func" - run_test "$@" -} - -main "$@" diff --git a/android/scripts/tjbench.sh b/android/scripts/tjbench.sh deleted file mode 100755 index 1af04471..00000000 --- a/android/scripts/tjbench.sh +++ /dev/null @@ -1,63 +0,0 @@ -#!/system/bin/sh - -local_file_path="$0" -local_file_parent=$(cd $(dirname ${local_file_path}); pwd) -. ${local_file_parent}/common.sh - -img_dir="/data/local/tmp" -#imgs="vgl_5674_0098.ppm vgl_6434_0018.ppm vgl_6548_0026.ppm artificial.ppm nightshot_iso_100.ppm" -imgs="nightshot_iso_100.ppm" - -func_tjbench(){ - cmd=$1 - if [ -z "${cmd}" ];then - return - else - shift - fi - if [ -z "$(which $cmd)" ];then - return - fi - - for img in ${imgs}; do - for line in $($cmd ${img_dir}/${img} 95 -rgb -quiet $@|grep '^RGB'|tr -s ' '|tr ' ' ','); do - key=$(echo $line|cut -d, -f1-6) - compPerf=$(echo $line|cut -d, -f7) - compRatio=$(echo $line|cut -d, -f8) - decompPerf=$(echo $line|cut -d, -f9) - key="${cmd}_${key}_${img}_95_rgb" - if [ -n "$*" ]; then - key="${key}_$*" - fi - key=$(echo $key|tr ', ' '_'|tr -d ':()/') - - output_test_result "${key}_CompPerf" "pass" "${compPerf}" "Mpixels/sec" - output_test_result "${key}_CompRatio" "pass" "${compRatio}" "%" - output_test_result "${key}_DecompPerf" "pass" "${decompPerf}" "Mpixels/sec" - done - done -} - -test_func(){ - if which tj32 >/dev/null; then - cmdname="tj" - else - cmdname="tjbench" - fi - func_tjbench ${cmdname}64 scale 1/2 - func_tjbench ${cmdname}64 - func_tjbench ${cmdname}32 scale 1/2 - func_tjbench ${cmdname}32 -} - -main(){ - cd $img_dir - for img in ${imgs}; do - wget http://testdata.validation.linaro.org/tjbench/${img} -O ${img_dir}/${img} - done - - var_test_func="test_func" - run_test "$@" -} - -main "$@" diff --git a/android/scripts/v8.sh b/android/scripts/v8.sh deleted file mode 100755 index 0730971e..00000000 --- a/android/scripts/v8.sh +++ /dev/null @@ -1,34 +0,0 @@ -#!/system/bin/sh -# -# v8 shell 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: Senthil Kumaran <senthil.kumaran@linaro.org> -# Maintainer: Amit Pundir <amit.pundir@linaro.org> - -cd /data/benchmark/v8 -if which v8shell 2>/dev/null 1>/dev/null -then v8shell run.js -else d8 run.js -fi - -if [ $? -eq 0 ]; then - echo "v8shell=pass" -else - echo "v8shell=fail" -fi diff --git a/android/scripts/wait_via_ping.sh b/android/scripts/wait_via_ping.sh deleted file mode 100755 index 8c373e57..00000000 --- a/android/scripts/wait_via_ping.sh +++ /dev/null @@ -1,28 +0,0 @@ -#!/system/bin/sh - -lava_server_ip=$1 -timeout_val=$2 - -if [ -z "${lava_server_ip}" ]; then - return -fi -if [ -z "${timeout_val}" ]; then - timeout_val=10 -fi - -echo "Timeout value is ${timeout_val}" -sleep 5 -ping_count=0 -echo "ping start: $(date)" -while ! LC_ALL=C ping -W1 -c1 ${lava_server_ip} ; do - sleep 1 - ping_count=$((ping_count + 1)) - if [ $ping_count -ge ${timeout_val} ]; then - exit 1 - fi -done -# see how long it will take for the ip to available -echo "ping finished: $(date)" -ifconfig - -exit 0 diff --git a/android/sd-mmc.yaml b/android/sd-mmc.yaml deleted file mode 100644 index cb2e456f..00000000 --- a/android/sd-mmc.yaml +++ /dev/null @@ -1,28 +0,0 @@ -metadata: - name: sd-mmc - format: "Lava-Test-Shell Test Definition 1.0" - 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: - - milosz.wasilewski@linaro.org - os: - - android - devices: - - panda - - panda-es - - vexpress-a9 - - vexpress-tc2 - - arndale - - juno - scope: - - functional - -run: - steps: - - "./android/scripts/sd-mmc.sh" - -parse: - pattern: "(?P<test_case_id>[a-zA-Z0-9_-]+):\\s(?P<result>\\w+)" - fixupdict: - FAIL: fail - PASS: pass diff --git a/android/skia.yaml b/android/skia.yaml deleted file mode 100644 index 35e6e801..00000000 --- a/android/skia.yaml +++ /dev/null @@ -1,24 +0,0 @@ -metadata: - name: skia - format: "Lava-Test Test Definition 1.0" - description: "skia test for android." - maintainer: - - fahad.k@linaro.org - - harigopal.gollamudi@linaro.org - os: - - android - scope: - - performance - devices: - - arndale - - panda - - panda-es - - vexpress-a9 - - vexpress-tc2 - -run: - steps: - - "./android/scripts/skia.sh" - -parse: - pattern: "^(?P<test_case_id>\\w+)\\s+\\w+\\s+(?P<units>\\w+)\\s+(?P<measurement>[\\d\\.]+)\\s+(?P<result>\\w+)" diff --git a/android/stringbench.yaml b/android/stringbench.yaml deleted file mode 100644 index 9c4ee1ab..00000000 --- a/android/stringbench.yaml +++ /dev/null @@ -1,24 +0,0 @@ -metadata: - name: stringbench - format: "Lava-Test-Shell Test Definition 1.0" - description: "Run stringbench command to benchmark the - performance of string relevant feature of bionic. - In the feature this test should be upstream to bionic-benchmarks. - The source is here now: - git://android.git.linaro.org/platform/external/stringbench" - maintainer: - - yongqin.liu@linaro.org - os: - - android - scope: - - performance - devices: - - juno - -params: - RECORD_RESULT_LOCAL: "FALSE" - LOOP_COUNT: "1" - -run: - steps: - - ./android/scripts/stringbench.sh --record-csv ${RECORD_RESULT_LOCAL} --loop-count ${LOOP_COUNT} diff --git a/android/tjbench.yaml b/android/tjbench.yaml deleted file mode 100644 index 11a6ca24..00000000 --- a/android/tjbench.yaml +++ /dev/null @@ -1,28 +0,0 @@ -metadata: - format: "Lava-Test Test Definition 1.0" - name: tjbench - description: "Tjbench is used to benchmark the performance of libjpeg-turbo and libjpeg62 for android. - For each test image, the tjbench program is used to measure the compression and decompression - performance and the compression ratio obtained when compressing the test image as a JPEG image - and then decompressing the JPEG image back to its original, uncompressed form." - maintainer: - - yongqin.liu@linaro.org - os: - - android - scope: - - performance - devices: - - arndale - - panda - - panda-es - - vexpress-a9 - - vexpress-tc2 - - juno - -params: - RECORD_RESULT_LOCAL: "FALSE" - LOOP_COUNT: "1" - -run: - steps: - - ./android/scripts/tjbench.sh --record-csv ${RECORD_RESULT_LOCAL} --loop-count ${LOOP_COUNT} diff --git a/android/v8.yaml b/android/v8.yaml deleted file mode 100644 index 13fc1244..00000000 --- a/android/v8.yaml +++ /dev/null @@ -1,28 +0,0 @@ -metadata: - name: v8 - format: "Lava-Test-Shell Test Definition 1.0" - description: "V8 benchmark suite contains a number of pure JavaScript benchmarks that test - JavaScript engine performance. The test suite runs following benchmarks: Richards, - DeltaBlue, Crypto, RayTrace, EarleyBoyer, RegExp, Splay and NavierStokesv8. D8 shell - test was also included in v8 benchmark test suite recently." - maintainer: - - senthil.kumaran@linaro.org - - amit.pundir@linaro.org - os: - - android - scope: - - functional - devices: - - arndale - - panda - - panda-es - - vexpress-a9 - - vexpress-tc2 - - juno - -run: - steps: - - "./android/scripts/v8.sh" - -parse: - pattern: "^(?P<test_case_id>.*)=(?P<result>.*)" diff --git a/common/bonnie.yaml b/common/bonnie.yaml deleted file mode 100644 index d5a647a4..00000000 --- a/common/bonnie.yaml +++ /dev/null @@ -1,45 +0,0 @@ -metadata: - name: bonnie_benchmark_test - format: "Lava-Test-Shell Test Definition 1.0" - description: "Bonnie++ is a benchmark suite that is aimed at performing - a number of simple tests of hard drive and file system performance. - If a test completes in less than 500ms then the output will be displayed as '++++'. - This is because such a test result can't be calculated accurately due to rounding errors - and I would rather display no result than a wrong result." - maintainer: - - arthur.she@linaro.org - os: - - ubuntu - - openembedded - scope: - - performance - devices: - - arndale - - beaglebone-black - - juno - -install: - git-repos: - - url: https://git.linaro.org/qa/bonnie.git - deps: - - build-essential - steps: - - 'cd bonnie' - - './configure prefix=/usr ; make all install ; cd ..' - -params: - SCRATCH_DIR: /tmp - SIZE: 500 - NUM_TO_STAT: 50 - RAM_SIZE: 200 - -run: - steps: - - 'OPT="-u 0:0 -d $SCRATCH_DIR -s $SIZE -n $NUM_TO_STAT -r $RAM_SIZE"' - - '/usr/sbin/bonnie++ $OPT | tee bonnie++.log' - - 'log_file_size=`du -b bonnie++.log | cut -f1`' - - 'if [ ${log_file_size} -gt 0 ]; then' - - 'lava-test-case run-bonnie++ --result pass' - - 'lava-test-case-attach run-bonnie++ bonnie++.log' - - './common/scripts/bonnie.sh bonnie++.log' - - 'else lava-test-case run-bonnie++ --result fail ; fi' diff --git a/common/coresight-test.yaml b/common/coresight-test.yaml deleted file mode 100644 index a1e6d0af..00000000 --- a/common/coresight-test.yaml +++ /dev/null @@ -1,24 +0,0 @@ -metadata: - format: Lava-Test Test Definition 1.0 - name: coresight-test - description: "To validate coresight source to sink writes. - Coresight tracing support provides a kernel interface for the CoreSight - debug and trace drivers to register themselves with. It's intended to build - topological view of the CoreSight components based on a DT specification - and configure the right serie of components when a trace source gets - enabled. Required kernel configs - CONFIG_CORESIGHT=y - CONFIG_CORESIGHT_LINKS_AND_SINKS=y" - maintainer: - - naresh.kamboju@linaro.org - os: - - openembedded - - ubuntu - scope: - - functional - devices: - - vexpress-tc2 - -run: - steps: - - "common/scripts/coresight-test.sh" diff --git a/common/cyclictest-basic.yaml b/common/cyclictest-basic.yaml deleted file mode 100644 index 31d7f938..00000000 --- a/common/cyclictest-basic.yaml +++ /dev/null @@ -1,31 +0,0 @@ -metadata: - name: cyclictest-basic - format: "Lava-Test-Shell Test Definition 1.0" - description: "Cyclictest tool is used to measure event latency in kernel. The test runs cyclictest - command in loop and increases the number of thread after each iteration." - maintainer: - - arthur.she@linaro.org - os: - - ubuntu - - openembedded - devices: - - arndale - - beaglebone-black - - rtsm_fvp_base-aemv8a - scope: - - performance - - preempt-rt - -install: - deps: - - rt-tests - -params: - TIMES: 8 # The number of times 'cyclictest' will be run - INTERVAL: 10000 # '--interval': base interval of thread in us - LATENCY: 1000000 # '--latency': This number will be written to /dev/cpu_dma_latency - DURATION: 20 # '--duratio': specify a length for the test run - -run: - steps: - - './common/scripts/cyclictest-basic.sh ${TIMES} ${INTERVAL} ${LATENCY} ${DURATION}' diff --git a/common/dd-speed-test.yaml b/common/dd-speed-test.yaml deleted file mode 100644 index 0bbbf0a9..00000000 --- a/common/dd-speed-test.yaml +++ /dev/null @@ -1,33 +0,0 @@ -metadata: - name: dd-speed-test - format: "Lava-Test-Shell Test Definition 1.0" - description: "dd write/read speed test." - maintainer: - - chase.qi@linaro.org - os: - - debian - - fedora - devices: - - mustang - - hi6220-hikey - - apq8016-sbc - scope: - - performance - environment: - - lava-test-shell - -params: - # The currenty working directory will be used by default. - # Use '-p' specify partition that used for dd test. - # Example: /dev/sdb1 - PARTITION: "" - # CAUTION: if FS_TYPE not equal to the existing fs type of the partition - # specified with '-p', the partition will be formatted. - FS_TYPE: "" - # You may need to run dd test 4-5 times for an accurate evaluation. - ITERATION: "5" - -run: - steps: - - ./common/scripts/dd-speed-test.sh -p "${PARTITION}" -t "${FS_TYPE}" -i "${ITERATION}" - - ./common/scripts/send-to-lava.sh "result.txt" diff --git a/common/disk-partitioning-test.yaml b/common/disk-partitioning-test.yaml deleted file mode 100644 index d15c8bd4..00000000 --- a/common/disk-partitioning-test.yaml +++ /dev/null @@ -1,30 +0,0 @@ -metadata: - name: disk-partitioning-test - format: "Lava-Test-Shell Test Definition 1.0" - description: "Disk partitioning test." - maintainer: - - chase.qi@linaro.org - os: - - debian - - fedora - devices: - - mustang - - hi6220-hikey - - apq8016-sbc - scope: - - functional - environment: - - lava-test-shell - -params: - # The existing disk label on the device will be destroyed, - # and all data on this disk will be lost. - DEVICE: "" - # Supported labels: msdos and gpt - DISKLABEL: "gpt" - FILESYSTEM: "ext4" - -run: - steps: - - ./common/scripts/disk-partitioning-test.sh -d "${DEVICE}" -l "${DISKLABEL}" -f "${FILESYSTEM}" -r "result.txt" - - ./common/scripts/send-to-lava.sh "result.txt" diff --git a/common/dmidecode.yaml b/common/dmidecode.yaml deleted file mode 100644 index 8380cf32..00000000 --- a/common/dmidecode.yaml +++ /dev/null @@ -1,35 +0,0 @@ -metadata: - name: dmidecode - format: "Lava-Test-Shell Test Definition 1.0" - description: "DMI Decode Test for Linaro Ubuntu & OpenEmbedded builds. Dmidecode - reports information about system's hardware from BIOS such as bios_version - dmi, id, bios_version and bios_date." - version: 1.0 - maintainer: - - milosz.wasilewski@linaro.org - os: - - ubuntu - - openembedded - devices: - - arndale - - panda - - beaglebone-black - - beagle-xm - - mx53loco - - rtsm_fvp_base-aemv8a - - juno - scope: - - functional - -install: - deps: - - dmidecode - - grep -run: - steps: - - lava-test-case kernel-space-sysfs-dmi-exist --shell ls /sys/class/dmi/ - - lava-test-case kernel-space-sysfs-dmi-id-exist --shell ls /sys/class/dmi/id - - lava-test-case kernel-space-sysfs-bios-date --shell cat /sys/class/dmi/id/bios_date - - lava-test-case kernel-space-sysfs-bios-vendor --shell cat /sys/class/dmi/id/bios_vendor - - lava-test-case kernel-space-sysfs-bios-version --shell cat /sys/class/dmi/id/bios_version - - ./common/scripts/dmidecode.sh diff --git a/common/dt-selftests.yaml b/common/dt-selftests.yaml deleted file mode 100644 index 13de64df..00000000 --- a/common/dt-selftests.yaml +++ /dev/null @@ -1,34 +0,0 @@ -metadata: - name: dt-selftests - format: "Lava-Test-Shell Test Definition 1.0" - description: "Device Tree Runtime self tests for Linaro Ubuntu & OpenEmbedded builds. Kernel config - required for this tests CONFIG_OF_SELFTEST=y or CONFIG_OF_UNITTEST=y" - maintainer: - - naresh.kamboju@linaro.org - os: - - ubuntu - - openembedded - scope: - - functional - devices: - - panda-es - - arndale-octa - - arndale - - snowball - - cubieboard3 - - beagle-xm - - beaglebone-black - - imx6q-wandboard - - ifc6540 - - juno - environment: - - lava-test-shell - -run: - steps: - - "./common/scripts/dt-selftests.sh" -parse: - pattern: "^test_case_id:(?P<test_case_id>.*-*.+) measurement:(?P<measurement>.+) result:(?P<result>\\w+)" - fixupdict: - passed: pass - failed: fail diff --git a/common/fwts.yaml b/common/fwts.yaml deleted file mode 100644 index 3524472f..00000000 --- a/common/fwts.yaml +++ /dev/null @@ -1,32 +0,0 @@ -metadata: - name: fwts - format: "Lava-Test-Shell Test Definition 1.0" - description: "Ubuntu Firmware Test Suite (fwts). The FWTS tool comprises of over fifty tests - that are designed to exercise and test different aspects of a machine's firmware. - More details - https://wiki.linaro.org/LEG/Engineering/test-acpi#Ubuntu_Firmware_test_suite" - maintainer: - - naresh.bhat@linaro.org - os: - - ubuntu - - openembedded - scope: - - functional - devices: - - panda - - panda-es - - arndale - - vexpress-a9 - - vexpress-tc2 - - rtsm_fvp_base-aemv8a - -install: - deps: - - fwts -run: - steps: - - lava-test-case fwts --shell fwts -a --log-filter=ALL --log-format='%owner-%field:' -w 250 - - lava-test-case-attach fwts results.log text/plain - - ./common/scripts/fwts-parser.py results.log - -parse: - pattern: "(?P<test_case_id>.*):\\s(?P<result>(pass|fail|skip)$)" diff --git a/common/gator-data-streaming.yaml b/common/gator-data-streaming.yaml deleted file mode 100644 index c7bfd13e..00000000 --- a/common/gator-data-streaming.yaml +++ /dev/null @@ -1,42 +0,0 @@ -metadata: - name: gator-data-streaming - format: "Lava-Test-Shell Test Definition 1.0" - description: "Gator Data Streaming Test checks DS5 profiling feature for Ubuntu builds. The test - creates a sample session XML file called 'session.xml', this file is passed as a - parameter to the gatord command to do a local capture and test results are generated - depending upon output of this command." - maintainer: - - arthur.she@linaro.org - os: - - ubuntu - - openembedded - scope: - - functional - devices: - - arndale - - panda - - panda-es - - vexpress-a9 - - vexpress-tc2 - - juno - -install: - deps: - - build-essential - git-repos: - - url: https://git.linaro.org/arm/ds5/gator.git - steps: - - 'if [ -f "/usr/sbin/gatord" ]; then mv /usr/sbin/gatord /usr/sbin/gatord.bak; fi' - - 'cd gator/daemon' - - 'make all' - - 'cp gatord /usr/sbin' - -run: - steps: - - "cd common/scripts; ./gator-data-streaming.sh" - -parse: - pattern: "(?P<test_case_id>[a-zA-Z0-9_-]+):\\s(?P<result>\\w+)" - fixupdict: - FAIL: fail - PASS: pass diff --git a/common/iks-smoke-test.yaml b/common/iks-smoke-test.yaml deleted file mode 100644 index 20e8ecf7..00000000 --- a/common/iks-smoke-test.yaml +++ /dev/null @@ -1,24 +0,0 @@ -metadata: - format: "Lava-Test Test Definition 1.0" - name: iks-smoke-test - description: "IKS-Smoke-Test for Linaro Ubuntu & Android builds. The test runs IKS-smoke-tests, - enables and disables big.LITTLE IKS switcher 100 times." - maintainer: - - naresh.kamboju@linaro.org - os: - - android - - ubuntu - scope: - - functional - devices: - - vexpress-tc2 - environment: - - lava-test-shell - timeout: 1800 - -run: - steps: - - './common/scripts/iks-smoke-test.sh' - -parse: - pattern: "^(?P<test_case_id>[a-zA-Z0-9_ \\-]+):\\s+(?P<result>PASS|FAIL|SKIP)" diff --git a/common/iozone.yaml b/common/iozone.yaml deleted file mode 100644 index e9694d1e..00000000 --- a/common/iozone.yaml +++ /dev/null @@ -1,33 +0,0 @@ -metadata: - name: iozone - format: "Lava-Test-Shell Test Definition 1.0" - description: "IOzone is a filesystem benchmark tool. The benchmark generates and measures a variety of file operations." - maintainer: - - arthur.she@linaro.org - os: - - ubuntu - devices: - - panda - - panda-es - - arndale - - vexpress-a9 - - vexpress-tc2 - scope: - - performance - -install: - steps: - - 'if [ -f "/etc/apt/sources.list" ]; then sed -i "s/\(^deb .*\)/\1 multiverse/" /etc/apt/sources.list; apt-get update ; apt-get install iozone3; fi' - -params: - OPTIONS: -az -i0 -i1 -s 20m -y 128k -q 4m -I -e - -run: - steps: - - 'iozone $OPTIONS -f iozone.tmp | tee result.log' - - 'log_file_size=`du -b result.log|cut -f1`' - - 'lava-test-case iozone --shell test ${log_file_size} -gt 0' - - 'lava-test-case-attach iozone result.log' - - 'sed -n "/^ *[0-9]/p" result.log | common/scripts/iozone.sh' -parse: - pattern: "^(?P<test_case_id>[a-zA-Z0-9-]+):\\s(?P<measurement>\\d+)\\s(?P<result>pass)" diff --git a/common/lng-mapping-table-eth b/common/lng-mapping-table-eth deleted file mode 100644 index 7b4dfd41..00000000 --- a/common/lng-mapping-table-eth +++ /dev/null @@ -1,13 +0,0 @@ -# Arndale's -tbd -# Amarillo's -tbd -# Generator's -lngswitch=d8:9d:67:26:ae:e9 -arndale=38:ea:a7:93:8c:29 -amarillo=38:ea:a7:93:98:94 -keystone=38:ea:a7:93:8c:28 -# Keystone's -lngswitch=c4:ed:ba:99:f4:0a -lngswitch=c4:ed:ba:9a:8c:48 -lngswitch=c4:ed:ba:9a:67:61 diff --git a/common/odp-validation.yaml b/common/odp-validation.yaml deleted file mode 100644 index f1201b17..00000000 --- a/common/odp-validation.yaml +++ /dev/null @@ -1,59 +0,0 @@ -metadata: - name: odp_validation - version: "1.0" - format: "Lava-Test-Shell Test Definition 1.0" - description: "Run ODP API validation tests on Linaro OpenEmbedded builds. - Note that this depends on both the odp and odp-ptest - packages being installed in the target rootfs." - maintainer: - - stuart.haslam@linaro.org - - anders.roxell@linaro.org - os: - - openembedded - - debian - - ubuntu - devices: - - juno - - arndale - - x86 - scope: - - functional - environment: - - lava-test-shell - -install: - deps: - - git - - build-essential - - automake - - autoconf - - libtool - - libssl-dev - - libcunit1-dev - git-repos: - - url: git://git.linaro.org/lng/odp.git - destination: odp - branch: ODP_BRANCH - steps: - - cd odp - - ./bootstrap - - autoreconf -i - - ./configure --enable-test-vald --with-testdir=/usr/lib/odp/ptest/test - - make install - - cd /usr/lib/odp/ptest - - ln -s test/run-test run-ptest - -params: - ODP_BRANCH: master - -run: - steps: - - cd /usr/lib/odp/ptest - - lava-test-case odp_validation --shell ./run-ptest - -parse: - pattern: '^(?P<result>(PASS|FAIL|SKIP)):\s+(?P<test_case_id>[a-zA-Z0-9_]+)' - fixupdict: - PASS: pass - FAIL: fail - SKIP: skip diff --git a/common/overlayfs.yaml b/common/overlayfs.yaml deleted file mode 100644 index d6c41b1b..00000000 --- a/common/overlayfs.yaml +++ /dev/null @@ -1,28 +0,0 @@ -metadata: - name: overlayfs - format: "Lava-Test-Shell Test Definition 1.0" - description: "Run overlay filesystem test from unionmount testsuite on - Linaro Ubuntu and OpenEmbedded" - maintainer: - - milosz.wasilewski@linaro.org - - chase.qi@linaro.org - os: - - ubuntu - - openembedded - scope: - - functional - devices: - - arndale - - beaglebone-black - - rtsm_fvp_base-aemv8a - - mustang - - panda - - juno - -install: - git-repos: - - url: http://git.linaro.org/qa/unionmount-testsuite.git - -run: - steps: - - './common/scripts/overlayfs.py $(readlink -f unionmount-testsuite)' diff --git a/common/scheduler_testssuites.yaml b/common/scheduler_testssuites.yaml deleted file mode 100644 index a588a326..00000000 --- a/common/scheduler_testssuites.yaml +++ /dev/null @@ -1,46 +0,0 @@ -metadata: - name: big.LITTLE_Scheduler_tests - 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." - maintainer: - - naresh.kamboju@linaro.org - os: - - android - - ubuntu - - openembedded - devices: - - vexpress-tc2 - - juno - scope: - - functional - -params: - TEST_SUITE: "http://testdata.validation.linaro.org/tests/sched-tests-juno.tar.gz" - TEST_PATH: "/data/local/schedtest" - -install: - steps: - - 'echo 0 > /sys/kernel/bL_switcher/active || true' - - 'mkdir -p $TEST_PATH' - - 'cd $TEST_PATH' - - 'wget -O scheduler-testsuite.tar.gz $TEST_SUITE' - - 'tar -xvzf scheduler-testsuite.tar.gz' - -run: - steps: - - './common/scripts/scheduler-test-android-setup.sh' - - 'cd $TEST_PATH' - - 'pwd' - - './schedtest-run' - - 'tar -zcvf sched_results.tar.gz suites' - - 'lava-test-run-attach sched_results.tar.gz application/x-gtar' - -parse: - pattern: "^(?P<test_case_id>\\S+).+(?P<result>(succeeded|failed|deprecated|pass|fail))$" - fixupdict: - succeeded: pass - failed: fail - deprecated: skip diff --git a/common/scripts/blogbench.sh b/common/scripts/blogbench.sh deleted file mode 100755 index fe416352..00000000 --- a/common/scripts/blogbench.sh +++ /dev/null @@ -1,57 +0,0 @@ -#!/bin/sh -# -# Blogbench is a portable filesystem benchmark. -# -# 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: Chase Qi <chase.qi@linaro.org> - -iteration=$1 -partition=$2 - -# Set the directory for blogbench test. -if [ -n "$partition" ]; then - if [ -z "$(mount | grep $partition)" ]; then - mount $partition /mnt - cd /mnt/ - else - mount_point=$(mount | grep $partition | awk '{print $3}') - cd $mount_point - fi -fi -mkdir ./bench - -# Run blogbench test. -blogbench --iteration=$iteration -d ./bench 2>&1 | tee blogbench.txt -if [ $? -eq 0 ]; then - lava-test-case blogbench-run --result pass -else - lava-test-case blogbench-run --result fail -fi - -# Parse test result. -for test in writes reads -do - score=$(grep "Final score for $test" blogbench.txt | awk '{print $NF}') - if [ -n "$score" ]; then - lava-test-case blogbench-$test --result pass --measurement $score --units none - else - lava-test-case blogbench-$test --result fail --measurement $score --units none - fi -done - -rm -rf ./bench diff --git a/common/scripts/bonnie.sh b/common/scripts/bonnie.sh deleted file mode 100755 index 7da96acb..00000000 --- a/common/scripts/bonnie.sh +++ /dev/null @@ -1,22 +0,0 @@ -#!/bin/sh - -LOG=$1 -TEST_ID="format_version,bonnie_version,name,concurrency,seed,file_size,io_chunk_size,putc,putc_cpu,put_block,put_block_cpu,rewrite,rewrite_cpu,getc,getc_cpu,get_block,get_block_cpu,seeks,seeks_cpu,num_files,max_size,min_size,num_dirs,file_chunk_size,seq_create,seq_create_cpu,seq_stat,seq_stat_cpu,seq_del,seq_del_cpu,ran_create,ran_create_cpu,ran_stat,ran_stat_cpu,ran_del,ran_del_cpu,putc_latency,put_block_latency,rewrite_latency,getc_latency,get_block_latency,seeks_latency,seq_create_latency,seq_stat_latency,seq_del_latency,ran_create_latency,ran_stat_latency,ran_del_latency" -TEST_RESULT=`cat ${LOG} | grep "^[0-9]"` - -for i in `seq 8 48` -do - unset unit - t=`echo ${TEST_ID}|cut -d, -f$i` - r=`echo ${TEST_RESULT}|cut -d, -f$i` - [ -z "${r}" -o "${t}" = "num_files" ] && continue - t_suffix=${t##*_} - unit=`echo ${r}|sed 's/[0-9+]*//'` - [ "${t_suffix}" = "cpu" ] && unit="%CPU" - if [ -z "${unit}" -a -z "`echo ${r} | grep -o [\+]*`" ]; then - [ ${i} -gt 17 ] && unit="/sec" || unit="K/sec" - fi - unset UNIT_OPT - [ -n "${unit}" ] && UNIT_OPT="--units ${unit}" - lava-test-case ${t} --result pass --measurement ${r%%[a-z]*} ${UNIT_OPT} -done diff --git a/common/scripts/coresight-test.sh b/common/scripts/coresight-test.sh deleted file mode 100755 index 2c9dd45b..00000000 --- a/common/scripts/coresight-test.sh +++ /dev/null @@ -1,32 +0,0 @@ -#!/bin/bash -# Script to test coresight - -CORESIGHT_PATH="/sys/bus/coresight/devices" - -echo "ls $CORESIGHT_PATH" -ls $CORESIGHT_PATH - -echo -e "SOURCE\t\tSINK\t\tRESULT" -echo -e "------\t\t----\t\t------" -for SOURCE in `ls $CORESIGHT_PATH | egrep "etm|ptm"` ; do - for SINK in `ls $CORESIGHT_PATH | grep etb` ; do - - echo 1 > $CORESIGHT_PATH/$SINK/enable_sink - wrt_ptr1=`cat $CORESIGHT_PATH/$SINK/status | grep wrt | awk '{print $NF}'` - echo 1 > $CORESIGHT_PATH/$SOURCE/enable_source - sleep 1 - echo 0 > $CORESIGHT_PATH/$SOURCE/enable_source - wrt_ptr2=`cat $CORESIGHT_PATH/$SINK/status | grep wrt | awk '{print $NF}'` - echo 0 > $CORESIGHT_PATH/$SINK/enable_sink - - if [ $wrt_ptr1 == $wrt_ptr2 ]; then - RES="fail" - else - RES="pass" - fi - - echo -e "$SOURCE\t$SINK\t$RES" - lava-test-case $SOURCE-$SINK --result $RES - done - echo -done diff --git a/common/scripts/cyclictest-basic.sh b/common/scripts/cyclictest-basic.sh deleted file mode 100755 index 9856975e..00000000 --- a/common/scripts/cyclictest-basic.sh +++ /dev/null @@ -1,45 +0,0 @@ -#!/bin/sh - -TIMES=$1 -INTERVAL=$2 -LATENCY=$3 -DURATION=$4 - -if [ ! -f "/usr/bin/cyclictest" ]; then - echo "Error! the command 'cyclictest' doesn't exist!" - lava-test-case cyclictest-basic --result fail - exit 1 -fi - -for t in $(seq 1 ${TIMES}); -do - threads=$(($t * 2)); - log_file="${threads}-cyc.log"; - echo "Running \"cyclictest -q -t ${threads} -i ${INTERVAL} --latency=${LATENCY} -D ${DURATION}\"" | tee ${log_file}; - for i in $(seq 0 5); - do - cyclictest -q -t ${threads} -i ${INTERVAL} --latency=${LATENCY} -D ${DURATION} | tee result.log; - cat result.log >> ${log_file}; - done; - lava-test-run-attach ${log_file}; - Max=0 - Min=0 - Avg=0 - n=0 - while read l; - do - max=$(echo ${l}|grep -o "Max:[[:space:]]*[0-9]*"|grep -o "[0-9]*") - min=$(echo ${l}|grep -o "Min:[[:space:]]*[0-9]*"|grep -o "[0-9]*") - avg=$(echo ${l}|grep -o "Avg:[[:space:]]*[0-9]*"|grep -o "[0-9]*") - if [ ${max} -a ${min} -a ${avg} ]; then - [ ${max} -gt ${Max} ] && Max=${max} - [ ${Min} -eq 0 -o ${min} -lt ${Min} ] && Min=${min} - Avg=$((${Avg}+${avg})) - n=$((${n}+1)) - fi - done < ${log_file} - Avg=$((${Avg}/${n})) - lava-test-case ${threads}-threads-Max --result pass --units us --measurement ${Max} - lava-test-case ${threads}-threads-Min --result pass --units us --measurement ${Min} - lava-test-case ${threads}-threads-Avg --result pass --units us --measurement ${Avg} -done diff --git a/common/scripts/dd-speed-test.sh b/common/scripts/dd-speed-test.sh deleted file mode 100755 index 9a0e5bd0..00000000 --- a/common/scripts/dd-speed-test.sh +++ /dev/null @@ -1,186 +0,0 @@ -#!/bin/sh -# -# Run dd write/read speed test. -# -# Copyright (C) 2010 - 2016, 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: Chase Qi <chase.qi@linaro.org> - -. ./common/scripts/include/sh-test-lib -LANG=C -export LANG -WD="$(pwd)" -RESULT_FILE="${WD}/result.txt" -ITERATION="5" -UNITS="MB/s" - -usage() { - echo "Usage: $0 [-p <partition>] [-t <type>] [-i <iteration>]" 1>&2 - exit 1 -} - -while getopts "p:t:i:" o; do - case "$o" in - # The current working directory will be used by default. - # Use '-p' specify partition that used for dd test. - p) PARTITION="${OPTARG}" ;; - # CAUTION: if FS_TYPE not equal to the existing fs type of the partition - # specified with '-p', the partition will be formatted. - t) FS_TYPE="${OPTARG}" ;; - # You may need to run dd test 4-5 times for an accurate evaluation. - i) ITERATION="${OPTARG}" ;; - *) usage ;; - esac -done - -prepare_partition() { - if [ -n "${PARTITION}" ]; then - device_attribute="$(blkid | grep "${PARTITION}")" - [ -z "${device_attribute}" ] && error_msg "${PARTITION} NOT found" - fs_type=$(echo "${device_attribute}" \ - | grep "TYPE=" \ - | awk '{print $3}' \ - | awk -F '"' '{print $2}') - - # Try to format the partition if it is unformatted or not the same as - # the filesystem type specified with parameter '-t'. - if [ -n "${FS_TYPE}" ]; then - if [ "${FS_TYPE}" != "${fs_type}" ]; then - umount "${PARTITION}" > /dev/null 2>&1 - info_msg "Formatting ${PARTITION} to ${FS_TYPE}..." - - if [ "${FS_TYPE}" = "fat32" ]; then - echo "y" | mkfs -t vfat -F 32 "${PARTITION}" - else - echo "y" | mkfs -t "${FS_TYPE}" "${PARTITION}" - fi - - if [ $? -ne 0 ]; then - error_msg "unable to format ${PARTITION}" - else - info_msg "${PARTITION} formatted to ${FS_TYPE}" - fi - fi - fi - - # Mount the partition and enter its mount point. - mount_point="$(df |grep "${PARTITION}" | awk '{print $NF}')" - if [ -z "${mount_point}" ]; then - mount_point="/mnt" - mount "${PARTITION}" "${mount_point}" - if [ $? -ne 0 ]; then - error_msg "Unable to mount ${PARTITIOIN}" - else - info_msg "${PARTITION} mounted to ${mount_point}" - fi - fi - cd "${mount_point}" - fi -} - -dd_write() { - echo - echo "--- dd write speed test ---" - rm -f dd-write-output.txt - for i in $(seq "${ITERATION}"); do - echo "Running iteration ${i}..." - rm -f dd.img - echo 3 > /proc/sys/vm/drop_caches - dd if=/dev/zero of=dd.img bs=1048576 count=1024 conv=fsync 2>&1 \ - | tee -a "${WD}"/dd-write-output.txt - done -} - -dd_read() { - echo - echo "--- dd read speed test ---" - rm -f dd-read-output.txt - for i in $(seq "${ITERATION}"); do - echo "Running iteration ${i}..." - echo 3 > /proc/sys/vm/drop_caches - dd if=dd.img of=/dev/null bs=1048576 count=1024 2>&1 \ - | tee -a "${WD}"/dd-read-output.txt - done - rm -f dd.img -} - -parse_output() { - local test="$1" - local test_case_id="${test}" - [ -n "${FS_TYPE}" ] && test_case_id="${FS_TYPE}-${test_case_id}" - if [ -n "${PARTITION}" ]; then - partition_no="$(echo "${PARTITION}" |awk -F '/' '{print $NF}')" - test_case_id="${partition_no}-${test_case_id}" - fi - - # Parse raw output and add results to result.txt. - itr=1 - while read line; do - if echo "${line}" | egrep -q "(M|G)B/s"; then - measurement="$(echo "${line}" | awk '{print $(NF-1)}')" - units="$(echo "${line}" | awk '{print $NF}')" - - if [ "${units}" = "GB/s" ]; then - measurement=$(( measurement * 1024 )) - elif [ "${units}" = "KB/s" ]; then - measurement=$(( measurement / 1024 )) - fi - - add_metric "${test_case_id}-itr${itr}" "${measurement}" "${UNITS}" - itr=$(( itr + 1 )) - fi - done < "${WD}/${test}"-output.txt - - # For mutiple times dd test, calculate the mean, min and max values. - # Save them to result.txt. - if [ "${ITERATION}" -gt 1 ]; then - eval "$(grep "${test}" "${WD}"/result.txt \ - | awk '{ - if(min=="") {min=max=$3}; - if($3>max) {max=$3}; - if($3< min) {min=$3}; - total+=$3; count+=1; - } - END { - print "mean="total/count, "min="min, "max="max; - }')" - - add_metric "${test_case_id}-mean" "${mean}" "${UNITS}" - add_metric "${test_case_id}-min" "${min}" "${UNITS}" - add_metric "${test_case_id}-max" "${max}" "${UNITS}" - fi -} - -# Test run. -! check_root && error_msg "This script must be run as root" - -pkgs="e2fsprogs dosfstools" -install_deps "${pkgs}" - -[ -f "${RESULT_FILE}" ] && \ -mv "${RESULT_FILE}" "${RESULT_FILE}_$(date +%Y%m%d%H%M%S)" -echo -info_msg "About to run dd test..." -info_msg "Working directory: ${WD}" -info_msg "Result will be saved to: ${RESULT_FILE}" - -prepare_partition -info_msg "dd test directory: $(pwd)" -dd_write -parse_output "dd-write" -dd_read -parse_output "dd-read" diff --git a/common/scripts/disk-partitioning-test.sh b/common/scripts/disk-partitioning-test.sh deleted file mode 100755 index 90768c90..00000000 --- a/common/scripts/disk-partitioning-test.sh +++ /dev/null @@ -1,133 +0,0 @@ -#!/bin/sh -# -# Disk partitioning test. -# -# Copyright (C) 2010 - 2016, 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: Chase Qi <chase.qi@linaro.org> - -LANG=C -export LANG -. ./common/scripts/include/sh-test-lib -WD="$(pwd)" -RESULT_FILE="${WD}/disk-partitioning-test-result.txt" -DISKLABEL="gpt" -FILESYSTEM="ext4" -SKIP_INSTALL="false" - -usage() { - echo "Usage: $0 [-d <device>] [-l <disklabel>] [-f <filesystem>] - [-r <result_file>] [-s <true|false>]" 1>&2 - exit 1 -} - -while getopts "d:l:f:r:s:" o; do - case "$o" in - # The existing disk label on the device will be destroyed, - # and all data on this disk will be lost. - d) DEVICE="${OPTARG}" ;; - l) DISKLABEL="${OPTARG}" ;; - f) FILESYSTEM="${OPTARG}" ;; - r) RESULT_FILE="${WD}/${OPTARG}" ;; - s) SKIP_INSTALL="${OPTARG}" ;; - *) usage ;; - esac -done - -[ -z "${DEVICE}" ] && error_msg "Please specify test device with '-d'" -DISKLABEL=${DISKLABEL:-"gpt"} -FILESYSTEM=${FILESYSTEM:-"ext4"} -SKIP_INSTALL=${SKIP_INSTALL:-"false"} - -install() { - if "${SKIP_INSTALL}"; then - info_msg "install_deps skipped" - else - pkgs="parted e2fsprogs dosfstools" - info_msg "Installing ${pkgs}" - install_deps "${pkgs}" - fi -} - -create_disklabel() { - echo - echo "Creating ${DEVICE} disklabel: ${DISKLABEL}" - umount "${DEVICE}*" > /dev/null 2>&1 - parted -s "${DEVICE}" mklabel "${DISKLABEL}" - - # Collect test reuslt with check_return function. - # If mklabel fails, skip the following tests. - check_return "create-disklabel" \ - || error_msg "Partitioning, formatting, and smoke tests skipped" - - sync - sleep 10 -} - -create_partition() { - echo - echo "Creating partition: ${DEVICE}1" - parted -s "${DEVICE}" mkpart primary 0% 100% - - check_return "create-partition" \ - || error_msg "Formatting, and smoke tests skipped" - - sync - sleep 10 -} - -format_partition() { - echo - echo "Formatting ${DEVICE}1 to ${FILESYSTEM}" - if [ "${FILESYSTEM}" = "fat32" ]; then - echo "y" | mkfs -t vfat -F 32 "${DEVICE}1" - else - echo "y" | mkfs -t "${FILESYSTEM}" "${DEVICE}1" - fi - - check_return "format-partition" || error_msg "Smoke test skipped" - - sync - sleep 10 -} - -partition_smoke_test() { - echo - echo "Running mount/umoun tests..." - umount /mnt > /dev/null 2>&1 - mount "${DEVICE}1" /mnt - check_return "mount-partition" || error_msg "umount test skipped" - - umount "${DEVICE}1" - check_return "umount-partition" -} - -# Test run. -! check_root && error_msg "This script must be run as root" -[ -f "${RESULT_FILE}" ] \ - && mv "${RESULT_FILE}" "${RESULT_FILE}_$(date +%Y%m%d%H%M%S)" - -echo -info_msg "About to run disk partitioning test..." -info_msg "Working directory: ${WD}" -info_msg "Result will be saved to: ${RESULT_FILE}" - -install -create_disklabel -create_partition -format_partition -partition_smoke_test diff --git a/common/scripts/dmidecode.sh b/common/scripts/dmidecode.sh deleted file mode 100755 index 3ac60fc8..00000000 --- a/common/scripts/dmidecode.sh +++ /dev/null @@ -1,94 +0,0 @@ -#!/bin/sh -# -# 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. -# -# Maintainer: Milosz Wasilewski <milosz.wasilewski@linaro.org> - -dmidecode > dmidecode.txt - -if grep -E 'SMBIOS [0-9]+.[0-9] present.' dmidecode.txt -then - lava-test-case user-space-dmidecode-smbios-present --result pass -else - lava-test-case user-space-dmidecode-smbios-present --result fail -fi - -if grep 'BIOS Information' dmidecode.txt -then - lava-test-case user-space-dmidecode-bios-has-info --result pass -else - lava-test-case user-space-dmidecode-bios-has-info --result fail -fi - -if grep 'System Information' dmidecode.txt -then - lava-test-case user-space-dmidecode-system-has-info --result pass -else - lava-test-case user-space-dmidecode-system-has-info --result fail -fi - -if grep 'Base Board Information' dmidecode.txt -then - lava-test-case user-space-dmidecode-baseboard-has-info --result pass -else - lava-test-case user-space-dmidecode-baseboard-has-info --result fail -fi - -if grep 'Chassis Information' dmidecode.txt -then - lava-test-case user-space-dmidecode-chassis-has-info --result pass -else - lava-test-case user-space-dmidecode-chassis-has-info --result fail -fi - -if grep 'Processor Information' dmidecode.txt -then - lava-test-case user-space-dmidecode-processor-has-info --result pass -else - lava-test-case user-space-dmidecode-processor-has-info --result fail -fi - -if grep 'Memory Device' dmidecode.txt -then - lava-test-case user-space-dmidecode-memory-has-info --result pass -else - lava-test-case user-space-dmidecode-memory-has-info --result fail -fi - -if grep 'Cache Information' dmidecode.txt -then - lava-test-case user-space-dmidecode-cache-has-info --result pass -else - lava-test-case user-space-dmidecode-cache-has-info --result fail -fi - -if grep 'Connector Information' dmidecode.txt -then - lava-test-case user-space-dmidecode-connector-has-info --result pass -else - lava-test-case user-space-dmidecode-connector-has-info --result fail -fi - -if grep 'System Slot Information' dmidecode.txt -then - lava-test-case user-space-dmidecode-slot-has-info --result pass -else - lava-test-case user-space-dmidecode-slot-has-info --result fail -fi - -cat dmidecode.txt -rm dmidecode.txt diff --git a/common/scripts/dt-selftests.awk b/common/scripts/dt-selftests.awk deleted file mode 100755 index a33eaf21..00000000 --- a/common/scripts/dt-selftests.awk +++ /dev/null @@ -1,13 +0,0 @@ -#!/usr/bin/awk -started && /### dt-test ### end of selftest/ { - sub(/,/, "", $11) - printf "DT-SELFTEST %s: %s\n", $11, $10 - printf "DT-SELFTEST %s: %s\n", $13, $12 - print "dt-selftest end" - exit -} - -!started && /### dt-test ### start of selftest/ { - print "dt-selftest start" - started = 1 -} diff --git a/common/scripts/dt-selftests.sh b/common/scripts/dt-selftests.sh deleted file mode 100755 index 1c77099d..00000000 --- a/common/scripts/dt-selftests.sh +++ /dev/null @@ -1,12 +0,0 @@ -#!/bin/sh -cd common/scripts -dmesg | awk -f dt-selftests.awk > dt-selftest-stdout.log -NO_OF_PASS=`grep "DT-SELFTEST passed" dt-selftest-stdout.log | awk '{print $3}'` -NO_OF_FAIL=`grep "DT-SELFTEST failed" dt-selftest-stdout.log | awk '{print $3}'` -if [ $NO_OF_FAIL -ne 0 ] ; then - echo "test_case_id:dt-selftest-passed measurement:$NO_OF_PASS result:passed" - echo "test_case_id:dt-selftest-failed measurement:$NO_OF_FAIL result:failed" -else - echo "test_case_id:dt-selftest-passed measurement:$NO_OF_PASS result:passed" - echo "test_case_id:dt-selftest-failed measurement:$NO_OF_FAIL result:passed" -fi diff --git a/common/scripts/fwts-parser.py b/common/scripts/fwts-parser.py deleted file mode 100755 index ce264840..00000000 --- a/common/scripts/fwts-parser.py +++ /dev/null @@ -1,63 +0,0 @@ -#!/usr/bin/env python - -import re -import sys - -RESULT_MAP = {'PAS': 'pass', - 'FAL': 'fail', - 'SKP': 'skip', - 'ABT': 'fail', - 'WRN': 'fail', - 'ERR': 'fail'} -line = re.compile("(?P<owner>[a-z_]+)\\s*-(?P<field>[A-Z]+):(?P<content>.*)") -header = re.compile("(?P<gowner>[a-z]+):\\s(?P<group_name>[ ()a-zA-Z-_]+)") -result = re.compile("(?P<r>.*):\\s(?P<test_name>Test [0-9]),\\s(?P<comment>.*)") -summary = re.compile("(?P<passed_no>[0-9]+) passed, (?P<failed_no>[0-9]+) failed, (?P<warning_no>[0-9]+) warning, (?P<aborted_no>[0-9]+) aborted, (?P<skil_no>[0-9]+) skipped, (?P<info_no>[0-9]+) info only") - -grouplist = {} - -with open(sys.argv[1], 'r') as f: - for l in f.readlines(): - linere = line.search(l) - if linere: - owner = linere.group('owner') - field = linere.group('field') - content = linere.group('content') - if field == 'HED': - headerre = header.search(content) - if headerre: - group_name = headerre.group('group_name') - gt = {'name': group_name, 'subtests': [], 'result': ''} - grouplist[owner] = gt - elif field in RESULT_MAP: - resultre = result.search(content) - if resultre: - test = {'test_name': resultre.group('test_name'), - 'result': RESULT_MAP[field], - 'comment': resultre.group('comment')} - grouplist[owner]['subtests'].append(test) - else: - if 'comment' not in grouplist[owner]: - grouplist[owner]['comment'] = content - grouplist[owner]['result'] = RESULT_MAP[field] - elif field == 'SUM': - sumre = summary.search(content) - if sumre: - if re.match("^0000", ''.join(sumre.groups())): # 0 passed, 0 failed, 0 warning, 0 aborted - grouplist[owner]['result'] = 'skip' - -for gname, t in grouplist.iteritems(): - if len(t['subtests']) == 0: - t_result = 'skip' - t_comment = t['name'] - if t['result']: - t_result = t['result'] - if 'comment' in t: - t_comment = t['comment'] - print("%s (%s): %s" % (gname, t_comment, t_result)) - else: - for tt in t['subtests']: - if tt['comment']: - print("%s %s(%s): %s" % (gname, tt['test_name'], tt['comment'], tt['result'])) - else: - print("%s %s(%s): %s" % (gname, tt['test_name'], t['name'], tt['result'])) diff --git a/common/scripts/gator-data-streaming.sh b/common/scripts/gator-data-streaming.sh deleted file mode 100755 index 542b925f..00000000 --- a/common/scripts/gator-data-streaming.sh +++ /dev/null @@ -1,96 +0,0 @@ -#!/bin/sh -# -# Gator data streaming test for ubuntu -# -# 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: Botao Sun <botao.sun@linaro.org> - -. include/sh-test-lib - -# Creating a new directory called gator_files under tmp so that it can be uniformly used for both Ubuntu and OE instead of using root for session.xml file -mkdir -p /tmp/gator_files - -# Location of XML template and data streaming result folder -xml_template="/tmp/gator_files/session.xml" -data_streaming_result="/tmp/gator_files/linaro-ubuntu-gator-data-streaming.apc" - -# Create sample XML file as a template -echo "<?xml version=\"1.0\" encoding=\"US-ASCII\" ?> " > $xml_template -echo "<session version=\"1\" output_path=\"x\" call_stack_unwinding=\"yes\" parse_debug_info=\"yes\" " >> $xml_template -echo "high_resolution=\"no\" buffer_mode=\"streaming\" sample_rate=\"normal\" duration=\"10\" " >> $xml_template -echo "target_host=\"linaro-ubuntu-boards\" target_port=\"8080\"> " >> $xml_template -echo "</session>" >> $xml_template - -## Test case definitions -# Check whether session.xml is available -test_session_xml_not_empty() { - TEST="session_xml_not_empty" - - if [ ! -f $xml_template ]; then - fail_test "Unable to find $xml_template" - return 1 - fi - - session_file=`cat $xml_template` - if [ -z "$session_file" ]; then - fail_test "Empty template session XML file at $xml_template" - return 1 - fi - - pass_test -} - -# Check the gator data streaming command -test_gator_data_streaming_cmd() { - TEST="gator_data_streaming_cmd" - /usr/sbin/gatord -s $xml_template -o $data_streaming_result - if [ $? -ne 0 ]; then - fail_test "Run gator data streaming command failed" - return 1 - fi - - pass_test -} - -# Check whether data streaming result is available -test_gator_data_streaming_result() { - TEST="gator_data_streaming_result" - if [ ! -d $data_streaming_result ]; then - fail_test "Gator data streaming result folder doesn't exist" - return 1 - elif [ ! -f $data_streaming_result/captured.xml ]; then - fail_test "File captured.xml doesn't exist" - return 1 - elif [ ! -s $data_streaming_result/captured.xml ]; then - fail_test "File captured.xml is empty" - return 1 - fi - - # Print some necessary directory structure information - ls -la $data_streaming_result - - pass_test -} - -# run the tests -test_session_xml_not_empty -test_gator_data_streaming_cmd -test_gator_data_streaming_result - -# clean exit so lava-test can trust the results -exit 0 diff --git a/common/scripts/gcov-collect-results.sh b/common/scripts/gcov-collect-results.sh deleted file mode 100755 index 3a128996..00000000 --- a/common/scripts/gcov-collect-results.sh +++ /dev/null @@ -1,9 +0,0 @@ -#!/bin/sh - -lcov -c -o coverage.info && echo "LAVA gcov-read: pass" || echo "LAVA gcov-read: fail" - -genhtml coverage.info -o gcov_test_coverage && echo "LAVA gcov-html: pass" || echo "LAVA gcov-html: fail" -tar czf gcov-results.tar.gz gcov_test_coverage -if [ -f gcov-results.tar.gz ]; then - lava-test-run-attach gcov-results.tar.gz application/x-gzip -fi diff --git a/common/scripts/gcov-start.sh b/common/scripts/gcov-start.sh deleted file mode 100755 index 9dd29f18..00000000 --- a/common/scripts/gcov-start.sh +++ /dev/null @@ -1,21 +0,0 @@ -#!/bin/sh - -df -h - -echo -n "LAVA gcov-enabled: " -[ -e /sys/kernel/debug/gcov/ ] && echo "pass" || echo "fail" - -echo -n "LAVA gcov-collecting: " -kdir=`find /sys/kernel/debug/gcov/ -type d|grep kernel/gcov` -[ -e $kdir/base.gcda ] && echo "pass" || echo "fail" - -# Currently we only support arndale gcov build -BUILD_NUMBER=`wget -q --no-check-certificate -O - https://ci.linaro.org/jenkins/job/linux-gcov/hwpack=arndale,label=kernel_cloud/lastSuccessfulBuild/buildNumber` -BASE_URL=http://snapshots.linaro.org/kernel-hwpack/linux-gcov-arndale/${BUILD_NUMBER} -if [ $# -gt 0 ]; then - BASE_URL=http://snapshots.linaro.org/kernel-hwpack/linux-gcov-arndale/$1 -fi -echo $BASE_URL -wget --progress=dot $BASE_URL/gcov-arndale-rootfs.tar.gz -O -|tar xzf - --strip-components=1 -C / - -df -h diff --git a/common/scripts/generator.sh b/common/scripts/generator.sh deleted file mode 100755 index e06a1177..00000000 --- a/common/scripts/generator.sh +++ /dev/null @@ -1,60 +0,0 @@ -#!/bin/sh -# -# 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. - -set -x -usage() -{ - echo "usage:" - echo " - $1 (interface.Primary traffic output interface.)" - echo " - $2 (address.The IP address that the packages will be replayed to.)" - echo " - $3 (rate.Replay packets at a given packets/sec.It takes an integer number or 'max' as its argument.)" - echo " - $4 (loop number.Loop through the capture file X times.)" -} - -if [ $# -ne 4 ]; then - echo "param miss!" - usage - exit 1 -fi - -INTF=$1 -ADDR=$2 -RATE=$3 -LOOP=$4 - -local_ip=$(ifconfig $INTF |grep "inet addr"|grep -v "127.0.0.1"|cut -d: -f2|cut -d' ' -f1) -remote_ip=$ADDR -local_mac=$(ifconfig $INTF | grep "HWaddr" | awk '{print $5}') -ping -c 1 ${remote_ip} - -if [ $? -ne 0 ]; then - echo "Address $remote_ip isn't reachable" - exit 1 -fi -remote_mac=$(arp -a | grep "${remote_ip}" | awk '{print $4}') - -opt="-t" -if [ $RATE != 'max' ]; then - opt="-p $RATE" -fi - -infile="./common/scripts/pcapfiles/iperf.pcap" -tcpreplay -V -tcpprep -a client -i $infile -o tmpcap.cache -tcprewrite --enet-smac=$local_mac,$remote_mac --enet-dmac=$remote_mac,$local_mac --endpoints=$local_ip:$remote_ip -c tmpcap.cache -i $infile -o out.tmpcap.pcap --skipbroadcast -tcpreplay -i eth0 -l 100 $opt -c tmpcap.cache out.tmpcap.pcap | ./common/scripts/netperf2LAVA.py diff --git a/common/scripts/iks-smoke-test.sh b/common/scripts/iks-smoke-test.sh deleted file mode 100755 index 6c1c8cc5..00000000 --- a/common/scripts/iks-smoke-test.sh +++ /dev/null @@ -1,105 +0,0 @@ -# IKS smoke test -# -# Copyright (C) 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: Naresh Kamboju <naresh.kamboju@linaro.org> -# -# "CONFIG_BL_SWITCHER=y" is required in kernel config. -# Enable and disable big.LITTLE switcher can be done in run time by using -# userspace entry "/sys/kernel/bL_switcher/active" -# This test is to enable and disable big.LITTLE IKS switcher 100 times. - -ERR_CODE=0 -switcher_disable () -{ - echo 0 > /sys/kernel/bL_switcher/active - ERR_CODE=$? - if [ $ERR_CODE -ne 0 ]; then - echo "not able to disable switcher" - return 1 - fi - return 0 -} - -switcher_enable () -{ - echo 1 > /sys/kernel/bL_switcher/active - ERR_CODE=$? - if [ $ERR_CODE -ne 0 ]; then - echo "not able to enable switcher" - return 1 - fi - return 0 -} - -check_iks() -{ - if [ -e /sys/kernel/bL_switcher/active ]; then - echo "******************************" - echo "IKS Implemented on this device" - echo "******************************" - else - echo "IKS not implemented on this device" - echo "skipping IKS tests" - echo "enable-and-disable-switcher-100-times: SKIP" - echo "IKS-smoke-test: SKIP" - exit 0 - fi -} - -check_kernel_oops() -{ - KERNEL_ERR=`dmesg | grep "Unable to handle kernel"` - if [ -n "$KERNEL_ERR" ]; then - echo "Kernel OOPS. Abort!!" - return 1 - fi - return 0 -} - -enable_and_disable_switcher_100_times() -{ - i=0 - while [ $i -lt 100 ]; do - switcher_enable - if [ $? -ne 0 ]; then - return $? - fi - sleep 1 - switcher_disable - if [ $? -ne 0 ]; then - return $? - fi - i=$(($i + 1)) - echo "enable/disable IKS loop $i" - done -} - -check_iks -enable_and_disable_switcher_100_times -if [ $? -eq 0 ]; then - echo "enable-and-disable-switcher-100-times: PASS" -else - echo "enable-and-disable-switcher-100-times: FAIL" -fi -check_kernel_oops -if [ $? -eq 0 ]; then - echo "IKS-smoke-test: PASS" -else - echo "IKS-smoke-test: FAIL" -fi -exit 0 diff --git a/common/scripts/include/sh-test-lib b/common/scripts/include/sh-test-lib deleted file mode 100755 index 3d6fc93d..00000000 --- a/common/scripts/include/sh-test-lib +++ /dev/null @@ -1,133 +0,0 @@ -#!/bin/sh -# -# Shared shell library for test management -# -# 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: Ricardo Salveti <rsalveti@linaro.org> -# Author: Botao Sun <botao.sun@linaro.org> -# Maintainer: Chase Qi <chase.qi@linaro.org> - -error_msg() { - local msg="$1" - test -z "${msg}" && msg="Unknown error" - echo "ERROR: ${msg}" >&2 - exit 1 -} - -warn_msg() { - local msg="$1" - test -z "${msg}" && msg="Unknown error" - printf "WARNING: %s\n\n" "${msg}" >&2 -} - -info_msg() { - local msg="$1" - test -z "${msg}" && msg="Unknown info" - printf "INFO: %s\n\n" "${msg}" >&1 -} - -check_return_fail() { - if [ $? -ne 0 ]; then - fail_test "$1" - return 0 - else - return 1 - fi -} - -fail_test() { - local reason="$1" - echo "${test}: fail - ${reason}" -} - -pass_test() { - echo "${test}: pass" -} - -check_root() { - if [ "$(id -ru)" -eq 0 ]; then - return 0 - else - return 1 - fi -} - -check_return() { - local exit_code="$?" - local test="$1" - - test -z "${test}" && warn_msg "Test name is empty" - - if [ "${exit_code}" -ne 0 ]; then - echo "${test} fail" | tee -a "${RESULT_FILE}" - return 1 - else - echo "${test} pass" | tee -a "${RESULT_FILE}" - return 0 - fi -} - -add_metric() { - local test="$1" - local measurement="$2" - local units="$3" - - test -z "${test}" && warn_msg "Test name is empty" - test -z "${measurement}" && warn_msg "Test measurement is empty" - test -z "${units}" && warn_msg "Test units is empty" - - echo "${test} pass ${measurement} ${units}" | tee -a "${RESULT_FILE}" -} - -dist_name() { - if [ -x /usr/bin/lsb_release ]; then - dist="$(lsb_release -si)" - elif [ -f /etc/lsb-release ]; then - . /etc/lsb-release - dist="${DISTRIB_ID}" - elif [ -f /etc/debian_version ]; then - dist="Debian" - elif [ -f /etc/fedora-release ]; then - dist="Fedora" - elif [ -f /etc/centos-release ]; then - dist="CentOS" - else - dist="Unknown" - warn_msg "Unsupported distro: cannot determine distribution name" - fi -} - -install_deps() { - local pkgs="$1" - dist_name - case "${dist}" in - Debian|Ubuntu) - apt-get update - apt-get install -y -q ${pkgs} - ;; - CentOS) - yum -e 0 -y install ${pkgs} - ;; - Fedora) - dnf -e 0 -y install ${pkgs} - ;; - Unknown) - warn_msg "Unsupported distro: package install skipped" - ;; - esac -} diff --git a/common/scripts/install-deps.sh b/common/scripts/install-deps.sh deleted file mode 100755 index 920db2f5..00000000 --- a/common/scripts/install-deps.sh +++ /dev/null @@ -1,35 +0,0 @@ -#!/bin/bash - -# Example: -# ./install-deps.sh android-tools-adb android-tools-fastboot -# Wait for unlock apt function waits for the apt-get process to be completed -# If in case it is already running - -wait_for_unlock_apt () { - RET=1 - while [ $RET -eq 1 ]; do - PID=`pgrep apt-get` - if [ -z $PID ]; then - RET=0 - break - fi - echo "apt-get still running PID: $PID" - sleep 5 - done -} - -# Read each package name from command line arguments -for pkg in ${@} -do - # Check if packages are already installed - STATUS=`dpkg-query -W -f='${Status} \n' $pkg | awk '{print $1}'` - - if [ "$STATUS" == "install" ]; then - echo "==== $pkg package is already installed ====" - else - wait_for_unlock_apt - echo "==== Install $pkg package ====" - apt-get install -y $pkg - fi -done -exit 0 diff --git a/common/scripts/iozone.sh b/common/scripts/iozone.sh deleted file mode 100755 index cc378a60..00000000 --- a/common/scripts/iozone.sh +++ /dev/null @@ -1,16 +0,0 @@ -#!/bin/sh - -TEST_ITEM="write rewrite read reread random_read random_write bkwd_read record_rewrite stride_read fwrite frewrite fread freread" -while read in -do - n=1 - kb=`echo ${in} | cut -d' ' -f 1` - reclen=`echo ${in} | cut -d' ' -f 2` - for i in `echo ${in} | cut -d' ' -f 3-` - do - itm=`echo ${TEST_ITEM} | cut -d' ' -f ${n}` - echo "${itm}-${kb}-KB-${reclen}-reclen: ${i} pass" - n=$(($n+1)) - done -done - diff --git a/common/scripts/iperf-client.sh b/common/scripts/iperf-client.sh deleted file mode 100755 index f2efb555..00000000 --- a/common/scripts/iperf-client.sh +++ /dev/null @@ -1,23 +0,0 @@ -#!/bin/sh - -#set -e -#set -x - -LEN=${1} -PACKET=${2} -TIME=${3} -TEST_CASE="Bandwidth" - -lava-wait server-ready -server_ip=$(cat /tmp/lava_multi_node_cache.txt | cut -d = -f 2) -opts="-c ${server_ip} -l ${LEN} -t ${TIME}" -[ "${PACKET}" = "UDP" ] && opts="${opts} -u" -echo "iperf client:" -echo "Running iperf ${opts}" -iperf ${opts} 2>&1 | tee result.log -echo -n "${TEST_CASE}: " -grep "^\[" result.log | tail -n 1 | awk '{print $7 " " $8 " pass"}' -lava-test-case iperf-client --shell [ -z "`grep "Connection refused" result.log`" ] && true || false -lava-test-case-attach iperf-client result.log -lava-send client-done - diff --git a/common/scripts/iperf-server.sh b/common/scripts/iperf-server.sh deleted file mode 100755 index 854b614b..00000000 --- a/common/scripts/iperf-server.sh +++ /dev/null @@ -1,20 +0,0 @@ -#!/bin/sh - -#set -e -#set -x - -LEN=${1} -PACKET=${2} -TIME=${3} - -opts="-s" -[ "${PACKET}" = "UDP" ] && opts="${opts} -u" -server_ip=$(ifconfig `route -n|grep "^0"|awk '{print $NF}'`|grep -o "inet addr:[0-9\.]*"|cut -d':' -f 2) -echo "iperf server:" -echo "Server IP: ${server_ip}" -echo "Runing iperf ${opts}" -iperf ${opts} & -echo $! > /tmp/iperf-server.pid -lava-send server-ready server_ip=${server_ip} -lava-wait client-done -lava-test-case iperf-server --shell kill -9 `cat /tmp/iperf-server.pid` diff --git a/common/scripts/is-cpu-isolated.sh b/common/scripts/is-cpu-isolated.sh deleted file mode 100755 index 0c1fba0c..00000000 --- a/common/scripts/is-cpu-isolated.sh +++ /dev/null @@ -1,535 +0,0 @@ -#!/bin/sh -# -# Author: Viresh Kumar <viresh.kumar@linaro.org> -# -# This script is used for isolating $1 (comma separated list of CPUs) CPUs from -# other kernel background activities. -# -# This runs task on the isolated CPUs and Figures out if CPUs are -# isolated or not by reading 'cat /proc/interrupts' for all interrupts. - -# SCRIPT ARGUMENTS -# $1: CPUs to isolate (default 1), pass comma separated list here -# $2: number of samples to take (default 1) -# $3: Min Isolation Time Expected in seconds (default 10) - -# Script arguments -ISOL_CPUS=1 # CPU to isolate, default 1. Comma-separated list of CPUs. -SAMPLE_COUNT=1 # How many samples to be taken -MIN_ISOLATION=10 # Minimum isolation expected - -# Global variables -STRESS_DURATION=5000 # Run task for this duration -NON_ISOL_CPUS="0" # CPU not to isolate, zero will always be there as we can't stop ticks on boot CPU. -DEBUG_SCRIPT=1 # Print debug messages, set 0 if not required -TASK="stress" # Single threaded task to Run on Isolated CPUs -FUNC="all" # Perform complete isolation test by default -SCRIPT_VERSION=1.0 # To track release version -FILE="cat /proc/interrupts" # File to monitor for isolation -QUIRKS="" # IPI mask variable for known x86 IPI quirk, default 'null' -RESULT="PASS" - -# Variables to keep an eye on total interrupt counts -old_count=0 -new_count=0 - -# ROUTINES -# ------------------------------------ - -# Print debug messages, set DEBUG_SCRIPT to 0 if not required -isdebug() { - if [ $DEBUG_SCRIPT -eq 1 ]; then - $* - fi -} - -# Calls routine $1 for each Isolated CPU with parameter CPU-number -for_each_isol_cpu() { - for i in `echo $ISOL_CPUS | sed 's/,/ /g'`; do - $1 $i - done -} - -# Get rid of cpufreq-timer activities, pass CPU number in $1 -cpufreq_fix_governor() { - # Remove governor's background timers, i.e. use performance governor - if [ -d /sys/devices/system/cpu/cpu$1/cpufreq ]; then - echo performance > /sys/devices/system/cpu/cpu$1/cpufreq/scaling_governor - fi -} - -# dump all interrupts on standard output -dump_interrupts() { - [ ! $1 ] && printf "\nInitial dump of /proc/interrupts\n" - [ $1 ] && printf "\n\nInterrupted: new dump of /proc/interrupts\n" - echo "----------------------------------------------" - - cat /proc/interrupts - printf "\n\n" -} - -# Check $1 is isol cpu or not -is_isol_cpu() { - for i in `echo $ISOL_CPUS | sed 's/,/ /g'`; do - if [ $i = $1 ] - then - echo 1 # isol cpu found - fi - done - - echo 0 # non-isol cpu -} - -# update list of all non-ISOL CPUs -update_non_isol_cpus() { - total_cpus=`nproc --all --ignore=1` #ignore CPU 0 as we already have that - cpu=1 - - while [ $cpu -le $total_cpus ] - do - [ "$(is_isol_cpu $cpu)" == 0 ] && NON_ISOL_CPUS="$NON_ISOL_CPUS,$cpu" - let cpu=cpu+1 - done - - isdebug echo "Isolate: CPU "$ISOL_CPUS" and leave others: "$NON_ISOL_CPUS - isdebug echo "" -} - -# Find total number of interrupts for -# - one CPU, pass cpu number as parameter -# - all CPUs, pass "ALL" as parameter -total_interrupts() { - (([ $QUIRKS ] && $FILE | egrep -v $QUIRKS) || $FILE) | - awk -v isolate_cpu="$1" ' - BEGIN { - line=0; - } - - # Find total CPUs, do only on first row - NR==1 { - cpus = NF; - next; - } - - # Fill array with interrupt counts - { - for (cpu = 0; cpu < cpus; cpu++) { - irqs[cpu, line] = $(cpu+2); - } - line++; - } - - # Count total interrupts: - END { - for (cpu = 0; cpu < cpus; cpu++) { - for (j = 0; j < line; j++) { - count[cpu] += irqs[cpu,j]; - # for debugging - # printf "%d: %d: %d\n",cpu, j,irqs[cpu,j]; - } - - if (isolate_cpu == "ALL") - printf "%d ",count[cpu] - else if (cpu == isolate_cpu) - printf "%d ",count[cpu] - - } - printf "\n" - } - - # File to process -' -} - -# Create per-cpu data plane cpuset -create_dplane_cpuset() { - # Create per-cpu cpuset and set important fields - [ -d /dev/cpuset/dplane/cpu$1 ] || mkdir /dev/cpuset/dplane/cpu$1 - - echo 0 > /dev/cpuset/dplane/cpu$1/$CPUSET_PREFIX"mems" - echo $1 > /dev/cpuset/dplane/cpu$1/$CPUSET_PREFIX"cpus" - echo 0 > /dev/cpuset/dplane/cpu$1/$CPUSET_PREFIX"sched_load_balance" - - # exit early in case of non-stress app - if [ "stress" != "$TASK" ]; then - return - fi - - # Move shell to isolated CPU - echo $$ > /dev/cpuset/dplane/cpu$1/tasks - - # Start single cpu bound task - stress -q --cpu 1 --timeout $STRESS_DURATION & - - # Move shell back to control plane CPU - echo $$ > /dev/cpuset/cplane/tasks -} - -# Remove per-cpu cpusets -remove_dplane_cpuset() { - rmdir /dev/cpuset/dplane/cpu$1 -} - -# Update sysfs tunables to isolate CPU -update_sysfs_tunables() { - # Call cpufreq_fix_governor for each isolated CPU - for_each_isol_cpu cpufreq_fix_governor - - # Affine all irqs to CPU0 - for i in `find /proc/irq/* -name smp_affinity`; do - echo 1 > $i > /dev/null; - done - - # Try to disable sched_tick_max_deferment - if [ -d /sys/kernel/debug -a -f /sys/kernel/debug/sched_tick_max_deferment ]; then - echo -1 > /sys/kernel/debug/sched_tick_max_deferment - echo "sched_tick_max_deferment set to:" `cat /sys/kernel/debug/sched_tick_max_deferment` - else - sysctl -e kernel.sched_tick_max_deferment=-1 - - fi - - # Move bdi writeback workqueues to CPU0 - echo 1 > /sys/bus/workqueue/devices/writeback/cpumask - - # Delay the annoying vmstat timer far away (in seconds) - sysctl vm.stat_interval=1000 - - # Delay the annoying vmstat timer far away (in centiseconds) - sysctl vm.dirty_writeback_centisecs=100000 - - # Delay the annoying vmstat timer far away (in centiseconds) - sysctl vm.dirty_expire_centisecs=100000 - - # Shutdown nmi watchdog as it uses perf events - sysctl -w kernel.watchdog=0 -} - -# routine to isolate a CPU -isolate_cpu() { - isdebug echo "" - isdebug echo "Started Isolating CPUs - via CPUSETS" - isdebug echo "------------------------------------" - isdebug echo "" - - # Update list of non isol CPUs - update_non_isol_cpus - - # Update sysfs tunables - update_sysfs_tunables - - # Check that we have cpusets enabled in the kernel - if ! grep -q -s cpuset /proc/filesystems ; then - echo "Error: Kernel is lacking support for cpuset!" - exit 1 - fi - - # make sure that the /dev/cpuset dir exits - # and mount the cpuset filesystem if needed - [ -d /dev/cpuset ] || mkdir /dev/cpuset - mount | grep /dev/cpuset > /dev/null || mount -t cpuset none /dev/cpuset - - # Create 2 cpusets. One control plane and one data plane - [ -d /dev/cpuset/cplane ] || mkdir /dev/cpuset/cplane - [ -d /dev/cpuset/dplane ] || mkdir /dev/cpuset/dplane - - # check if platform needs a prefix for cpuset - [ -f /dev/cpuset/cplane/cpus ] && CPUSET_PREFIX="" - [ -f /dev/cpuset/cplane/cpuset.cpus ] && CPUSET_PREFIX="cpuset." - - # Give same mems to both - echo 0 > /dev/cpuset/cplane/$CPUSET_PREFIX"mems" - echo 0 > /dev/cpuset/dplane/$CPUSET_PREFIX"mems" - - # Setup the cplane domain: CPU0 - echo $NON_ISOL_CPUS > /dev/cpuset/cplane/$CPUSET_PREFIX"cpus" - - # Setup the NOHZ domain: CPU1 - echo $ISOL_CPUS > /dev/cpuset/dplane/$CPUSET_PREFIX"cpus" - - # Try to move all processes in top set to the cplane set. - for pid in `cat /dev/cpuset/tasks`; do - if [ -d /proc/$pid ]; then - echo $pid > /dev/cpuset/cplane/tasks 2>/dev/null - if [ $? != 0 ]; then - isdebug echo -n "Cannot move PID $pid: " - isdebug echo "$(cat /proc/$pid/status | grep ^Name | cut -f2)" - fi - fi - done - - # Disable load balancing on top level (otherwise the child-sets' setting won't take effect.) - echo 0 > /dev/cpuset/$CPUSET_PREFIX"sched_load_balance" - - # Enable load balancing withing the cplane domain - echo 1 > /dev/cpuset/cplane/$CPUSET_PREFIX"sched_load_balance" - - # But disallow load balancing within the NOHZ domain - echo 0 > /dev/cpuset/dplane/$CPUSET_PREFIX"sched_load_balance" - - # Quiesce CPU: i.e. migrate timers/hrtimers away - echo 1 > /dev/cpuset/dplane/$CPUSET_PREFIX"quiesce" - - # Restart $ISOL_CPUS to migrate all tasks to CPU0 - # Commented-out: as we should get good numbers without this HACK - # echo 0 > /sys/devices/system/cpu/cpu$ISOL_CPUS/online - # echo 1 > /sys/devices/system/cpu/cpu$ISOL_CPUS/online - - # Call create_dplane_cpuset for each isolated CPU - for_each_isol_cpu create_dplane_cpuset -} - -# Count total number of interrupts for all isolated CPUs -count_interrupts_on_isol_cpus() { - temp=($*) - count=0 - - for i in `echo $ISOL_CPUS | sed 's/,/ /g'`; do - count=$(( $count + ${temp[i]} )) - done - - echo $count -} - -# Scan all interrupts again and find total for isolated-cores -refresh_interrupts() { - # Get interrupt count for all CPUs - interrupts=($(total_interrupts "ALL")) - - # Find total count of all interrupts on isol CPUs - new_count=$(count_interrupts_on_isol_cpus ${interrupts[@]}) - - [ $1 ] && isdebug echo "Counts for all CPUs: ${interrupts[@]}, total isol-cpus interrupts: $new_count" -} - -# Sense infinite isolation -sense_infinite_isolation() { - # process interrupts - refresh_interrupts "print" - old_count=$new_count - - # Get time as a UNIX timestamp (seconds elapsed since Jan 1, 1970 0:00 UTC) - T1="$(date +%s)" - - while [ $new_count -eq $old_count ] - do - # process interrupts - refresh_interrupts - - ps h -C $TASK -o pid > /dev/null - if [ $? != 0 ]; then - T2="$(date +%s)" - T=$(($T2-$T1)) - - echo "Quitting. Infinite Isolation detected: No interrupts for last: $T seconds" - echo "test_case_id:Min-isolation $MIN_ISOLATION secs result:$RESULT measurement:$T units:secs" - exit - fi - done - - # Interrupted, dump interrupts - isdebug dump_interrupts 1 -} - -# routine to report CPU isolation time -get_isolation_duration() { - isdebug echo "" - isdebug echo "" - isdebug echo "Capture Isolation time" - isdebug echo "----------------------" - - isdebug echo "No. of samples requested:" $SAMPLE_COUNT", min isolation required:" $MIN_ISOLATION - isdebug echo "" - - isdebug dump_interrupts - - # Get time as a UNIX timestamp (seconds elapsed since Jan 1, 1970 0:00 UTC) - T2="$(date +%s)" - - x=0; AVG=0; MIN=99999999; MAX=0 - - while [ $x -lt $SAMPLE_COUNT ] - do - let x=x+1 - - T1=$T2 - isdebug echo "Start Time in seconds: ${T1}" - - # sometimes there are two or more continuous ticks, skip them by sleeping for 100 ms. - sleep .1 - - # Sense infinite isolation - sense_infinite_isolation - - T2="$(date +%s)" - T=$(($T2-$T1)) - - isdebug echo "End Time in seconds: ${T2}, time diff: " - echo "$T seconds" - isdebug echo "" - - # Calculations to show results - let AVG=AVG+T - - if [ $T -lt $MIN_ISOLATION -a $RESULT="PASS" ]; then - RESULT="FAIL" - fi - - # Record minimum and maximum isolation - if [ $T -lt $MIN ]; then - MIN=$T - fi - if [ $T -gt $MAX ]; then - MAX=$T - fi - done - - let AVG=AVG/$SAMPLE_COUNT - - isdebug echo "Result:" - echo "test_case_id:Min-isolation "$MIN_ISOLATION" secs result:"$RESULT" measurement:"$AVG" units:secs" - echo "Min isolation is: "$MIN", Max isolation is: "$MAX" and Average isolation time is: "$AVG - isdebug echo "" -} - -# Clear/remove all CPUsets, kill all instances of 'stess' -clear_cpusets() { - isdebug echo "" - isdebug echo "Started cleaning CPUSETS" - isdebug echo "------------------------" - isdebug echo "" - - # - # Cleanup - # - - # kill all instances of task - for i in `ps | grep $TASK | sed 's/^\ *//g' | cut -d' ' -f1`; - do - kill -9 $i; - done - - # Try to move all from cplane back to root - for pid in `cat /dev/cpuset/cplane/tasks`; do - if [ -d /proc/$pid ]; then - echo $pid > /dev/cpuset/tasks 2>/dev/null - if [ $? != 0 ]; then - isdebug echo -n "Cannot move PID $pid: " - isdebug echo "$(cat /proc/$pid/status | grep ^Name | cut -f2)" - fi - fi - done - - # Remove the CPUsets - for_each_isol_cpu remove_dplane_cpuset - - # delay required b/w cpu* cpusets and dplane cpuset for some reason, - # other wise we get this: Device or resource busy - sleep .1 - - rmdir /dev/cpuset/cplane - rmdir /dev/cpuset/dplane -} - - -# Execution starts from HERE - -USAGE="Usage: $0 [-hvq] [-ctfsd args] [-h <help>] [-v <script version>] [-q <quirks: X86_IPI>][-c <Comma separated isol cpulist (default cpu1)>] [-t <Task name for isolation (default stress)>] [-f <Function type options: isolate, duration, clear, all (default all)>] [-s <Number of samples to take (default 1)>] [-d <Min Isolation duration expected in seconds (default 10)>]" - -# Run isolation test for $FUNC -run_func() -{ - isdebug echo "" - isdebug echo "Function type: $FUNC" - - case "$FUNC" in - "isolate") - isolate_cpu - ;; - - "duration") - get_isolation_duration - ;; - - "clear") - clear_cpusets - ;; - - "nonisol_list") - update_non_isol_cpus - ;; - - "all") - isolate_cpu - get_isolation_duration - clear_cpusets - ;; - - *) - echo "Invalid [-f] function type" - ;; - esac -} - -# Parse isol arguments -parse_arguments() -{ - while getopts hvc:t:f:s:d:q: arguments 2>/dev/null - do - case $arguments in - h) # --help - echo "$USAGE" - exit 0 - ;; - - v) # --script version - isdebug echo "$0 Version $SCRIPT_VERSION" - exit 0 - ;; - - c) # --cpu (comma separated isol cpulist, default cpu1) - ISOL_CPUS=$OPTARG - ;; - - t) # --task (task to run, default stress) - TASK=$OPTARG - ;; - - f) # --func_type (Function to perform: Isolate, Duration, - # Clear, Nonisol_list, all. default all) - FUNC=$OPTARG - ;; - - s) # --sample_count (no of samples to take, default 1) - SAMPLE_COUNT=$OPTARG - ;; - - d) # --duration (min isolation time duration, default 10) - MIN_ISOLATION=$OPTARG - ;; - - q) # --quirk - # Known Quirks: - # - X86_IPI: Spurious IPI's break isolation - - if [ $OPTARG = X86_IPI ]; then - QUIRKS="interrupts|RTR|TLB|MCE|MCP|ERR|MIS" - isdebug echo "Enabled Quriks: $OPTARG" - else - echo "Invalid Quirk passed. Valid options: X86_IPI" - fi - ;; - - \?) # getopts issues an error message - echo "$USAGE " - exit 1 - ;; - esac - done -} - -# Parse isol arguments -parse_arguments $@ - -# Run isolation test for requested functionality -run_func diff --git a/common/scripts/kselftest-mqueue.sh b/common/scripts/kselftest-mqueue.sh deleted file mode 100755 index 546a596d..00000000 --- a/common/scripts/kselftest-mqueue.sh +++ /dev/null @@ -1,31 +0,0 @@ -#!/bin/sh - -cd $(dirname $0) -BASEDIR=$(pwd) -LAVA_ROOT="${BASEDIR}/../.." -TEST_DIR="${LAVA_ROOT}/kselftest/mqueue" - -#### Test mq_open_tests ######## -echo -echo "Test mq_open_tests" -echo -cd ${TEST_DIR} -gcc -O2 mq_open_tests.c -o mq_open_tests -lrt -./mq_open_tests /test1 || echo "mq_open_tests: FAIL" - -#### Test mq_perf_tests ######## -echo -echo "Test mq_perf_tests" -echo -# Build libpopt -cd ${LAVA_ROOT} -wget http://rpm5.org/files/popt/popt-1.16.tar.gz -O - | tar zxf - -cd popt-1.16 -# Due to the config.guess doesn't support aarch64 yet. We have to specify system type -[ `uname -m` = "aarch64" ] && BUILD="--build=aarch64-unknown-linux-gnu" -./configure ${BUILD} --prefix=/usr -make install -cd ${TEST_DIR} -gcc -O2 -o mq_perf_tests mq_perf_tests.c -lrt -lpthread -lpopt -./mq_perf_tests || echo "mq_perf_tests: FAIL" - diff --git a/common/scripts/kselftest-runner.sh b/common/scripts/kselftest-runner.sh deleted file mode 100755 index 3cfd0dbd..00000000 --- a/common/scripts/kselftest-runner.sh +++ /dev/null @@ -1,28 +0,0 @@ -#!/bin/sh - -TEST_NAME=$1 -COMMAND=$(basename "$2") -DIR=$(dirname "$2") -LOG="result.log"; - -cd ${DIR} -ls ${COMMAND} > /dev/null 2>&1 && chmod a+x ${COMMAND} -export PATH=.:${PATH} -(${COMMAND} 2>&1 || echo "${TEST_NAME}: [FAIL]") | tee ${LOG} -if [ -n "`grep \"skip\" ${LOG}`" ]; then - echo "${TEST_NAME}: [SKIP]"; -elif [ -z "`grep \"SKIP\|FAIL\" ${LOG}`" ]; then - echo "${TEST_NAME}: [PASS]" -elif [ -n "`grep \"FAIL\" ${LOG}`" ]; then - echo "${TEST_NAME}: [FAIL]" -fi - -while read l; -do - [ -n "`echo $l|grep 'running'`" ] && test="`echo $l|sed 's/running //'`" - [ -n "`echo $l|grep \"\[PASS\|FAIL\|SKIP\"`" ] && result=$l - [ "${test}" -a "${result}" ] && echo "${test}: ${result}" && unset test && unset result -done < ${LOG} - -# clean exit so that lava-test-shell can trust the results -exit 0 diff --git a/common/scripts/kvm/kvm-lava.conf b/common/scripts/kvm/kvm-lava.conf deleted file mode 100644 index f2f3dad4..00000000 --- a/common/scripts/kvm/kvm-lava.conf +++ /dev/null @@ -1,8 +0,0 @@ - -start on runlevel [23] -stop on runlevel [!23] -console output -script - sh /usr/bin/test-guest.sh - poweroff -end script diff --git a/common/scripts/kvm/kvm-lava.service b/common/scripts/kvm/kvm-lava.service deleted file mode 100644 index 54113efe..00000000 --- a/common/scripts/kvm/kvm-lava.service +++ /dev/null @@ -1,10 +0,0 @@ -[Unit] -Description=KVM guest tests - -[Service] -Type=oneshot -ExecStart=/usr/bin/test-guest.sh -ExecStartPost=/sbin/poweroff - -[Install] -WantedBy=multi-user.target diff --git a/common/scripts/kvm/test-host.sh b/common/scripts/kvm/test-host.sh deleted file mode 100755 index e6541160..00000000 --- a/common/scripts/kvm/test-host.sh +++ /dev/null @@ -1,37 +0,0 @@ -#!/bin/sh -# -# 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. -# -# Maintainer: Riku Voipio <riku.voipio@linaro.org> - -echo "Download hackbench" -curl 2>/dev/null -if [ $? = 2 ]; then - DOWNLOAD_FILE="curl -SOk" -else - DOWNLOAD_FILE="wget --progress=dot -e dotbytes=2M --no-check-certificate" -fi - -# source http://people.redhat.com/mingo/cfs-scheduler/tools/hackbench.c -$DOWNLOAD_FILE http://testdata.validation.linaro.org/tools/hackbench-armv7l -$DOWNLOAD_FILE http://testdata.validation.linaro.org/tools/hackbench-aarch64 -chmod a+x hackbench* -ARCH=`uname -m` -cp hackbench-${ARCH} /usr/bin/hackbench - -echo "Test hackbench on host" -sh ./common/scripts/kvm/test-rt-tests.sh host diff --git a/common/scripts/kvm/test-kvm.sh b/common/scripts/kvm/test-kvm.sh deleted file mode 100755 index f68376e2..00000000 --- a/common/scripts/kvm/test-kvm.sh +++ /dev/null @@ -1,263 +0,0 @@ -#!/bin/sh -# -# 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. -# -# Maintainer: Riku Voipio <riku.voipio@linaro.org> - -tamper_guest() -{ - guest=$1 - prefix=$2 - PREFIX_KVM_BOOT=${prefix}-$KVM_BOOT - PREFIX_KVM_GUEST_NET=${prefix}-$KVM_GUEST_NET - - if [ ! -r $guest ]; then - echo "$PREFIX_KVM_BOOT 0 pc skip" - echo "$PREFIX_KVM_GUEST_NET 0 pc skip" - exit 0 - fi - - qemu-nbd -c /dev/nbd0 $guest - sleep 2 - mount /dev/nbd0p2 /mnt/ - - if [ -x /mnt/lib/systemd/systemd ] - then - cp common/scripts/kvm/kvm-lava.service /mnt/etc/systemd/system/kvm-lava.service - chroot /mnt systemctl enable kvm-lava.service - else - cp common/scripts/kvm/kvm-lava.conf /mnt/etc/init/kvm-lava.conf - fi - - # Build up file test-guest.sh - if [ "x$1" = "xbenchmark" ]; then - cp /usr/bin/lat_ctx /mnt/usr/bin/lat_ctx - cp common/scripts/lmbench.sh /mnt/root/lmbench.sh - TEST_SCRIPT=/root/lmbench.sh - else - cp hackbench-${prefix} /mnt/usr/bin/hackbench - cp common/scripts/kvm/test-rt-tests.sh /mnt/root/test-rt-tests.sh - TEST_SCRIPT="/root/test-rt-tests.sh ${prefix}-guest" - fi - - cat >> /mnt/usr/bin/test-guest.sh <<EOF -#!/bin/sh - exec > /root/guest.log 2>&1 - echo "$PREFIX_KVM_BOOT 0 pc pass" - ping -w 20 -c 10 10.0.0.1 && echo "$PREFIX_KVM_GUEST_NET 0 pc pass" || echo "$PREFIX_KVM_GUEST_NET 0 pc fail" - sh $TEST_SCRIPT -EOF - chmod a+x /mnt/usr/bin/test-guest.sh - - umount /mnt - mount /dev/nbd0p1 /mnt/ - case $prefix in - aarch64) - cp Image /mnt - echo 'FS0:\Image root=/dev/vda2 rw rootwait mem=1024M earlyprintk=pl011,0x9000000 console=ttyAMA0,38400n8' > /mnt/startup.nsh - ;; - armv7l) - cp zImage-vexpress /mnt/zImage - echo 'FS0:\zImage root=/dev/vda2 rw rootwait mem=1024M console=ttyAMA0,38400n8' > /mnt/startup.nsh - ;; - esac - umount /mnt - sync - qemu-nbd -d /dev/nbd0 - -} - -get_results() -{ - guest=$1 - prefix=$2 - qemu-nbd -c /dev/nbd0 $guest - sleep 2 - mount /dev/nbd0p2 /mnt/ - - if ! grep -q "kvm-boot-1:" /mnt/root/guest.log - then - echo "${prefix}-${KVM_BOOT} 0 pc fail" - fi - echo ${prefix}-guest logs: - cp /mnt/*.txt . - cp /mnt/root/guest.log ./${prefix}-guest.log - cat ./${prefix}-guest.log - umount /mnt - sync - qemu-nbd -d /dev/nbd0 -} - -deadline() { - timeout=$1 - binary=$2 - set +o errexit - while [ true ]; do - pid=`pidof $binary` - if [ $? -ne 0 ]; then - break - fi - sleep 60 - timeout=$((timeout - 1)) - if [ $timeout -eq 0 ]; then - kill $pid - sleep 10 - kill -9 $pid - break - fi - done -} - -KVM_HOST_NET="kvm-host-net-1:" -KVM_GUEST_NET="kvm-guest-net-1:" -KVM_INIT="kvm-init-1:" -KVM_BOOT="kvm-boot-1:" -if [ "x$1" = "xbenchmark" ]; then - KVM_HOST_NET="$KVM_HOST_NET 0 none" - KVM_GUEST_NET="$KVM_GUEST_NET 0 none" - KVM_INIT="$KVM_INIT 0 none" - KVM_BOOT="$KVM_BOOT 0 none" -fi - -ARCH=`uname -m` - -[ -c /dev/kvm ] && echo "$KVM_INIT 0 pc pass" || \ -{ - echo "$KVM_INIT 0 pc fail" - echo "$KVM_HOST_NET 0 pc skip" - echo "$KVM_BOOT 0 pc skip" - echo "$KVM_GUEST_NET 0 pc skip" - exit 0 -} - -curl 2>/dev/null -if [ $? = 2 ]; then - EXTRACT_BUILD_NUMBER="curl -sk" - DOWNLOAD_FILE="curl -SOkL -# " -else - EXTRACT_BUILD_NUMBER="wget -q --no-check-certificate -O -" - DOWNLOAD_FILE="wget --no-clobber --progress=dot -e dotbytes=2M --no-check-certificate" -fi - -BUILD_NUMBER_GUEST=`$(echo $EXTRACT_BUILD_NUMBER) https://ci.linaro.org/job/kvm-guest-image/lastSuccessfulBuild/buildNumber` -BUILD_NUMBER_HOST=`$(echo $EXTRACT_BUILD_NUMBER) https://ci.linaro.org/job/linux-kvm/lastSuccessfulBuild/buildNumber` - -$DOWNLOAD_FILE http://snapshots.linaro.org/ubuntu/images/kvm-guest/$BUILD_NUMBER_GUEST/armhf/kvm-armhf.qcow2.xz -$DOWNLOAD_FILE http://snapshots.linaro.org/ubuntu/images/kvm/arndale/$BUILD_NUMBER_HOST/zImage-armv7 -mv zImage-armv7 zImage-vexpress -$DOWNLOAD_FILE http://snapshots.linaro.org/ubuntu/images/kvm/arndale/$BUILD_NUMBER_HOST/vexpress-v2p-ca15-tc1.dtb - -xz -d kvm-armhf.qcow2.xz - -case ${ARCH} in - armv7l) - modprobe nbd max_part=16 - ;; - aarch64) - hwpack=`uname -r|sed -e's,.*-,,'` - $DOWNLOAD_FILE http://snapshots.linaro.org/ubuntu/images/kvm-guest/$BUILD_NUMBER_GUEST/arm64/kvm-arm64.qcow2.xz - $DOWNLOAD_FILE http://snapshots.linaro.org/ubuntu/images/kvm/$hwpack/$BUILD_NUMBER_HOST/Image-${hwpack} - $DOWNLOAD_FILE http://snapshots.linaro.org/ubuntu/images/kvm/$hwpack/$BUILD_NUMBER_HOST/nbd-${hwpack}.ko.gz - $DOWNLOAD_FILE http://releases.linaro.org/components/kernel/uefi-linaro/15.12/release/qemu64/QEMU_EFI.fd - xz -d kvm-arm64.qcow2.xz - zcat nbd-${hwpack}.ko.gz > nbd.ko - insmod nbd.ko max_part=16 - mv Image-${hwpack} Image - tamper_guest kvm-arm64.qcow2 aarch64 - ;; - *) - echo unknown arch ${ARCH} - exit 1 - ;; -esac - - -echo 0 2000000 > /proc/sys/net/ipv4/ping_group_range - -tamper_guest kvm-armhf.qcow2 armv7l - -if ! grep -q root=/dev/nfs /proc/cmdline -then - echo "setting up and testing networking bridge for guest" - brctl addbr br0 - tunctl -u root - ifconfig eth0 0.0.0.0 up - ifconfig tap0 0.0.0.0 up - brctl addif br0 eth0 - brctl addif br0 tap0 - udhcpc -t 10 -i br0 - netparams="-device virtio-net-device,netdev=tap0 -netdev tap,id=tap0,script=no,downscript=no,ifname=tap0" -else - netparams="-netdev user,id=user0 -device virtio-net-device,netdev=user0" -fi - -ping -W 4 -c 10 10.0.0.1 && echo "$KVM_HOST_NET 0 pc pass" || echo "$KVM_HOST_NET 0 pc fail" - -case ${ARCH} in - armv7l) - deadline 60 qemu-system-arm & - qemu-system-arm --version - qemu-system-arm -smp 2 -m 1024 -cpu cortex-a15 -M vexpress-a15 \ - -kernel ./zImage-vexpress -dtb ./vexpress-v2p-ca15-tc1.dtb \ - -append 'root=/dev/vda2 rw rootwait mem=1024M console=ttyAMA0,38400n8' \ - $netparams \ - -drive if=none,id=image,file=kvm-armhf.qcow2 \ - -device virtio-blk-device,drive=image \ - -nographic -enable-kvm 2>&1|tee kvm-arm32.log - ;; - aarch64) - # handle big.LITTLE - hwloc-ls - case ${hwpack} in - juno) - # run on a53 cluster - echo run on a53 - bind="hwloc-bind socket:0" - ;; - *) - bind="" - ;; - esac - deadline 120 qemu-system-aarch64 & - qemu-system-aarch64 --version - echo "64bit guest test" - $bind qemu-system-aarch64 -smp 2 -m 1024 -cpu host -M virt \ - -bios QEMU_EFI.fd \ - -device virtio-blk-device,drive=image \ - -drive if=none,id=image,file=kvm-arm64.qcow2 \ - $netparams \ - -nographic -enable-kvm 2>&1|tee kvm-arm64.log - echo "32bit guest test" - $bind qemu-system-aarch64 -smp 2 -m 1024 -cpu host,aarch64=off -M virt \ - -kernel ./zImage-vexpress \ - -append 'root=/dev/vda2 rw rootwait mem=1024M console=ttyAMA0,38400n8' \ - -device virtio-blk-device,drive=image \ - -drive if=none,id=image,file=kvm-armhf.qcow2 \ - $netparams \ - -nographic -enable-kvm 2>&1|tee kvm-arm32.log - get_results kvm-arm64.qcow2 aarch64 - ;; - *) - echo unknown arch ${ARCH} - exit 1 - ;; -esac - -get_results kvm-armhf.qcow2 armv7l - -ls *log *txt -rm -f md5sum.txt diff --git a/common/scripts/kvm/test-rt-parse.sh b/common/scripts/kvm/test-rt-parse.sh deleted file mode 100755 index 70ad7db4..00000000 --- a/common/scripts/kvm/test-rt-parse.sh +++ /dev/null @@ -1,33 +0,0 @@ -#!/bin/sh -# -# 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. -# -# Maintainer: Riku Voipio <riku.voipio@linaro.org> - -if [ -f ./common/scripts/min_max_avg_parse.py ] -then - PARSE_SCRIPT=./common/scripts/min_max_avg_parse.py -elif [-f /root/min_max_avg_parse.py ] -then - PARSE_SCRIPT=/root/min_max_avg_parse.py -fi - -for FILE in *.txt -do - echo $FILE - $PARSE_SCRIPT $FILE "Time:" "Seconds" -done diff --git a/common/scripts/kvm/test-rt-tests.sh b/common/scripts/kvm/test-rt-tests.sh deleted file mode 100755 index dc6bd614..00000000 --- a/common/scripts/kvm/test-rt-tests.sh +++ /dev/null @@ -1,27 +0,0 @@ -#!/bin/sh -# -# 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. -# -# Maintainer: Riku Voipio <riku.voipio@linaro.org> - -/usr/bin/hackbench 100 process 500 | tee $1_hackbench_l500_p_g100_res.txt -/usr/bin/hackbench 100 process 500 | tee -a $1_hackbench_l500_p_g100_res.txt -/usr/bin/hackbench 100 process 500 | tee -a $1_hackbench_l500_p_g100_res.txt -/usr/bin/hackbench 100 process 500 | tee -a $1_hackbench_l500_p_g100_res.txt -/usr/bin/hackbench 100 process 500 | tee -a $1_hackbench_l500_p_g100_res.txt -/usr/bin/hackbench 100 process 500 | tee -a $1_hackbench_l500_p_g100_res.txt -/usr/bin/hackbench 100 process 500 | tee -a $1_hackbench_l500_p_g100_res.txt diff --git a/common/scripts/lkp.py b/common/scripts/lkp.py deleted file mode 100755 index f27c02ed..00000000 --- a/common/scripts/lkp.py +++ /dev/null @@ -1,169 +0,0 @@ -#!/usr/bin/env python -# -# Run LKP test suite on Linaro ubuntu -# -# Copyright (C) 2012 - 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: Chase Qi <chase.qi@linaro.org> -# -import os -import sys -import platform -import glob -import json -import pwd -import shutil -from subprocess import call - -LKP_PATH = sys.argv[1] -WD = sys.argv[2] -JOB = sys.argv[3] -COMMIT = sys.argv[4] -LOOPS = int(sys.argv[5]) -MONITORS = sys.argv[6] -HOSTNAME = platform.node() -ROOTFS = str.lower(platform.dist()[0]) -CONFIG = 'defconfig' -COMPILER = os.readlink('/usr/bin/gcc') -print 'Working directory: %s' % (WD) -print 'LKP test suite path: %s' % (LKP_PATH) -print 'About to run %s %s times' % (JOB, LOOPS) - - -def test_result(test_command, test_case_id): - # For each step of test run, print pass or fail to test log. - if call(test_command) == 0: - print '%s pass' % (test_case_id) - return True - else: - print '%s fail' % (test_case_id) - return False - - -def find_user(name): - try: - return pwd.getpwnam(name) - except KeyError: - return None - - -# pre-config. -if not find_user('lkp'): - print 'creating user lkp...' - call(['useradd', '--create-home', '--home-dir', '/home/lkp', 'lkp']) -else: - print 'User lkp already exists.' - -if not os.path.exists('/home/lkp'): - os.makedirs('/home/lkp') -call(['chown', '-R', 'lkp:lkp', '/home/lkp']) - -f = open('/etc/apt/sources.list.d/multiverse.list', 'w') -f.write('deb http://ports.ubuntu.com/ubuntu-ports/ vivid multiverse\n') -f.close() -call(['apt-get', 'update']) - -# Setup test job. -SETUP_JOB = [LKP_PATH + '/bin/setup-local', - LKP_PATH + '/jobs/' + JOB + '.yaml'] -print 'Setup %s test with command: %s' % (JOB, SETUP_JOB) -if not test_result(SETUP_JOB, 'setup-' + JOB): - sys.exit(1) - -# Split test job. -if not os.path.exists(WD + '/' + JOB): - os.makedirs(WD + '/' + JOB) -if MONITORS == 'default': - MONITORS = '' -SPLIT_JOB = [LKP_PATH + '/sbin/split-job', MONITORS, '--kernel', COMMIT, - '--output', WD + '/' + JOB, LKP_PATH + '/jobs/' + JOB + '.yaml'] -print 'Splitting job %s with command: %s' % (JOB, SPLIT_JOB) -if not test_result(SPLIT_JOB, 'split-job-' + JOB): - sys.exit(1) - -# Clean result root directory. -if os.path.exists('/result/'): - shutil.rmtree('/result/', ignore_errors=True) - -# Run tests. -SUB_TESTS = glob.glob(WD + '/' + JOB + '/*.yaml') -for sub_test in SUB_TESTS: - count = 1 - done = True - sub_test_case_id = os.path.basename(sub_test)[:-46] - result_root = '/'.join(['/result', JOB, - sub_test_case_id[int(len(JOB) + 1):], - HOSTNAME, ROOTFS, CONFIG, COMPILER, COMMIT]) - while count <= LOOPS: - # Set suffix for mutiple runs. - if LOOPS > 1: - suffix = '-run' + str(count) - else: - suffix = '' - - lkp_run = [LKP_PATH + '/bin/run-local', - '--set', 'compiler: ' + COMPILER, sub_test] - print 'Running test %s%s with command: %s' % (sub_test_case_id, - suffix, lkp_run) - if not test_result(lkp_run, 'run-' + sub_test_case_id + suffix): - done = False - break - - # For each run, decode JOB.json to pick up the scores produced by the - # benchmark itself. - result_file = result_root + '/' + str(count - 1) + '/' + JOB + '.json' - if not os.path.isfile(result_file): - print '%s not found' % (result_file) - else: - json_data = open(result_file) - dict = json.load(json_data) - for item in dict: - call(['lava-test-case', sub_test_case_id + '-' + item + suffix, - '--result', 'pass', '--measurement', str(dict[item][0])]) - json_data.close() - - count = count + 1 - - # For mutiple runs, if all runs are completed and results found, decode - # avg.json. - if LOOPS > 1 and done: - avg_file = result_root + '/' + 'avg.json' - if not os.path.isfile(result_file): - print '%s not found' % (result_file) - elif not os.path.isfile(avg_file): - print '%s not found' % (avg_file) - else: - json_data = open(result_file) - avg_json_data = open(avg_file) - dict = json.load(json_data) - avg_dict = json.load(avg_json_data) - for item in dict: - if item in avg_dict: - call(['lava-test-case', - sub_test_case_id + '-' + item + '-avg', '--result', - 'pass', '--measurement', str(avg_dict[item])]) - json_data.close() - avg_json_data.close() - - # Compress and attach raw data. - call(['tar', 'caf', 'lkp-result-' + JOB + '.tar.xz', '/result/' + JOB]) - call(['lava-test-run-attach', 'lkp-result-' + JOB + '.tar.xz']) - -if not done: - sys.exit(1) -else: - sys.exit(0) diff --git a/common/scripts/lmbench.sh b/common/scripts/lmbench.sh deleted file mode 100755 index e985f1d6..00000000 --- a/common/scripts/lmbench.sh +++ /dev/null @@ -1,12 +0,0 @@ -#!/bin/sh - -echo "BEGIN LMBENCH" -for i in $(seq 1 1000) -do - echo "lat_ctx iteration number $i " - /usr/bin/lat_ctx -s 64 2 - /usr/bin/lat_ctx -s 64 8 - /usr/bin/lat_ctx -s 64 16 - /usr/bin/lat_ctx -s 64 20 -done -echo "END LMBENCH" diff --git a/common/scripts/lookup-eth b/common/scripts/lookup-eth deleted file mode 100755 index 78387e24..00000000 --- a/common/scripts/lookup-eth +++ /dev/null @@ -1,31 +0,0 @@ -#!/bin/sh -# -# 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. - -connection=${1} - -for row in $(grep ${connection} common/lng-mapping-table-eth); do - ifname="" - mac=$(echo ${row} | awk -F'=' '{print $2}') - ifname=$(ip link show | grep -B1 "${mac}" | awk -F':' '{print $2}'|head -n1) - if [ -n ${ifname} ]; then - ifconfig ${ifname} up - udhcpc -i ${ifname} - echo ${ifname} - break - fi -done diff --git a/common/scripts/lshw.sh b/common/scripts/lshw.sh deleted file mode 100755 index 7910b4ec..00000000 --- a/common/scripts/lshw.sh +++ /dev/null @@ -1,57 +0,0 @@ -#!/bin/sh -# -# 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. - -lshw > lshw.txt - -if grep -E 'core' lshw.txt -then - lava-test-case user-space-lshw-core-present --result pass -else - lava-test-case user-space-lshw-core-present --result fail -fi - -if grep 'firmware' lshw.txt -then - lava-test-case user-space-lshw-firmware-has-info --result pass -else - lava-test-case user-space-lshw-firmware-has-info --result fail -fi - -if grep 'cpu' lshw.txt -then - lava-test-case user-space-lshw-cpu-has-info --result pass -else - lava-test-case user-space-lshw-cpu-has-info --result fail -fi - -if grep 'network' lshw.txt -then - lava-test-case user-space-lshw-network-has-info --result pass -else - lava-test-case user-space-lshw-network-has-info --result fail -fi - -if grep 'storage' lshw.txt -then - lava-test-case user-space-lshw-storage-has-info --result pass -else - lava-test-case user-space-lshw-storage-has-info --result fail -fi - -cat lshw.txt -rm lshw.txt diff --git a/common/scripts/ltp-ddt.sh b/common/scripts/ltp-ddt.sh deleted file mode 100755 index 8f246755..00000000 --- a/common/scripts/ltp-ddt.sh +++ /dev/null @@ -1,85 +0,0 @@ -#! /bin/bash -# -# LTP-DDT Test wrapper -# -# Copyright (C) 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. -# -# - -usage() -{ - cat <<-EOF >&2 - - usage: ./${0##*/} [-p LTP_PATH] [-f CMD_FILES(,...)] [-s PATTERNS(,...)] - -f CMDFILES Execute user defined list of testcases (separate with ',') - -h Help. Prints all available options. - -p LTP_PATH Default path for ltp-ddt. Default path is /opt/ltp - -P PLATFORM Platform to run tests on. Used to filter device driver tests (ddt) - -s PATTERNS Only run test cases which match PATTERNS. Patterns seperated by ',' - - example: ./${0##*/} -p /home/test/ltp -f ddt/memtest -s IN_ALL_BANK,OUT_ALL_BANK - -EOF -exit 0 -} - -main() -{ - # Absolute path to this script. /home/user/bin/foo.sh - SCRIPT=$(readlink -f $0) - # Absolute path this script is in. /home/user/bin - SCRIPTPATH=`dirname $SCRIPT` - echo "Script path is: $SCRIPTPATH" - - CMD_FILES="" - PATTERNS="" - PATTERNS_OPTION="" - PLATFORM="" - #default path for ltp-ddt - LTP_PATH="/opt/ltp" - LOG_FILE="default" - - while getopts p:f:s:P:h arg - do - case $arg in - p) LTP_PATH="$OPTARG";; - P) PLATFORM="-P $OPTARG";; - f) - CMD_FILES="$OPTARG" - LOG_FILE=`echo $OPTARG| sed 's,\/,_,'`;; - s) PATTERNS="-s $OPTARG";; - h) usage;; - esac - echo $arg - done - if [ -z "$CMD_FILES" ]; then - echo "WARNING: Will run all ltp-ddt testcases or all those that match PATTERNS" - fi - - if [ -n "$PATTERNS" ]; then - PATTERNS_OPTION="-s $PATTERNS" - fi - - ## Second parameter is used as a path to LTP installation - cd $LTP_PATH - ./runltp -p -q -f ${CMD_FILES} $PLATFORM $PATTERNS -l $SCRIPTPATH/LTP_${LOG_FILE}.log \ - -C $SCRIPTPATH/LTP_${LOG_FILE}.failed | tee $SCRIPTPATH/LTP_${LOG_FILE}.out - tar -czvf $SCRIPTPATH/LTP_${LOG_FILE}.tar.gz $SCRIPTPATH/LTP* - lava-test-case-attach LTP_$1 $SCRIPTPATH/LTP_${LOG_FILE}.tar.gz - exit 0 -} -main "$@" diff --git a/common/scripts/ltp-realtime2LAVA.py b/common/scripts/ltp-realtime2LAVA.py deleted file mode 100755 index 77e479ff..00000000 --- a/common/scripts/ltp-realtime2LAVA.py +++ /dev/null @@ -1,229 +0,0 @@ -#!/usr/bin/python -import re -import sys -import fileinput - - -# extract a standard results block from the stream -def standard_results(): - minimum = re.compile("^Min:\s+(?P<min>[\d\.]+)\s+(?P<units>\w+)") - maximum = re.compile("^Max:\s+(?P<max>[\d\.]+)\s+(?P<units>\w+)") - average = re.compile("^Avg:\s+(?P<average>[\d\.]+)\s+(?P<units>\w+)") - standarddev = re.compile("^StdDev:\s+(?P<stddev>[\d\.]+)\s+(?P<units>\w+)") - finished = 0 - for line in sys.stdin: - for parser in [maximum, minimum, average, standarddev]: - result = parser.search(line) - if result is not None: - if parser is minimum: - test_min = result.group('min') - units = result.group('units') - print "test_case_id:%s%s min measurement:%s units:%s result:skip" % (test_name, test_args, test_min, units) - finished += 1 - break - if parser is maximum: - test_max = result.group('max') - units = result.group('units') - finished += 1 - print "test_case_id:%s%s max measurement:%s units:%s result:skip" % (test_name, test_args, test_max, units) - break - if parser is average: - test_avg = result.group('average') - units = result.group('units') - print "test_case_id:%s%s avg measurement:%s units:%s result:skip" % (test_name, test_args, test_avg, units) - finished += 1 - break - if parser is standarddev: - test_stddev = result.group('stddev') - units = result.group('units') - print "test_case_id:%s%s stddev measurement:%s units:%s result:skip" % (test_name, test_args, test_stddev, units) - finished += 1 - break - else: - continue - if finished == 4: - return - - print "ERROR: Parser failed and ran to EOF" - sys.exit(-1) - - -def result_results(): - results = re.compile("Result:\s+(?P<result>\w+)") - finished = 0 - for line in sys.stdin: - for parser in [results]: - result = parser.search(line) - if result is not None: - if parser is results: - test_result = result.group('result') - print "test_case_id:%s%s_test measurement:0 units:none result:%s" % (test_name, test_args, test_result) - finished += 1 - break - else: - continue - if finished == 1: - return - - print "ERROR: Parser failed and ran to EOF" - sys.exit(-1) - - -def sched_jitter_results(): - maximum = re.compile("^max jitter:\s+(?P<max>[\d\.]+)\s+(?P<units>\w+)") - finished = 0 - for line in sys.stdin: - for parser in [maximum]: - result = parser.search(line) - if result is not None: - if parser is maximum: - test_max = result.group('max') - units = result.group('units') - print "test_case_id:%s%s max jitter measurement:%s units:%s result:skip" % (test_name, test_args, test_max, units) - finished += 1 - break - else: - continue - if finished == 1: - # print "min:%s max:%s avg:%s stddev:%s" % (test_min, test_max, test_avg, test_stddev) - return - - print "ERROR: Parser failed and ran to EOF" - sys.exit(-1) - - -def pi_perf_results(): - minimum = re.compile("^Min delay =\s+(?P<min>[\d\.]+)\s+(?P<units>\w+)") - maximum = re.compile("^Max delay =\s+(?P<max>[\d\.]+)\s+(?P<units>\w+)") - average = re.compile("^Average delay =\s+(?P<average>[\d\.]+)\s+(?P<units>\w+)") - standarddev = re.compile("^Standard Deviation =\s+(?P<stddev>[\d\.]+)\s+(?P<units>\w+)") - finished = 0 - for line in sys.stdin: - for parser in [maximum, minimum, average, standarddev]: - result = parser.search(line) - if result is not None: - if parser is minimum: - test_min = result.group('min') - units = result.group('units') - print "test_case_id:%s%s min measurement:%s units:%s result:skip" % (test_name, test_args, test_min, units) - finished += 1 - break - if parser is maximum: - test_max = result.group('max') - units = result.group('units') - print "test_case_id:%s%s max measurement:%s units:%s result:skip" % (test_name, test_args, test_max, units) - finished += 1 - break - if parser is average: - test_avg = result.group('average') - units = result.group('units') - print "test_case_id:%s%s avg measurement:%s units:%s result:skip" % (test_name, test_args, test_avg, units) - finished += 1 - break - if parser is standarddev: - test_stddev = result.group('stddev') - units = result.group('units') - print "test_case_id:%s%s stddev measurement:%s units:%s result:skip" % (test_name, test_args, test_stddev, units) - finished += 1 - break - else: - continue - if finished == 4: - return - - print "ERROR: Parser failed and ran to EOF" - sys.exit(-1) - - -def do_nothing(): - return - - -# names of the test parsed out fo the input stream, converted to functioncalls -def async_handler(): - standard_results() - result_results() - - -def tc_2(): - result_results() - - -def gtod_latency(): - standard_results() - - -def periodic_cpu_load_single(): - standard_results() - - -def sched_latency(): - standard_results() - - -def sched_jitter(): - sched_jitter_results() - - -def sched_football(): - result_results() - - -def rt_migrate(): - result_results() - - -def pthread_kill_latency(): - standard_results() - result_results() - - -def prio_wake(): - result_results() - - -def pi_perf(): - pi_perf_results() - - -def prio_preempt(): - result_results() - - -def matrix_mult(): - result_results() - - -def periodic_cpu_load(): - result_results() - - -def async_handler_jk(): - result_results() - -# Parse the input stream and tuen test names into function calls to parse their -# details - -test_start = re.compile("--- Running testcase (?P<name>[a-zA-Z0-9_-]+)\s+(?P<args>[a-zA-Z0-9_.\- ]*?)\s*---") -test_finish = re.compile("The .* test appears to have completed.") - -for line in sys.stdin: - for parser in [test_start, test_finish]: - result = parser.search(line) - if result is not None: - if parser is test_start: - test_name = result.group('name') - func_name = result.group('name') - func_name = func_name.replace("-", "_") - test_args = result.group('args') - test_args = test_args.replace(" ", "-") - print - print " test_start= " + test_name + test_args - globals()[func_name]() - break - - if parser is test_finish: - print " test_finished= " + test_name + test_args - break - else: - continue diff --git a/common/scripts/ltp/skipfile-lsk-juno b/common/scripts/ltp/skipfile-lsk-juno deleted file mode 100644 index fcba5694..00000000 --- a/common/scripts/ltp/skipfile-lsk-juno +++ /dev/null @@ -1,54 +0,0 @@ -# Blacklist or skip tests list - -chdir01A symlink01 -T chdir01 -# chdir01 is failed due to the way LAVA mounted /tmp file system - -sysfs01 sysfs01 -sysfs02 sysfs02 -sysfs03 sysfs03 -sysfs04 sysfs04 -sysfs05 sysfs05 -sysfs06 sysfs06 -# sysfs01 sysfs02 sysfs03 sysfs04 sysfs05 and sysfs06 no more valid. -# sysfs system call is obsolete; don't use it. -# This test can only run on kernels that support the sysfs system call - -syslog01 syslog01 -syslog02 syslog02 -syslog03 syslog03 -syslog04 syslog04 -syslog05 syslog05 -syslog06 syslog06 -syslog07 syslog07 -syslog08 syslog08 -syslog09 syslog09 -syslog10 syslog10 -# The syslog tests are not valuable for us - -ustat01 ustat01 -ustat02 ustat02 -# ustat01 and ustat02 failed only on Juno, because this syscall not implemented on arm-64 architecture. -# ustat(2) failed and setthe errno to 38 : Function not implemented - -overcommit_memory02 overcommit_memory -R 0 -# The testcase seems to be broken unless you have big enough swap so that -# CommitLimit (which depends on size of the swap) is greater than -# Commit_AS. In your case the swap size was not big enough to be greater -# than the amount of currently overcommited memory (Commit_AS). - -# The test should be changed to skip the particular testcase and give a -# beteter message if there is no room to alloace any memory in this case. -# https://www.mail-archive.com/ltp-list@lists.sourceforge.net/msg19476.html -# https://www.mail-archive.com/ltp-list@lists.sourceforge.net/msg19551.html - -cron02 cron02 -cron_deny01 cron_deny01 -cron_allow01 cron_allow01 -cron_dirs_checks01 cron_dirs_checks01 -# crontab: command not found -# External package cron not installed on rootfs. -# This test case comes under admin_tools, which is not critical for us - -acl_test01 acl_test01 -# acl test cases comes under admin_tools -# setfacl: /tmp/ltp-UH9jbROZVN/tacl/mount-ext3/test_file_link: Operation not supported diff --git a/common/scripts/ltpfixup.sh b/common/scripts/ltpfixup.sh deleted file mode 100755 index b1831be9..00000000 --- a/common/scripts/ltpfixup.sh +++ /dev/null @@ -1,50 +0,0 @@ -#!/bin/sh - -# Absolute path to this script. /home/user/bin/foo.sh -SCRIPT=$(readlink -f $0) -# Absolute path this script is in. /home/user/bin -SCRIPTPATH=`dirname $SCRIPT` -echo "Script path is: $SCRIPTPATH" -# List of test cases -TST_CMDFILES="" -# List of test cases to be skipped -SKIPFILE="" - -LTP_PATH=/opt/ltp - -while getopts T:S:P:s: arg - do case $arg in - T) - TST_CMDFILES="$OPTARG" - LOG_FILE=`echo $OPTARG| sed 's,\/,_,'`;; - S) OPT=`echo $OPTARG | grep "http"` - if [ -z $OPT ] ; then - SKIPFILE="-S $SCRIPTPATH/ltp/$OPTARG" - else - wget $OPTARG - SKIPFILE=`echo "${OPTARG##*/}"` - SKIPFILE="-S `pwd`/$SKIPFILE" - fi - ;; - P) LTP_PATH=$OPTARG;; - s) PATTERNS="-s $OPTARG";; - esac -done - -cd $LTP_PATH -RESULT=pass - -exec 4>&1 -error_statuses="`((./runltp -p -q -f $TST_CMDFILES -l $SCRIPTPATH/LTP_$LOG_FILE.log -C $SCRIPTPATH/LTP_$LOG_FILE.failed $SKIPFILE $PATTERNS || echo "0:$?" >&3) | - (tee $SCRIPTPATH/LTP_$LOG_FILE.out || echo "1:$?" >&3)) 3>&1 >&4`" -exec 4>&- - -! echo "$error_statuses" | grep '0:' >/dev/null -if [ $? -ne 0 ]; then - RESULT=fail -fi -lava-test-case LTP_$LOG_FILE --result $RESULT -cat $SCRIPTPATH/LTP_*.log -tar czfv $SCRIPTPATH/LTP_$LOG_FILE.tar.gz $SCRIPTPATH/LTP* -lava-test-case-attach LTP_$LOG_FILE $SCRIPTPATH/LTP_$LOG_FILE.tar.gz -exit 0 diff --git a/common/scripts/make-kernel-install.exp b/common/scripts/make-kernel-install.exp deleted file mode 100644 index 5ccae089..00000000 --- a/common/scripts/make-kernel-install.exp +++ /dev/null @@ -1,6 +0,0 @@ -#!/usr/bin/expect -# make install is to install linux kernel on target device - -spawn make ARCH=arm install -expect "Press Ctrl-C to abort build, or Enter to continue" -send "\n" diff --git a/common/scripts/min_max_avg_parse.py b/common/scripts/min_max_avg_parse.py deleted file mode 100755 index 543fe401..00000000 --- a/common/scripts/min_max_avg_parse.py +++ /dev/null @@ -1,30 +0,0 @@ -#!/usr/bin/python - -import re -import sys -from numpy import * - -values = [] - -r = re.compile(sys.argv[2] + "\s+(?P<measurement>[0-9.]+)") -f = open(sys.argv[1], "r") -for line in f.readlines(): - search = r.search(line) - if search: - values.append(float(search.group('measurement'))) - -try: - sys.argv[4] -except IndexError: - cmd_options = "" -else: - cmd_options = sys.argv[4] - -np_array = array(values) - -format = "%-16s%-16s%-16s%-16s" -print format % (sys.argv[1].split('.', 1)[0] + cmd_options + "_min:", str(min(np_array)), sys.argv[3], "pass") -print format % (sys.argv[1].split('.', 1)[0] + cmd_options + "_max:", str(max(np_array)), sys.argv[3], "pass") -print format % (sys.argv[1].split('.', 1)[0] + cmd_options + "_avg:", str(mean(np_array)), sys.argv[3], "pass") -print format % (sys.argv[1].split('.', 1)[0] + cmd_options + "_mdn:", str(median(np_array)), sys.argv[3], "pass") -print format % (sys.argv[1].split('.', 1)[0] + cmd_options + "_std:", str(std(np_array)), sys.argv[3], "pass") diff --git a/common/scripts/mmtests.sh b/common/scripts/mmtests.sh deleted file mode 100755 index eb5ac34c..00000000 --- a/common/scripts/mmtests.sh +++ /dev/null @@ -1,132 +0,0 @@ -#!/bin/sh -# -# mmtests test case for Linux Linaro Ubuntu. -# -# Copyright (C) 2012 - 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: Chase Qi <chase.qi@linaro.org> -# Milosz Wasilewski <milosz.wasilewski@linaro.org> -# Naresh Kamboju <naresh.kamboju@linaro.org> -# - -set -x -TESTS=$1 -KernelVersion=`uname -r` -DIR=`pwd` - -# Download tests directly, rather than use the customized mirror. -sed -i '/WEBROOT/s/^/#/' $DIR/shellpacks/common-config.sh - -# Calculate the mean, min and max of data stored in a file -min_max_mean(){ - eval `awk '{if(min=="") {min=max=$1}; if($1>max) {max=$1}; if($1< min) {min=$1}; total+=$1; count+=1} \ - END {print "mean="total/count, "min="min, "max="max}' $1` -} - -# Result parser -result_parser(){ - local TEST_ID=$1 - case $TEST_ID in - # dd bench - dd|dd-tmpfs|ddsync) - if [ -z "`grep copied $DIR/work/log/loopdd-$KernelVersion/noprofile/mmtests.log`" ]; then - lava-test-case $TEST_ID --result fail - else - dd_units=`grep copied $DIR/work/log/loopdd-$KernelVersion/noprofile/mmtests.log | tail -1 | awk '{print $9}'` - # Get the min, max and mean scores of the 30 iterations - grep copied $DIR/work/log/loopdd-$KernelVersion/noprofile/mmtests.log | awk '{print $8}' > $DIR/$TEST_ID-data.txt - min_max_mean $DIR/$TEST_ID-data.txt - lava-test-case $TEST_ID-min --result pass --measurement $min --units $dd_units - lava-test-case $TEST_ID-max --result pass --measurement $max --units $dd_units - lava-test-case $TEST_ID-mean --result pass --measurement $mean --units $dd_units - fi - if [ "$TEST_ID" = "dd-tmpfs" ]; then - umount $DIR/work/testdisk - fi - ;; - # Measure the latency in the Linux network stack between kernel and user space. - ku-latency) - if [ -z "`grep "Average.*us" $DIR/work/log/ku_latency-$KernelVersion/noprofile/ku-latency.log`" ]; then - lava-test-case $TEST_ID --result fail - else - # Use the final total average value as measurement - ku_total_average=`grep "Total Average.*us" $DIR/work/log/ku_latency-$KernelVersion/noprofile/ku-latency.log \ - | tail -1 | awk '{print $6}'` - # Use the final rolling average value as measurement - ku_rolling_average=`grep "Rolling Average.*us" $DIR/work/log/ku_latency-$KernelVersion/noprofile/ku-latency.log \ - | tail -1 | awk '{print $6}'` - lava-test-case $TEST_ID-total-average --result pass --measurement $ku_total_average --units us - lava-test-case $TEST_ID-rolling-average --result pass --measurement $ku_rolling_average --units us - fi - ;; - # Measure the performance of various system and library calls. - libmicro) - if [ -z "`grep Running $DIR/work/log/libmicro-$KernelVersion/noprofile/mmtests.log`" ]; then - lava-test-case $TEST_ID --result fail - else - for i in `ls $DIR/work/log/libmicro-$KernelVersion/noprofile/memset*`; do - # Get test name and usecs/call value in the 3th line of each test log. - libmicro_test_name=`sed -n 3p $i | awk '{print $1}'` - libmicro_test_result=`sed -n 3p $i | awk '{print $4}'` - lava-test-case $TEST_ID-$libmicro_test_name --result pass --measurement $libmicro_test_result --units usecs/call - done - fi - ;; - # vm scalability test, measure spread of dd performance - vmscale) - if [ -z "`grep copied $DIR/work/log/vmscale-$KernelVersion/noprofile/lru-file-ddspread.log`" ]; then - lava-test-case $TEST_ID --result fail - else - vmscale_units=`grep copied $DIR/work/log/vmscale-$KernelVersion/noprofile/lru-file-ddspread.log | tail -1 | awk '{print $9}'` - # Get the min, max and mean scores of all iterations, the number of iterations equal to the number of processors. - grep copied $DIR/work/log/vmscale-$KernelVersion/noprofile/lru-file-ddspread.log | awk '{print $8}' > $DIR/$TEST_ID-data.txt - min_max_mean $DIR/$TEST_ID-data.txt - lava-test-case $TEST_ID-ddspread-min --result pass --measurement $min --units $vmscale_units - lava-test-case $TEST_ID-ddspread-max --result pass --measurement $max --units $vmscale_units - lava-test-case $TEST_ID-ddspread-mean --result pass --measurement $mean --units $vmscale_units - fi - ;; - # Time how long it takes to allocate a large buffer - timedalloc) - if [ -z "`grep elapsed $DIR/work/log/timedalloc-$KernelVersion/noprofile/time`" ]; then - lava-test-case $TEST_ID --result fail - else - # Total number of CPU-seconds used by the system on behalf of the process (in kernel mode), in seconds. - timedalloc_kernel="`grep elapsed $DIR/work/log/timedalloc-$KernelVersion/noprofile/time | awk '{print substr($2, 1, 4)}'`" - # Total number of CPU-seconds that the process used directly (in user mode), in seconds. - timedalloc_user="`grep elapsed $DIR/work/log/timedalloc-$KernelVersion/noprofile/time | awk '{print substr($1, 1, 4)}'`" - lava-test-case $TEST_ID-kernel-mode --result pass --measurement $timedalloc_kernel --units seconds - lava-test-case $TEST_ID-user-mode --result pass --measurement $timedalloc_user --units seconds - fi - ;; - esac -} - -# Run tests -for SUB_TEST in $TESTS; do - # Clean up and check disk space. - rm -rf $DIR/work/testdisk/tmp - df -h - - # Run test by configuration. - $DIR/run-mmtests.sh --no-monitor --config $DIR/configs/config-global-dhp__$SUB_TEST $KernelVersion - if [ $? -ne 0 ]; then - lava-test-case $SUB_TEST --result fail - else - result_parser $SUB_TEST - fi -done diff --git a/common/scripts/netmap-pkt-gen/find_nics.sh b/common/scripts/netmap-pkt-gen/find_nics.sh deleted file mode 100755 index b85b4e7b..00000000 --- a/common/scripts/netmap-pkt-gen/find_nics.sh +++ /dev/null @@ -1,16 +0,0 @@ -#!/bin/bash - -# This script looks for all network interfaces of a certain type given by -# NIC_PATTERN. It uses lspci to get the pci ids of the matching NICs and then -# tries to find the network interfaces (ethx) associated with them. For this -# the appropriate drivers must be available in the system. - -test $# -lt 1 && echo "Please pass NIC pattern" && exit 1 -NIC=$1 - -truncate -s 0 pci_ids -truncate -s 0 sys_net -truncate -s 0 ifs -lspci -nn | grep -i $NIC | awk '{print $1}' > pci_ids -for i in $(ls /sys/class/net/); do ln=$(readlink -f /sys/class/net/$i/device); echo $i $ln >> sys_net; done -for i in $(cat pci_ids); do cat sys_net | grep $i | awk '{print $1}' >> ifs; done diff --git a/common/scripts/netmap-pkt-gen/parse-tx-rx.sh b/common/scripts/netmap-pkt-gen/parse-tx-rx.sh deleted file mode 100755 index a133c81f..00000000 --- a/common/scripts/netmap-pkt-gen/parse-tx-rx.sh +++ /dev/null @@ -1,9 +0,0 @@ -#!/bin/bash - -# This script parses the output from netmap and transforms it into something -# usable by common/script/min_max_avg_parse.py -# Sample command: parse-tx-rx.sh tx.in tx.out rx.in rx.out - -test $# -lt 4 && echo "Please pass input and output files" && exit 1 -cat $1 | grep main_thread | grep pps | awk '{print "tx_throughput: " $4}' > $2 -cat $3 | grep main_thread | grep pps | awk '{print "rx_throughput: " $4}' > $4 diff --git a/common/scripts/netmap-pkt-gen/start-pkt-gen.sh b/common/scripts/netmap-pkt-gen/start-pkt-gen.sh deleted file mode 100755 index 5f03a729..00000000 --- a/common/scripts/netmap-pkt-gen/start-pkt-gen.sh +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/bash - -# This script start netmap pkt-gen on two interfaces, one used to transmit and -# the other to receive; the output of pkt-gen is saved in files to be parsed and -# passed to common/scripts/min_max_avg_parse.py -# Sample command: start-pkt-gen.sh eth0 eth1 tx.out rx.out -# where eth0 is used to send packets and eth1 to receive - -test $# -lt 4 && echo "Please pass interfaces and rx and tx output files" && exit 1 - -netmap/examples/pkt-gen -i $1 -f tx -l 64 &> $2 & -sleep 4 -netmap/examples/pkt-gen -i $3 -f rx &> $4 & diff --git a/common/scripts/netperf-client.sh b/common/scripts/netperf-client.sh deleted file mode 100755 index 4d9ef7f8..00000000 --- a/common/scripts/netperf-client.sh +++ /dev/null @@ -1,34 +0,0 @@ -#!/bin/sh - -set -x - -local_ip=$(ifconfig $1|grep "inet addr"|grep -v "127.0.0.1"|cut -d: -f2|cut -d' ' -f1) - -for line in `lava-group | grep server | awk '{print $1}'` ; do - echo $line - # get the ipv4 for this device - STR=`lava-network query $line ipv4` - echo "STR: "$STR - # strip off the prefix for ipv4 - DUT=`echo $STR | sed -e 's/.*addr://'` - echo "DUT: "$DUT - if [ "${local_ip}" != "${DUT}" ]; then - remote_ip=${DUT} - echo ${remote_ip} - break - fi -done - -if [ -z ${remote_ip} ] -then - echo "Missing remote ip!" - exit 1 -fi - -ifconfig -a -ping -c 1 ${remote_ip} || exit 1 -ping -c 30 ${remote_ip} | tee ~/output.txt | ./common/scripts/netperf2LAVA.py -for m in 64 128 256 512 1024 2048 4096 8192 16384; do netperf -H ${remote_ip} -l 20 -c -C -- -m $m -D; done | tee -a ~/output.txt | ./common/scripts/netperf2LAVA.py -for m in 64 128 256 512 1024 2048 4096 8192 16384; do netperf -H ${remote_ip} -l 20 -t UDP_STREAM -c -C -- -m $m -D; done | tee -a ~/output.txt | ./common/scripts/netperf2LAVA.py -for m in 1 32 64 128 512 1024 4096 8192 16384; do netperf -t TCP_RR -H ${remote_ip} -l 20 -c -C -- -r $m,$m -D; done | tee -a ~/output.txt | ./common/scripts/netperf2LAVA.py -for m in 1 32 64 128 512 1024 4096 8192 16384; do netperf -t UDP_RR -H ${remote_ip} -l 20 -c -C -- -r $m,$m -D; done | tee -a ~/output.txt | ./common/scripts/netperf2LAVA.py diff --git a/common/scripts/netperf-server.sh b/common/scripts/netperf-server.sh deleted file mode 100755 index 03ba93b2..00000000 --- a/common/scripts/netperf-server.sh +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/sh - -set -x - -PRINT_PASS='test_case_id:netserver units:none measurement:0 result:pass' -PRINT_FAIL='test_case_id:netserver units:none measurement:0 result:fail' - -pgrep netserver -if [ $? -eq 0 ]; then - echo ${PRINT_PASS} -else - netserver && echo ${PRINT_PASS} || echo ${PRINT_FAIL} -fi diff --git a/common/scripts/netperf2LAVA.py b/common/scripts/netperf2LAVA.py deleted file mode 100755 index b2fb4ad5..00000000 --- a/common/scripts/netperf2LAVA.py +++ /dev/null @@ -1,72 +0,0 @@ -#!/usr/bin/python -import re -import sys - -# Parse netperf/ping/tcpreplay results looking for the data in the form of -# line = "Actual: 113000 packets (7810000 bytes) sent in 4.75 seconds. Rated: 1644210.5 bps, 12.54 Mbps, 23789.47 pps" -# line = "rtt min/avg/max/mdev = 4.037/4.037/4.037/0.000 ms" -# line = "87380 16384 2048 10.00 4289.48 51.12 51.12 3.905 3.905" ./netperf -l 10 -c -C -- -m 2048 -D -# line = "180224 8192 10.00 1654855 0 10845.1 52.60 1.589" ./netperf -t UDP_STREAM -l 10 -c -C -- -m 8192 -D -# line = "180224 10.00 1649348 10809.0 52.60 1.589" rcv side of UDP_STREAM -# line = "16384 87380 1 1 10.00 47469.68 29.84 29.84 25.146 25.146" ./netperf -t TCP_RR -l 10 -c -C -- -r 1,1 - -found_result = "false" -parser_replay = re.compile("Rated:\s+(?P<throughput1>\d+\.\d+)\s+\S+\s+(?P<throughput2>\d+\.\d+)\s+\S+\s+(?P<throughput3>\d+\.\d+)") -parser_rtt = re.compile("^rtt\s+\S+\s+\=\s+(?P<min>\d+\.\d+)\/(?P<avg>\d+\.\d+)\/(?P<max>\d+\.\d+)\/(?P<mdev>\d+\.\d+)") -parser_tcp = re.compile("^\s*(?P<Recv>\d+)\s+(?P<Send>\d+)\s+(?P<Msg>\d+)\s+(?P<time>\d+\.\d+)\s+(?P<throughput>\d+\.\d+)\s+(?P<cpu_s>\d+\.\d+)\s+(?P<cpu_r>\d+\.\d+)\s+(?P<srv_s>\d+\.\d+)\s+(?P<dem_r>\d+\.\d+)\s*$") -parser_udp_l = re.compile("^\s*(?P<Sock>\d+)\s+(?P<Msg>\d+)\s+(?P<time>\d+\.\d+)\s+(?P<Okey>\d+)\s+(?P<Errs>\d+)\s+(?P<throughput>\d+\.\d+)\s+(?P<cpu_s>\d+\.\d+)\s+(?P<srv_s>\d+\.\d+)\s*$") -parser_udp_r = re.compile("^\s*(?P<Sock>\d+)\s+(?P<time>\d+\.\d+)\s+(?P<Okey>\d+)\s+(?P<throughput>\d+\.\d+)\s+(?P<cpu_r>\d+\.\d+)\s+(?P<srv_r>\d+\.\d+)\s*$") -parser_rr = re.compile("^\s*(?P<Send>\d+)\s+(?P<Recv>\d+)\s+(?P<Req>\d+)\s+(?P<Res>\d+)\s+(?P<time>\d+\.\d+)\s+(?P<trans>\d+\.\d+)\s+(?P<cpu_s>\d+\.\d+)\s+(?P<cpu_r>\d+\.\d+)\s+(?P<srv_s>\d+\.\d+)\s+(?P<dem_r>\d+\.\d+)\s*$") -parser_rr_tcp = re.compile("TCP REQUEST/RESPONSE") -parser_rr_udp = re.compile("UDP REQUEST/RESPONSE") - -for line in sys.stdin: - for parser in [parser_replay, parser_rtt, parser_tcp, parser_udp_l, parser_udp_r, parser_rr, parser_rr_tcp, parser_rr_udp]: - result = parser.search(line) - if result is not None: - if parser is parser_rr_tcp: - rr_type = "TCP_RR" - break - if parser is parser_rr_udp: - rr_type = "UDP_RR" - break - if parser is parser_replay: - print "test_case_id:tcpreplay rated throughput1" + " units:bps " + "measurement:" + result.group('throughput1') + " result:skip" - print "test_case_id:tcpreplay rated throughput2" + " units:Mbps " + "measurement:" + result.group('throughput2') + " result:skip" - print "test_case_id:tcpreplay rated throughput3" + " units:pps " + "measurement:" + result.group('throughput3') + " result:skip" - found_result = "true" - break - if parser is parser_rtt: - print "test_case_id:PING_RTT min" + " units:ms " + "measurement:" + result.group('min') + " result:skip" - print "test_case_id:PING_RTT avg" + " units:ms " + "measurement:" + result.group('avg') + " result:skip" - print "test_case_id:PING_RTT max" + " units:ms " + "measurement:" + result.group('max') + " result:skip" - print "test_case_id:PING_RTT mdev" + " units:ms " + "measurement:" + result.group('mdev') + " result:skip" - found_result = "true" - break - if parser is parser_tcp: - print "test_case_id:TCP_STREAM throughput" + "(Msg: " + result.group('Msg') + ")" + " units:10^bits/sec " + "measurement:" + result.group('throughput') + " result:skip" - print "test_case_id:TCP_STREAM snd cpu utilization" + "(Msg: " + result.group('Msg') + ")" + " units:% " + "measurement:" + result.group('cpu_s') + " result:skip" - print "test_case_id:TCP_STREAM rcv cpu utilization" + "(Msg: " + result.group('Msg') + ")" + " units:% " + "measurement:" + result.group('cpu_r') + " result:skip" - found_result = "true" - break - if parser is parser_udp_l: - print "test_case_id:UDP_STREAM snd throughput" + "(Msg: " + result.group('Msg') + ")" + " units:10^bits/sec " + "measurement:" + result.group('throughput') + " result:skip" - print "test_case_id:UDP_STREAM snd cpu utilization" + "(Msg: " + result.group('Msg') + ")" + " units:% " + "measurement:" + result.group('cpu_s') + " result:skip" - found_result = "true" - break - if parser is parser_udp_r: - print "test_case_id:UDP_STREAM rcv throughput" + " units:10^bits/sec " + "measurement:" + result.group('throughput') + " result:skip" - print "test_case_id:UDP_STREAM rcv cpu utilization" + " units:% " + "measurement:" + result.group('cpu_r') + " result:skip" - found_result = "true" - break - if parser is parser_rr: - print "test_case_id:" + rr_type + " transaction rate" + "(Req: " + result.group('Req') + " Res: " + result.group('Res') + ")" + " units:trans/sec " + "measurement:" + result.group('trans') + " result:skip" - print "test_case_id:" + rr_type + " snd cpu utilization" + "(Req: " + result.group('Req') + " Res: " + result.group('Res') + ")" + " units:% " + "measurement:" + result.group('cpu_s') + " result:skip" - print "test_case_id:" + rr_type + " rcv cpu utilization" + "(Req: " + result.group('Req') + " Res: " + result.group('Res') + ")" + " units:% " + "measurement:" + result.group('cpu_r') + " result:skip" - found_result = "true" - break - else: - continue - -if found_result == "false": - print "units:none " + "measurement:" + "0" + " result:fail" diff --git a/common/scripts/odp-on-isolated-cpu.sh b/common/scripts/odp-on-isolated-cpu.sh deleted file mode 100755 index 287e116a..00000000 --- a/common/scripts/odp-on-isolated-cpu.sh +++ /dev/null @@ -1,111 +0,0 @@ -#!/bin/bash -# -# Author: Santosh Shukla <santosh.shukla@linaro.org> -# -# This script uses is-cpu-isolated.sh script (superset script) to isolate -# a cpu or set of cpus (comma separated cpus list passed as argument $1 to -# this script, Migrate possible kernel background tasks to boot cpu) -# -# We record odp app isolation time using is-cpu-isolated.sh script's "duration" argument. -# -# SCRIPT ARGUMENTS -# $1: Comma separated list of CPUs to isolate -# $2: Full odp command format like below -# -# "odp_l2fwd -i 0,2 -m 0 -c 2" -# "odp_isolation -l 1,2" -# -# cut-n-paste below example to test the script : -# ./odp-on-isolated-cpu.sh 1,2 "odp_l2fwd -i 0,2 -m 0 -c 2" & -# ./odp-on-isolated-cpu.sh -# -# NOTE: it is assumed that odp bin copied to filesystem location /usr/local/bin -# - -# Script arguments -ISOL_CPUS="1,2" # CPU to isolate, default 1,2. Comma-separated list of CPUs. -ODP_CMD="odp_isolation -l 1,2" # Default odp cmd to run - -# get number of isol cpus -get_cpu_count() { - - cpu_count=0 - for i in `echo $ISOL_CPUS | sed 's/,/ /g'`; do - let cpu_count++ - done - - echo $cpu_count -} - -# Create odp setup for isolation -odp_isol_setup() { - # Get actual odp binary name out from $ODP_CMD - ODP_APP=`echo $ODP_CMD | cut -d " " -f1` - - # Isolate cpu - $(pwd)/is-cpu-isolated.sh -q -c $ISOL_CPUS -t $ODP_APP -f "isolate" - - # Run odp application - $ODP_CMD & - - # Get odp main() process pid - proc_pid=$! - - # Few big application initialization takes more time to launch DP threads, - # In that duration NO thread pid entry found in /proc/$proc_pid/tasks. - # So better wait till application launches all the possible threads - # and its pid reflected in /proc/$proc_pid/tasks. - # for example : dpdk-l2fwd takes more time to launch thread. - while : - do - # loop until all thread pid found in /proc/$proc_pid/task - if [ $(ls /proc/$proc_pid/task | wc -l) -gt $(get_cpu_count) ]; - then - break - fi - done - - # Echo odp main() process pid - echo "ODP process id: $proc_pid" - - # List odp threads pid in variable thd_pid_list - thd_pid_list=$(ls /proc/$proc_pid/task | grep -v $proc_pid) - - # Print thread pid list - echo "ODP threads: $thd_pid_list" - - # Fill odp threads pid into arr[] - k=0 - for i in $thd_pid_list; do - arr[k]=$i; - let k++ - done - - k=0 - for i in `echo $ISOL_CPUS | sed 's/,/ /g'`; do - # Move thread to isolated CPU - echo ${arr[$k]} > /dev/cpuset/dplane/cpu$i/tasks - let k++ - done - - echo "DP Application isolation duration" - $(pwd)/is-cpu-isolated.sh -q -c $ISOL_CPUS -t $ODP_APP -f "duration" - - echo "DP Application clear isol cpuset" - $(pwd)/is-cpu-isolated.sh -q -c $ISOL_CPUS -t $ODP_APP -f "clear" -} - -## Check validity of arguments -USAGE="Usage: $0 <CPUs to isolate (default 1,2), comma separated list> <odp_* binary full command in double quote (default odp_isolation)>" - -if [ "$1" = "-h" -o "$1" = "--help" ]; then - echo "$USAGE" - exit 0 -fi - -# Parse argument -[ "$1" ] && ISOL_CPUS=$1 -[ "$2" ] && ODP_CMD=$2 - -# Create odp setup for isolation -odp_isol_setup diff --git a/common/scripts/odp-ovs/ovs-odp-dpdk-nic-bind-82599.sh b/common/scripts/odp-ovs/ovs-odp-dpdk-nic-bind-82599.sh deleted file mode 100755 index 33ff7979..00000000 --- a/common/scripts/odp-ovs/ovs-odp-dpdk-nic-bind-82599.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/sh -test $# -lt 1 && echo "Please pass path to DPDK" && exit 1 -cd $1 -for n in $(./tools/dpdk_nic_bind.py --status | awk ' $2 ~ "82599" {print $1}') -do - ./tools/dpdk_nic_bind.py --bind=igb_uio $n -done diff --git a/common/scripts/overlayfs.py b/common/scripts/overlayfs.py deleted file mode 100755 index 4ce5c9ab..00000000 --- a/common/scripts/overlayfs.py +++ /dev/null @@ -1,108 +0,0 @@ -#!/usr/bin/env python -# -# Run overlay filesystem test from unionmount testsuite on Linaro ubuntu and -# OpenEmbedded. -# -# Copyright (C) 2012 - 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: Chase Qi <chase.qi@linaro.org> -# -import os -import sys -import subprocess - -TestSuitePath = sys.argv[1] -TermSlashList = ['0', '1'] -TESTS = ['open-plain', - 'open-trunc', - 'open-creat', - 'open-creat-trunc', - 'open-creat-excl', - 'open-creat-excl-trunc', - 'noent-plain', - 'noent-trunc', - 'noent-creat', - 'noent-creat-trunc', - 'noent-creat-excl', - 'noent-creat-excl-trunc', - 'sym1-plain', - 'sym1-trunc', - 'sym1-creat', - 'sym1-creat-excl', - 'sym2-plain', - 'sym2-trunc', - 'sym2-creat', - 'sym2-creat-excl', - 'symx-plain', - 'symx-trunc', - 'symx-creat', - 'symx-creat-excl', - 'symx-creat-trunc', - 'truncate', - 'dir-open', - 'dir-weird-open', - 'dir-open-dir', - 'dir-weird-open-dir', - 'dir-sym1-open', - 'dir-sym1-weird-open', - 'dir-sym2-open', - 'dir-sym2-weird-open', - 'readlink', - 'mkdir', - 'rmdir', - 'hard-link', - 'hard-link-dir', - 'hard-link-sym', - 'unlink', - 'rename-file', - 'rename-empty-dir', - 'rename-new-dir', - 'rename-pop-dir', - 'rename-new-pop-dir', - 'rename-move-dir', - 'rename-mass', - 'rename-mass-2', - 'rename-mass-3', - 'rename-mass-4', - 'rename-mass-5', - 'rename-mass-dir', - 'rename-mass-sym', - 'impermissible'] - -if os.path.isfile('/usr/bin/python3'): - PYTHON = 'python3' -else: - PYTHON = 'python' -PythonVersion = subprocess.check_output([PYTHON, '--version']) -print 'Running tests with: ' + PythonVersion - -for TEST in TESTS: - for TermSlash in TermSlashList: - if TermSlash == '1': - SUFFIX = '-termslash' - else: - SUFFIX = '' - - TestCommand = [PYTHON, TestSuitePath + '/run', '--ov', - '--ts=' + TermSlash, TEST] - print 'Running %s with command: %s' % (TEST, TestCommand) - if subprocess.call(TestCommand) == 0: - subprocess.call(['lava-test-case', TEST + SUFFIX, - '--result', 'pass']) - else: - subprocess.call(['lava-test-case', TEST + SUFFIX, - '--result', 'fail']) diff --git a/common/scripts/parse_lmbench.sh b/common/scripts/parse_lmbench.sh deleted file mode 100755 index f6cb8afa..00000000 --- a/common/scripts/parse_lmbench.sh +++ /dev/null @@ -1,15 +0,0 @@ -#!/bin/sh - -LOG_FILE=$1 -OUTPUT_FILE=$3 -TMP_FILE="$1.$$" -BEGIN=$(cat $LOG_FILE | grep -n "^BEGIN LMBENCH" | awk -F ':' '{print $1}') -END=$(cat $LOG_FILE | grep -n "END LMBENCH" | awk -F ':' '{print $1}') -BEGINNING=$(expr $(expr $END - $BEGIN) + 1) -head -n $END $LOG_FILE | tail -n $BEGINNING >$TMP_FILE - -for i in 2 8 16 20 -do - ./common/scripts/min_max_avg_parse.py $TMP_FILE "^$i" $2 "64_$i" >>$OUTPUT_FILE -done -rm $TMP_FILE diff --git a/common/scripts/pcapfiles/iperf.pcap b/common/scripts/pcapfiles/iperf.pcap Binary files differdeleted file mode 100644 index 95dc994f..00000000 --- a/common/scripts/pcapfiles/iperf.pcap +++ /dev/null diff --git a/common/scripts/perf-mmaptest.sh b/common/scripts/perf-mmaptest.sh deleted file mode 100755 index 1cfd8990..00000000 --- a/common/scripts/perf-mmaptest.sh +++ /dev/null @@ -1,69 +0,0 @@ -#!/bin/sh - -# Variables for loop, counter, cpu's -BUSYLOOP=${1} -COUNTER=${2} -CPU=${3} -Max=1500000 -Avg=1500 -tmp_avg=0 -tmp_max=0 - -# Check for binaries availability -ev_path=$(which perf_ev_open) -mmap_path=$(which perf_rc_mmap) - -if [ ! -f "$ev_path" ] || [ ! -f "$mmap_path" ]; then - echo "Error! the command 'perf tests' doesn't exist!" - lava-test-case perf-mmaptest --result fail - exit 1 -fi - -log_file="perfmmap.log"; -# Run tests on each cpu -for cnt in ${COUNTER}; -do - perf_ev_open -n${BUSYLOOP} -c${cnt} >> ${log_file}; - perf_rc_mmap -n${BUSYLOOP} -c${cnt} >> ${log_file}; -done; - -cat ${log_file}; -#function to calculate max -max(){ -if [ ${1} ] && [ ${1} -gt ${2} ]; then - return ${1} -else - return ${2} -fi -} - -#Parsing file for result -lava-test-run-attach ${log_file}; -while read line; -do - avg=$(echo ${line}|grep -o "avg delay\[cpucycles\]=[0-9]*" | grep -o "[0-9]*") - max=$(echo ${line}|grep -o "max delay\[cpucycles\]=[0-9]*" | grep -o "[0-9]*") - max ${avg} ${tmp_avg} - tmp_avg="$?" - if [ ! -z "${max}" ]; then - max ${max} ${tmp_max} - fi - tmp_max="$?" -done < ${log_file} - -avg_result="fail" - -if [ ${Avg} -gt ${tmp_avg} ]; then - avg_result="pass" -fi - -lava-test-case perfmmap-cpu${CPU}-Avg --result ${avg_result} --units cpucycles --measurement ${tmp_avg} - -if [ ${tmp_max} -gt 0 ]; then - avg_result="fail" - if [ ${Max} -gt ${tmp_max} ]; then - avg_result="pass" - fi - lava-test-case perfmmap-cpu${CPU}-Max --result ${avg_result} --units cpucycles --measurement ${tmp_max} -fi -rm -f ${log_file}; diff --git a/common/scripts/replay.sh b/common/scripts/replay.sh deleted file mode 100755 index 5776fd45..00000000 --- a/common/scripts/replay.sh +++ /dev/null @@ -1,36 +0,0 @@ -#!/bin/sh - -set -x - -local_ip=$(ifconfig|grep "inet addr"|grep -v "127.0.0.1"|cut -d: -f2|cut -d' ' -f1) - -for line in `lava-group | grep server | awk '{print $1}'` ; do - echo $line - # get the ipv4 for this device - STR=`lava-network query $line ipv4` - echo "STR: "$STR - # strip off the prefix for ipv4 - DUT=`echo $STR | sed -e 's/.*addr://'` - echo "DUT: "$DUT - if [ "${local_ip}" != "${DUT}" ]; then - remote_ip=${DUT} - echo ${remote_ip} - break - fi -done - -if [ -z ${remote_ip} ] -then - echo "Missing remote ip!" - exit 1 -fi - -ifconfig -a -local_mac=$(ifconfig eth0 | grep "HWaddr" | awk '{print $5}') -ping -c 1 ${remote_ip} || exit 1 -remote_mac=$(arp -a | grep "${remote_ip}" | awk '{print $4}') - -tcpprep -a client -i telnet.cap -o telnet.cache -tcprewrite --enet-smac=$local_mac,$remote_mac --enet-dmac=$remote_mac,$local_mac --endpoints=$local_ip:$remote_ip -c telnet.cache -i telnet.cap -o out.telnet.pcap --skipbroadcast -tcpreplay -i eth0 -l 100 -t -c telnet.cache out.telnet.pcap | ./common/scripts/netperf2LAVA.py - diff --git a/common/scripts/rt-tests-parser.sh b/common/scripts/rt-tests-parser.sh deleted file mode 100755 index e86c931c..00000000 --- a/common/scripts/rt-tests-parser.sh +++ /dev/null @@ -1,23 +0,0 @@ -#!/bin/sh - -TESTNAME=$1 -LOG=$2 - -# Find the last line number which starting with control character -N=`grep -n "^#1 -> #0" ${LOG} | tail -n1 | cut -d':' -f1` -sed -n "${N},$ p" ${LOG} > tmp.log - -while read l -do - TC="`echo ${l} | cut -d',' -f1`" - R="`echo ${l} | cut -d',' -f2-`" - IFS=',' - for c in ${R} - do - c="`echo $c|sed 's/^[ ]*//'`" - t="`echo ${c} | cut -d' ' -f1`" - v="`echo ${c} | cut -d' ' -f2`" - echo "${TESTNAME} ${TC} (${t}): ${v} usec pass" - done - unset IFS -done < tmp.log diff --git a/common/scripts/run-perf-test.sh b/common/scripts/run-perf-test.sh deleted file mode 100755 index fa57dc58..00000000 --- a/common/scripts/run-perf-test.sh +++ /dev/null @@ -1,71 +0,0 @@ -#!/bin/sh -# Copyright (C) 2012-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: Avik Sil <avik.sil@linaro.org> -# Author: Milosz Wasilewski <milosz.wasilewski@linaro.org> - -set -x - -# Test user id -if [ `whoami` != 'root' ] ; then - echo "You must be the superuser to run this script" >&2 - exit 1 -fi - -# Test 'perf record' -echo "Performing perf record test..." -TCID="perf record test" -perf record -e cycles -o perf-lava-test.data stress -c 4 -t 10 2>&1 | tee perf-record.log -samples=`grep -ao "[0-9]\+[ ]\+samples" perf-record.log| cut -f 1 -d' '` -if [ $samples -gt 1 ]; then - echo "$TCID : pass" -else - echo "$TCID : fail" -fi -rm perf-record.log - -# Test 'perf report' -echo "Performing perf report test..." -TCID="perf report test" -perf report -i perf-lava-test.data 2>&1 | tee perf-report.log -pcnt_samples=`grep -c -e "^[ ]\+[0-9]\+.[0-9]\+%" perf-report.log` -if [ $pcnt_samples -gt 1 ]; then - echo "$TCID : pass" -else - echo "$TCID : fail" -fi -rm perf-report.log perf-lava-test.data - -# Test 'perf stat' -echo "Performing perf stat test..." -TCID="perf stat test" -perf stat -e cycles stress -c 4 -t 10 2>&1 | tee perf-stat.log -cycles=`grep -o "[0-9,]\+[ ]\+cycles" perf-stat.log | sed 's/,//g' | cut -f 1 -d' '` -if [ -z "$cycles" ]; then - echo "$TCID : skip" -else - if [ $cycles -gt 1 ]; then - echo "$TCID : pass" - else - echo "$TCID : fail" - fi -fi -rm perf-stat.log - -# Test 'perf test' -echo "Performing 'perf test'..." -perf test -v 2>&1 | sed -e 's/FAILED!/fail/g' -e 's/Ok/pass/g' -e 's/:/ :/g' diff --git a/common/scripts/scheduler-test-android-setup.sh b/common/scripts/scheduler-test-android-setup.sh deleted file mode 100755 index 8234cdc4..00000000 --- a/common/scripts/scheduler-test-android-setup.sh +++ /dev/null @@ -1,6 +0,0 @@ -# Detect Android and do the needful -if [ -e /system/build.prop ]; then - mount -o rw,remount / - mkdir -p /bin - cp /system/bin/sh /bin/sh -fi diff --git a/common/scripts/send-to-lava.sh b/common/scripts/send-to-lava.sh deleted file mode 100755 index fd9a40bc..00000000 --- a/common/scripts/send-to-lava.sh +++ /dev/null @@ -1,17 +0,0 @@ -#!/bin/sh - -RESULT_FILE="$1" - -while read line; do - if echo "${line}" | egrep -q ".* +(pass|fail|skip)$"; then - test="$(echo "${line}" | awk '{print $1}')" - result="$(echo "${line}" | awk '{print $2}')" - lava-test-case "${test}" --result "${result}" - elif echo "${line}" | egrep -q ".* +(pass|fail|skip) +[0-9.E-]+ [A-Za-z./]+$"; then - test="$(echo "${line}" | awk '{print $1}')" - result="$(echo "${line}" | awk '{print $2}')" - measurement="$(echo "${line}" | awk '{print $3}')" - units="$(echo "${line}" | awk '{print $4}')" - lava-test-case "${test}" --result "${result}" --measurement "${measurement}" --units "${units}" - fi -done < "${RESULT_FILE}" diff --git a/common/scripts/sysbench.sh b/common/scripts/sysbench.sh deleted file mode 100755 index 3401c2bc..00000000 --- a/common/scripts/sysbench.sh +++ /dev/null @@ -1,40 +0,0 @@ -#!/bin/sh - -TIMES=${1-8} -TEST=${2-cpu} -MAX_REQUESTS=${3-50000} -DURATION=${4-20} -FILE_TEST_MODE=${5-seqrewr} - -if [ ! `which sysbench` ]; then - echo "Error! the command 'sysbench' doesn't exist!" - lava-test-case sysbench --result fail - exit 1 -fi - -for i in $(seq 1 ${TIMES}); -do - t=$((${i} * 2)); - log_file="${TEST}-test-${t}-threads.log"; - opt="--test=${TEST} --max-requests=${MAX_REQUESTS} --num-threads=${t} --max-time=${DURATION}" - [ "${TEST}" = "threadsR" ] && opt="${opt} --thread-locks=$((${t}/2))" - [ "${TEST}" = "fileio" ] && opt="${opt} --file-test-mode=${FILE_TEST_MODE}" - echo "Running sysbench ${opt} run" | tee ${log_file}; - sysbench ${opt} run | tee -a ${log_file}; - lava-test-run-attach ${log_file}; - - # parse log file & submit to test result - sed -n -e '/Test execution summary\|General statistics/,/^$/p' ${log_file} | while read line; - do - id=$(echo ${line}|awk -F':' '{print $1}') - val=$(echo ${line}|awk -F':' '{print $2}') - if [ -n "${val}" ]; then - u=$(echo ${val}|sed 's/[0-9\.]*//') - v=$(echo ${val}|sed 's/\([0-9\.]*\)[a-zA-Z]*/\1/') - # let 's' to be the default unit for time measurement - [ -n "$(echo ${id}|grep 'time')" ] && [ -z "${u}" ] && u=s - [ -n "${u}" ] && o="--units ${u} --measurement ${v}" || o="--measurement ${val}" - lava-test-case "${id}-${t}-threads" --result pass ${o} - fi - done -done |