mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-02-22 06:52:36 +01:00
gui: count test failures in test runner summary
This commit is contained in:
parent
ba44aae768
commit
2489b6fe9c
1 changed files with 14 additions and 21 deletions
|
@ -71,8 +71,6 @@ int main(int argc, char* argv[])
|
||||||
gArgs.ForceSetArg("-upnp", "0");
|
gArgs.ForceSetArg("-upnp", "0");
|
||||||
gArgs.ForceSetArg("-natpmp", "0");
|
gArgs.ForceSetArg("-natpmp", "0");
|
||||||
|
|
||||||
bool fInvalid = false;
|
|
||||||
|
|
||||||
// Prefer the "minimal" platform for the test instead of the normal default
|
// Prefer the "minimal" platform for the test instead of the normal default
|
||||||
// platform ("xcb", "windows", or "cocoa") so tests can't unintentionally
|
// platform ("xcb", "windows", or "cocoa") so tests can't unintentionally
|
||||||
// interfere with any background GUIs and don't require extra resources.
|
// interfere with any background GUIs and don't require extra resources.
|
||||||
|
@ -88,35 +86,30 @@ int main(int argc, char* argv[])
|
||||||
app.setApplicationName("Bitcoin-Qt-test");
|
app.setApplicationName("Bitcoin-Qt-test");
|
||||||
app.createNode(*init);
|
app.createNode(*init);
|
||||||
|
|
||||||
|
int fInvalid{0};
|
||||||
|
|
||||||
AppTests app_tests(app);
|
AppTests app_tests(app);
|
||||||
if (QTest::qExec(&app_tests) != 0) {
|
fInvalid += QTest::qExec(&app_tests);
|
||||||
fInvalid = true;
|
|
||||||
}
|
|
||||||
OptionTests options_tests(app.node());
|
OptionTests options_tests(app.node());
|
||||||
if (QTest::qExec(&options_tests) != 0) {
|
fInvalid += QTest::qExec(&options_tests);
|
||||||
fInvalid = true;
|
|
||||||
}
|
|
||||||
URITests test1;
|
URITests test1;
|
||||||
if (QTest::qExec(&test1) != 0) {
|
fInvalid += QTest::qExec(&test1);
|
||||||
fInvalid = true;
|
|
||||||
}
|
|
||||||
RPCNestedTests test3(app.node());
|
RPCNestedTests test3(app.node());
|
||||||
if (QTest::qExec(&test3) != 0) {
|
fInvalid += QTest::qExec(&test3);
|
||||||
fInvalid = true;
|
|
||||||
}
|
|
||||||
#ifdef ENABLE_WALLET
|
#ifdef ENABLE_WALLET
|
||||||
WalletTests test5(app.node());
|
WalletTests test5(app.node());
|
||||||
if (QTest::qExec(&test5) != 0) {
|
fInvalid += QTest::qExec(&test5);
|
||||||
fInvalid = true;
|
|
||||||
}
|
|
||||||
AddressBookTests test6(app.node());
|
AddressBookTests test6(app.node());
|
||||||
if (QTest::qExec(&test6) != 0) {
|
fInvalid += QTest::qExec(&test6);
|
||||||
fInvalid = true;
|
|
||||||
}
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (fInvalid) {
|
if (fInvalid) {
|
||||||
qWarning("\nThere were errors in some of the tests above.\n");
|
qWarning("\nFailed tests: %d\n", fInvalid);
|
||||||
} else {
|
} else {
|
||||||
qDebug("\nAll tests passed.\n");
|
qDebug("\nAll tests passed.\n");
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue