summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xcommon/scripts/gcov-collect-results.sh9
-rwxr-xr-xcommon/scripts/gcov-start.sh21
-rw-r--r--ubuntu/gcov-collect-results.yaml30
-rw-r--r--ubuntu/gcov-start.yaml34
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))"
+