Exclude more from coverage

Only count ConflictSet.cpp in jenkins now, and also add some more
excludes for unreachable lines
This commit is contained in:
2024-03-18 12:05:52 -07:00
parent f2b5e9b0bf
commit 5b0c3c2428
2 changed files with 8 additions and 8 deletions

View File

@@ -676,7 +676,7 @@ template <class NodeT> int getNodeIndex(NodeT *self, uint8_t index) {
// Precondition - an entry for index must exist in the node
Node *&getChildExists(Node *self, uint8_t index) {
switch (self->getType()) {
case Type_Node0:
case Type_Node0: // GCOVR_EXCL_LINE
__builtin_unreachable(); // GCOVR_EXCL_LINE
case Type_Node3: {
auto *self3 = static_cast<Node3 *>(self);
@@ -1097,7 +1097,7 @@ void maybeDownsize(Node *self, NodeAllocators *allocators,
assert(self->getType() == kType);
static_assert(kType != Type_Node0);
switch (kType) {
case Type_Node0:
case Type_Node0: // GCOVR_EXCL_LINE
__builtin_unreachable(); // GCOVR_EXCL_LINE
case Type_Node3: {
auto *self3 = (Node3 *)self;
@@ -1201,7 +1201,7 @@ Node *erase(Node *self, NodeAllocators *allocators, ConflictSet::Impl *impl,
if (self->numChildren != 0) {
const bool update = result == dontInvalidate;
switch (self->getType()) {
case Type_Node0:
case Type_Node0: // GCOVR_EXCL_LINE
__builtin_unreachable(); // GCOVR_EXCL_LINE
case Type_Node3:
maybeDownsize<Type_Node3>(self, allocators, impl, result);
@@ -2839,8 +2839,8 @@ Iterator firstGeq(Node *n, std::string_view key) {
case Type_Node256:
minNumChildren = kMinChildrenNode256;
break;
default: // GCOVR_EXCL_LINE
__builtin_unreachable(); // GCOVR_EXCL_LINE
default:
abort();
}
if (node->numChildren + int(node->entryPresent) < minNumChildren) {
fprintf(stderr,
@@ -2898,8 +2898,8 @@ int64_t getNodeSize(struct Node *n) {
return sizeof(Node48);
case Type_Node256:
return sizeof(Node256);
default: // GCOVR_EXCL_LINE
__builtin_unreachable(); // GCOVR_EXCL_LINE
default:
abort();
}
}

2
Jenkinsfile vendored
View File

@@ -97,7 +97,7 @@ pipeline {
steps {
CleanBuildAndTest("-DCMAKE_C_COMPILER=gcc -DCMAKE_CXX_COMPILER=g++ -DCMAKE_C_FLAGS=--coverage -DCMAKE_CXX_FLAGS=--coverage -DCMAKE_BUILD_TYPE=Debug")
sh '''
gcovr --exclude '.*third_party.*' --cobertura > build/coverage.xml
gcovr -f ConflictSet.cpp --cobertura > build/coverage.xml
'''
cobertura autoUpdateHealth: false, autoUpdateStability: false, coberturaReportFile: 'build/coverage.xml', conditionalCoverageTargets: '70, 0, 0', failUnhealthy: false, failUnstable: false, lineCoverageTargets: '80, 0, 0', maxNumberOfBuilds: 0, methodCoverageTargets: '80, 0, 0', onlyStable: false, sourceEncoding: 'ASCII', zoomCoverageChart: false
}