diff options
author | Milosz Wasilewski <milosz.wasilewski@linaro.org> | 2014-10-07 12:05:01 +0100 |
---|---|---|
committer | Milosz Wasilewski <milosz.wasilewski@linaro.org> | 2014-10-08 11:04:39 +0000 |
commit | 4414ef8b650372d18568d77ca9279ba0c80711b3 (patch) | |
tree | 58833b7797c8e3181bfdc22e206d38bfe419f38b | |
parent | a368dc82611bf56fddc3878b106a7b24b425d3b8 (diff) |
gcov: Add experimental test definition for arndale
The gcov test should be used with some other test. The lava-test-shell
sequence should be:
gcov-start
<some other test case>
gcov-collect-results
Make sure there is no reboot between gcov-start and gcov-collect-results
Change-Id: I261c8562b474f4d782c22eb45ada0de23ef8e3ae
Signed-off-by: Milosz Wasilewski <milosz.wasilewski@linaro.org>
-rwxr-xr-x | common/scripts/gcov-collect-results.sh | 9 | ||||
-rwxr-xr-x | common/scripts/gcov-start.sh | 21 | ||||
-rw-r--r-- | ubuntu/gcov-collect-results.yaml | 30 | ||||
-rw-r--r-- | ubuntu/gcov-start.yaml | 34 |
4 files changed, 94 insertions, 0 deletions
diff --git a/common/scripts/gcov-collect-results.sh b/common/scripts/gcov-collect-results.sh new file mode 100755 index 0000000..3a12899 --- /dev/null +++ b/common/scripts/gcov-collect-results.sh @@ -0,0 +1,9 @@ +#!/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 new file mode 100755 index 0000000..9dd29f1 --- /dev/null +++ b/common/scripts/gcov-start.sh @@ -0,0 +1,21 @@ +#!/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/ubuntu/gcov-collect-results.yaml b/ubuntu/gcov-collect-results.yaml new file mode 100644 index 0000000..3979a3f --- /dev/null +++ b/ubuntu/gcov-collect-results.yaml @@ -0,0 +1,30 @@ +metadata: + name: gcov-collect-results + format: "Lava-Test-Shell Test Definition 1.0" + description: "Experimental implementation of GCOV for arndale. + Make sure gcov is enabled in the kernel. + Run tests in separate lava-test-shell without reboot. + This definition should be used together with gcov-start" + maintainer: + - milosz.wasilewski@linaro.org + - fathi.boudra@linaro.org + - riku.voipio@linaro.org + os: + - ubuntu + scope: + - functional + devices: + - arndale + +install: + deps: + - gzip + - lcov + +run: + steps: + - './common/scripts/gcov-collect-results.sh' + +parse: + pattern: "LAVA (?P<test_case_id>.*-*):\\s+(?P<result>(pass|fail))" + diff --git a/ubuntu/gcov-start.yaml b/ubuntu/gcov-start.yaml new file mode 100644 index 0000000..5b7cc19 --- /dev/null +++ b/ubuntu/gcov-start.yaml @@ -0,0 +1,34 @@ +metadata: + name: gcov-start + format: "Lava-Test-Shell Test Definition 1.0" + description: "Experimental implementation of GCOV for arndale. + Make sure gcov is enabled in the kernel. + Run tests in separate lava-test-shell without reboot. + This definition should be used together with gcov-collect-results" + maintainer: + - milosz.wasilewski@linaro.org + - fathi.boudra@linaro.org + - riku.voipio@linaro.org + os: + - ubuntu + scope: + - functional + devices: + - arndale + +install: + deps: + - bzip2 + - gzip + - wget + +params: + BUILD_NUMBER: "" + +run: + steps: + - ./common/scripts/gcov-start.sh $BUILD_NUMBER + +parse: + pattern: "LAVA (?P<test_case_id>.*-*):\\s+(?P<result>(pass|fail))" + |