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:
@@ -676,7 +676,7 @@ template <class NodeT> int getNodeIndex(NodeT *self, uint8_t index) {
|
|||||||
// Precondition - an entry for index must exist in the node
|
// Precondition - an entry for index must exist in the node
|
||||||
Node *&getChildExists(Node *self, uint8_t index) {
|
Node *&getChildExists(Node *self, uint8_t index) {
|
||||||
switch (self->getType()) {
|
switch (self->getType()) {
|
||||||
case Type_Node0:
|
case Type_Node0: // GCOVR_EXCL_LINE
|
||||||
__builtin_unreachable(); // GCOVR_EXCL_LINE
|
__builtin_unreachable(); // GCOVR_EXCL_LINE
|
||||||
case Type_Node3: {
|
case Type_Node3: {
|
||||||
auto *self3 = static_cast<Node3 *>(self);
|
auto *self3 = static_cast<Node3 *>(self);
|
||||||
@@ -1097,7 +1097,7 @@ void maybeDownsize(Node *self, NodeAllocators *allocators,
|
|||||||
assert(self->getType() == kType);
|
assert(self->getType() == kType);
|
||||||
static_assert(kType != Type_Node0);
|
static_assert(kType != Type_Node0);
|
||||||
switch (kType) {
|
switch (kType) {
|
||||||
case Type_Node0:
|
case Type_Node0: // GCOVR_EXCL_LINE
|
||||||
__builtin_unreachable(); // GCOVR_EXCL_LINE
|
__builtin_unreachable(); // GCOVR_EXCL_LINE
|
||||||
case Type_Node3: {
|
case Type_Node3: {
|
||||||
auto *self3 = (Node3 *)self;
|
auto *self3 = (Node3 *)self;
|
||||||
@@ -1201,7 +1201,7 @@ Node *erase(Node *self, NodeAllocators *allocators, ConflictSet::Impl *impl,
|
|||||||
if (self->numChildren != 0) {
|
if (self->numChildren != 0) {
|
||||||
const bool update = result == dontInvalidate;
|
const bool update = result == dontInvalidate;
|
||||||
switch (self->getType()) {
|
switch (self->getType()) {
|
||||||
case Type_Node0:
|
case Type_Node0: // GCOVR_EXCL_LINE
|
||||||
__builtin_unreachable(); // GCOVR_EXCL_LINE
|
__builtin_unreachable(); // GCOVR_EXCL_LINE
|
||||||
case Type_Node3:
|
case Type_Node3:
|
||||||
maybeDownsize<Type_Node3>(self, allocators, impl, result);
|
maybeDownsize<Type_Node3>(self, allocators, impl, result);
|
||||||
@@ -2839,8 +2839,8 @@ Iterator firstGeq(Node *n, std::string_view key) {
|
|||||||
case Type_Node256:
|
case Type_Node256:
|
||||||
minNumChildren = kMinChildrenNode256;
|
minNumChildren = kMinChildrenNode256;
|
||||||
break;
|
break;
|
||||||
default: // GCOVR_EXCL_LINE
|
default:
|
||||||
__builtin_unreachable(); // GCOVR_EXCL_LINE
|
abort();
|
||||||
}
|
}
|
||||||
if (node->numChildren + int(node->entryPresent) < minNumChildren) {
|
if (node->numChildren + int(node->entryPresent) < minNumChildren) {
|
||||||
fprintf(stderr,
|
fprintf(stderr,
|
||||||
@@ -2898,8 +2898,8 @@ int64_t getNodeSize(struct Node *n) {
|
|||||||
return sizeof(Node48);
|
return sizeof(Node48);
|
||||||
case Type_Node256:
|
case Type_Node256:
|
||||||
return sizeof(Node256);
|
return sizeof(Node256);
|
||||||
default: // GCOVR_EXCL_LINE
|
default:
|
||||||
__builtin_unreachable(); // GCOVR_EXCL_LINE
|
abort();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
2
Jenkinsfile
vendored
2
Jenkinsfile
vendored
@@ -97,7 +97,7 @@ pipeline {
|
|||||||
steps {
|
steps {
|
||||||
CleanBuildAndTest("-DCMAKE_C_COMPILER=gcc -DCMAKE_CXX_COMPILER=g++ -DCMAKE_C_FLAGS=--coverage -DCMAKE_CXX_FLAGS=--coverage -DCMAKE_BUILD_TYPE=Debug")
|
CleanBuildAndTest("-DCMAKE_C_COMPILER=gcc -DCMAKE_CXX_COMPILER=g++ -DCMAKE_C_FLAGS=--coverage -DCMAKE_CXX_FLAGS=--coverage -DCMAKE_BUILD_TYPE=Debug")
|
||||||
sh '''
|
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
|
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
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user