27 lines
517 B
Bash
Executable File
27 lines
517 B
Bash
Executable File
#!/bin/bash
|
|
|
|
set -e
|
|
|
|
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
|
|
|
|
# build
|
|
cd $SCRIPT_DIR/..
|
|
if [ "$1" == "--rebuild" ]; then
|
|
rm -rf build_qt
|
|
mkdir build_qt
|
|
else
|
|
mkdir -p build_qt
|
|
fi
|
|
cd build_qt
|
|
cmake .. -GNinja
|
|
ninja
|
|
|
|
# run tests
|
|
src/decn/decn_tests
|
|
|
|
# get coverage
|
|
echo "Running lcov"
|
|
lcov --capture --directory src/decn --output-file coverage.info
|
|
genhtml coverage.info --output-directory lcov
|
|
echo "Running gcov"
|
|
gcov -b src/decn/CMakeFiles/decn_cover.dir/decn.c.gcno |