potential fix for unit/integ test false positives
This commit is contained in:
parent
ad35ccb2dc
commit
77676d558e
|
@ -67,7 +67,12 @@ main(int argc, char **argv)
|
||||||
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
|
||||||
|
|
|
@ -40,5 +40,10 @@ main(int argc, char **argv)
|
||||||
|
|
||||||
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