From 4414ef8b650372d18568d77ca9279ba0c80711b3 Mon Sep 17 00:00:00 2001 From: Milosz Wasilewski Date: Tue, 7 Oct 2014 12:05:01 +0100 Subject: 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 gcov-collect-results Make sure there is no reboot between gcov-start and gcov-collect-results Change-Id: I261c8562b474f4d782c22eb45ada0de23ef8e3ae Signed-off-by: Milosz Wasilewski --- common/scripts/gcov-collect-results.sh | 9 +++++++++ common/scripts/gcov-start.sh | 21 +++++++++++++++++++++ 2 files changed, 30 insertions(+) create mode 100755 common/scripts/gcov-collect-results.sh create mode 100755 common/scripts/gcov-start.sh (limited to 'common') 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 -- cgit v1.2.3