From 7d559d6d23982719b8003ebe6308b104def0d3fd Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Sat, 29 Apr 2017 05:20:39 +0200 Subject: coverity: simplify directory structure --- coverity/build.sh | 45 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 coverity/build.sh (limited to 'coverity/build.sh') diff --git a/coverity/build.sh b/coverity/build.sh new file mode 100644 index 00000000..02cd5cad --- /dev/null +++ b/coverity/build.sh @@ -0,0 +1,45 @@ +#!/bin/sh + +function cleanup() { + for i in cov-build ninja; do + taskkill -f -t -im "$i.exe" 2>/dev/null 1>&2 + done + rm -f "$myfile" +} + +function signal() { + set +e + trap '' EXIT + echo "error: $1" 1>&2 + cleanup + exit 1 +} + +export PATH="/d/dev/cov-analysis-win64-8.7.0/bin:/c/msys64/bin:/c/msys64/mingw32/bin:/usr/bin:$PATH" + +for k in HUP INT QUIT ILL BUS FPE SEGV PIPE; do + trap "signal 'got fatal signal SIG'$k" SIG"$k" +done + +trap 'signal "fatal return $?"' EXIT + +set -e + +mydate="$(date --iso-8601=minutes)" +mydir="$(dirname -- "$0")" +myfile="$mydir/opentrack-"$mydate".7z" + +cd "$mydir" +for k in opencv aruco libovr-025 libovr-042 libovr-080; do + ninja -C "./$k" +done + +cd "./opentrack" + +cmake . +ninja32 clean +cov-build --dir cov-int ninja +rm -f "$myfile" || true +7za -mx a "$myfile" cov-int +trap '' EXIT +exit 0 -- cgit v1.2.3