From 3e9cd31dd75a1c072eae2b8363ffe173a2d91702 Mon Sep 17 00:00:00 2001 From: Harry van Haaren Date: Mon, 23 Sep 2013 11:56:01 +0100 Subject: [PATCH] -Added buildTest compile.sh script --- buildTest/compile.sh | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100755 buildTest/compile.sh diff --git a/buildTest/compile.sh b/buildTest/compile.sh new file mode 100755 index 0000000..95d75a8 --- /dev/null +++ b/buildTest/compile.sh @@ -0,0 +1,33 @@ +#!/bin/bash + +# A simple script to invoke cmake with the correct parameters to build the +# self-testing version of Luppp + +function err_handle { + notify-send -t 0 -u critical "Luppp: Self-test FAILED!" +} +trap 'err_handle' ERR + +set -e + +cmake -DBUILD_TESTS=1 ../ + +make -j 2 + +lcov --zerocounters --directory . + +lcov --capture --initial --directory . --output-file app + + +./src/luppp -test -stopAfterTest + +lcov --base-directory . --directory . -c -o lupppFull.info + +lcov --remove lupppFull.info "/usr*" --no-checksum --directory . --output-file lupppTmp.info + +lcov --remove lupppTmp.info "*.hxx" --no-checksum --directory . --output-file luppp.info + +genhtml luppp.info + +notify-send -t 5 "Luppp: Test data available..." +firefox index.html