diff --git a/tests/blacksimpluginfsxp3d/testblacksimpluginfsxp3d.pro b/tests/blacksimpluginfsxp3d/testblacksimpluginfsxp3d.pro index 2f87271f8..ed0d088d6 100644 --- a/tests/blacksimpluginfsxp3d/testblacksimpluginfsxp3d.pro +++ b/tests/blacksimpluginfsxp3d/testblacksimpluginfsxp3d.pro @@ -14,11 +14,11 @@ TEMPLATE = app DEPENDPATH += \ . \ $$SourceRoot/src \ - $$SourceRoot/tests \ + $$SourceRoot/tests INCLUDEPATH += \ $$SourceRoot/src \ - $$SourceRoot/tests \ + $$SourceRoot/tests HEADERS += *.h SOURCES += *.cpp diff --git a/tests/test.h b/tests/test.h index 39f7b1397..3a109d2c1 100644 --- a/tests/test.h +++ b/tests/test.h @@ -49,8 +49,12 @@ args.append({ "-o", resultsFileName + "_testresults.xml,xml" }); \ #define BLACKTEST_APPLESS_MAIN(TestObject) \ int main(int argc, char *argv[]) \ { \ - BLACKTEST_INIT(TestObject) \ - return QTest::qExec(&to, args); \ + try { \ + BLACKTEST_INIT(TestObject) \ + return QTest::qExec(&to, args); \ + } catch (...) { \ + return EXIT_FAILURE; \ + } \ } //! Implements a main() function that executes all tests in TestObject @@ -59,9 +63,13 @@ int main(int argc, char *argv[]) \ #define BLACKTEST_MAIN(TestObject) \ int main(int argc, char *argv[]) \ { \ - QCoreApplication app(argc, argv); \ - BLACKTEST_INIT(TestObject) \ - return QTest::qExec(&to, args); \ + try { \ + QCoreApplication app(argc, argv); \ + BLACKTEST_INIT(TestObject) \ + return QTest::qExec(&to, args); \ + } catch (...) { \ + return EXIT_FAILURE; \ + } \ } //! \endcond