Commit e8e32bcc authored by Alberto Miranda's avatar Alberto Miranda ♨️
Browse files

Improve coverage reporting

parent 8ff5a08c
Loading
Loading
Loading
Loading
Loading
+7 −3
Original line number Diff line number Diff line
@@ -5,7 +5,8 @@ GIT_ROOTDIR=`git rev-parse --show-toplevel`
/usr/local/bin/lcov \
    `find ${GIT_ROOTDIR} -name "*.gcda" 2>/dev/null | xargs -I{} dirname {} | uniq | xargs -I {} echo -n " --directory "{}` \
    --capture \
    --output-file gcov.info
    --output-file gcov.info \
    2&>1 /dev/null

/usr/local/bin/lcov \
    --remove gcov.info \
@@ -14,7 +15,10 @@ GIT_ROOTDIR=`git rev-parse --show-toplevel`
        '*/externals/*' \
        '*/spdlog/*' \
        '*/build*/*' \
        '*/tests/*' \
    -o norns.info \
    2>/dev/null
    2&>1 /dev/null

genhtml -o html/coverage norns.info 2>/dev/null
/usr/local/bin/lcov -l norns.info

#genhtml -o html/coverage norns.info 2>/dev/null
+2 −2
Original line number Diff line number Diff line
@@ -146,7 +146,7 @@ void fake_daemon::configure(const bfs::path& config_file,
#endif
}

extern "C" void __gcov_flush (void);
//extern "C" void __gcov_flush (void);

void fake_daemon::run() {

@@ -178,7 +178,7 @@ void fake_daemon::run() {
            std::cerr << "[" << getpid() << "] exitting...\n";
#endif

            __gcov_flush();
//            __gcov_flush();
            exit(0);
        }