#!/bin/bash

set -e
set -u

O=/home/mase/obj/build-pinmuxer-Desktop-Debug
opwd=$PWD


# $O/pinmux_tests


# gcovr -v -r $opwd/pinmuxer/src --html --html-details -o example-html-details.html $O
# cd $O
# gcovr -r $opwd --html --html-details -o example-html-details.html $PWD

# gcovr -v -r $opwd/pinmuxer/src --html --html-details -o example-html-details.html /home/mase/obj/build-pinmuxer-Desktop-Debug/CMakeFiles/pinmux_tests.dir

# gcovr -v -r . --html --html-details -o example-html-details.html $O

#cd $O
#./pinmux_tests
#gcovr -v -r $opwd --html --html-details -o example-html-details.html .


mkdir -p build 
cd build 
cmake ..
make -j12 pinmuxer 
make -j12 pinmux_tests
make -j12 test
gcovr -r ../ --html --html-details -o pinmuxer-html-details.html .

cd $O
# make -j12 test
# ./pinmux_tests
gcovr -r $opwd --html --html-details -o pinmuxer-html-details.html .


#---fin--------------------------

