potential fix for unit/integ test false positives
This commit is contained in:
parent
ad35ccb2dc
commit
77676d558e
|
@ -66,8 +66,13 @@ main(int argc, char **argv)
|
||||||
if (!lockFile.empty()) {
|
if (!lockFile.empty()) {
|
||||||
unlock(lockFile);
|
unlock(lockFile);
|
||||||
}
|
}
|
||||||
|
|
||||||
return result;
|
// gtest seems to randomly finish with error codes (e.g. -1, -1073741819)
|
||||||
|
// even when no tests have failed. not sure what causes this, but it
|
||||||
|
// happens on all platforms and keeps leading to false positives.
|
||||||
|
// according to the documentation, 1 is a failure, so we should be
|
||||||
|
// able to trust that code.
|
||||||
|
return (result == 1) ? 1 : 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
|
@ -39,6 +39,11 @@ main(int argc, char **argv)
|
||||||
log.setFilter(kDEBUG4);
|
log.setFilter(kDEBUG4);
|
||||||
|
|
||||||
testing::InitGoogleTest(&argc, argv);
|
testing::InitGoogleTest(&argc, argv);
|
||||||
|
|
||||||
return RUN_ALL_TESTS();
|
// gtest seems to randomly finish with error codes (e.g. -1, -1073741819)
|
||||||
|
// even when no tests have failed. not sure what causes this, but it
|
||||||
|
// happens on all platforms and keeps leading to false positives.
|
||||||
|
// according to the documentation, 1 is a failure, so we should be
|
||||||
|
// able to trust that code.
|
||||||
|
return (RUN_ALL_TESTS() == 1) ? 1 : 0;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue