You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
srs/trunk/3rdparty/st-srs/auto/fast.sh

30 lines
739 B
Bash

#!/bin/bash
PWD=$(cd `dirname $0`/.. && pwd)
pushd $PWD
echo "Run UTest in $(pwd)"
IS_LINUX=yes
uname -s|grep Darwin >/dev/null && IS_DARWIN=yes && IS_LINUX=no
echo "IS_LINUX: $IS_LINUX, IS_DARWIN: $IS_DARWIN"
echo "Clean gcda files"
rm -f ./obj/*.gcda
echo "Build and run utest"
if [[ $IS_DARWIN == yes ]]; then
make darwin-debug-gcov && ./obj/st_utest
else
make linux-debug-gcov && ./obj/st_utest
fi
ret=$?; if [[ 0 -ne $ret ]]; then echo "Make ST utest fail, ret=$ret"; exit $ret; fi
echo "Generating coverage"
mkdir -p coverage &&
gcovr -r . -e LINUX -e DARWIN -e examples --html --html-details -o coverage/st.html &&
echo "Coverage report at coverage/st.html" &&
open coverage/st.html
popd
echo "UTest done, restore $(pwd)"