Commit 3af5bc2d authored by Ben Huber's avatar Ben Huber

changes in codeCoverage to allow compilation with clang++; switched...

changes in codeCoverage to allow compilation with clang++; switched CodeCoverage test on CI to clang
parent 94c9dfc9
Pipeline #1214 failed with stages
in 15 minutes and 18 seconds
#=================================================================================================
# Compiler Options
#=================================================================================================
CXX = g++
CXX = clang++
COMPATIBILITY = -std=c++11
ACTIVATE_CODE_COVERAGE = TRUE # Enable coverage tests
......
......@@ -12,7 +12,7 @@ stages:
job_build_homepage:
stage: build_homepage
script: "cp .gitlab-ci-configs/.config.mk.ci.gcc config.mk; make -C doc doc && scp -r doc/html xerusweb:libxerus.org-443"
script: "cp .gitlab-ci-configs/.config.mk.ci.cc config.mk; make -C doc doc && scp -r doc/html xerusweb:libxerus.org-443"
when: always
only:
- master
......@@ -35,7 +35,7 @@ job_test_gcc_nocheck:
job_code_coverage:
stage: code_coverage
script: "g++ --version; cp .gitlab-ci-configs/.config.mk.ci.gcc config.mk; mkdir -p build; make test &> build/build_output.txt; tail -n 500 build/build_output.txt"
script: "g++ --version; cp .gitlab-ci-configs/.config.mk.ci.cc config.mk; mkdir -p build; make test &> build/build_output.txt; tail -n 500 build/build_output.txt"
when: always
artifacts:
expire_in: 3h
......
......@@ -52,7 +52,7 @@
".quad %c0" "\n" \
".quad %c1" "\n" \
".popsection" "\n" \
: : "i"(xerusCCLocalFunctionLocation), "i"(xerusCCLocalFunctionName) \
: : "i"(&xerusCCLocalFunctionLocation), "i"(&xerusCCLocalFunctionName) \
); \
xerus::misc::CodeCoverage::covered(xerusCCLocalFunctionLocation, xerusCCLocalFunctionName); \
\
......
......@@ -76,7 +76,7 @@ namespace xerus { namespace misc { namespace CodeCoverage {
auto step = sizeof(uintptr_t);
size_t count = 0;
for (auto p = range.first; p < range.second; p += 2*step) {
char * loc = reinterpret_cast<char *>(*reinterpret_cast<uintptr_t*>(p));
char * loc = *reinterpret_cast<char **>(*reinterpret_cast<uintptr_t*>(p));
const auto locationParts = misc::explode(loc, ':');
if (locationParts.size() != 2) {
LOG(warning, "i don't understand the required test location: '" << loc << "'");
......@@ -84,7 +84,7 @@ namespace xerus { namespace misc { namespace CodeCoverage {
}
const auto file = xerus::misc::normalize_pathname(locationParts[0]);
const auto lineNumber = xerus::misc::from_string<size_t>(locationParts[1]);
char * name = reinterpret_cast<char *>(*reinterpret_cast<uintptr_t*>(p+step));
char * name = *reinterpret_cast<char **>(*reinterpret_cast<uintptr_t*>(p+step));
if (requiredTests.count(file) == 0 || requiredTests[file].count(lineNumber) == 0 || requiredTests[file][lineNumber].count(name) == 0) {
requiredTests[file][lineNumber][name] = false;
count += 1;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment