--- /dev/null
+#!/bin/bash -e
+
+LCOV_DIR=/dn48/newgeom/common/products/lcov-1.11
+export PATH=${LCOV_DIR}/bin:${PATH}
+
+echo "Use LCOV in ${LCOV_DIR}..."
\ No newline at end of file
--- /dev/null
+#!/bin/bash
+
+source env_lcov.sh
+
+echo "Collect coverage data..."
+lcov --capture --directory ../ --output-file coverage.info
+
+echo "Generate HTML for coverage data..."
+genhtml coverage.info --output-directory lcov_html
+
${INSTALL_DIR}/bin/GeomApp &
APP_PID=$!
echo "Connecting GDB to PID ${APP_PID}..."
- gdb --command=./commands.gdb - ${APP_PID}
+ gdb --command=./commands.gdb - ${APP_PID} >>gdb.log 2>>gdb.err
else
${INSTALL_DIR}/bin/GeomApp
fi
source env.sh
source env_standalone.sh
-mkdir -p ${BUILD_DIR}
-cd ${BUILD_DIR}
-
CMAKE_ARGS=""
-CMAKE_ARGS="${CMAKE_ARGS} -DCMAKE_BUILD_TYPE=Release"
+if [ -f GCOV ]; then
+ echo "Use GCOV..."
+ source env_lcov.sh
+ CMAKE_ARGS="${CMAKE_ARGS} -DCMAKE_BUILD_TYPE=Debug"
+ CMAKE_ARGS="${CMAKE_ARGS} -DUSE_TEST_COVERAGE=ON"
+else
+ CMAKE_ARGS="${CMAKE_ARGS} -DCMAKE_BUILD_TYPE=Release"
+fi
CMAKE_ARGS="${CMAKE_ARGS} -DCMAKE_INSTALL_PREFIX:PATH=${INSTALL_DIR}"
CMAKE_ARGS="${CMAKE_ARGS} ${SOURCES_DIR}"
+mkdir -p ${BUILD_DIR}
+cd ${BUILD_DIR}
+
cmake -G "Unix Makefiles" ${CMAKE_ARGS}
make -j$(nproc) install