summaryrefslogtreecommitdiffstats
path: root/tests/auto/testlib/selftests/silent
diff options
context:
space:
mode:
authorTor Arne Vestbø <tor.arne.vestbo@qt.io>2020-02-06 12:07:04 +0100
committerTor Arne Vestbø <tor.arne.vestbo@qt.io>2020-02-06 23:43:05 +0100
commit8237e39f5dfa5e6e43aca7d7b9107c666d40de7b (patch)
treedd490b65d6ba1567cede59822ee5f1e0cda9f1c8 /tests/auto/testlib/selftests/silent
parentdbdb3cbc907fed4055adaa848dd5e36fb67b2263 (diff)
testlib: Move subtest argument handling to individual tests
The test orchestrator shouldn't have to deal with the individual options needed for each test. Change-Id: I78bbf4850cc649e625bd08a7aedf02267ba1314d Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Diffstat (limited to 'tests/auto/testlib/selftests/silent')
-rw-r--r--tests/auto/testlib/selftests/silent/tst_silent.cpp11
1 files changed, 10 insertions, 1 deletions
diff --git a/tests/auto/testlib/selftests/silent/tst_silent.cpp b/tests/auto/testlib/selftests/silent/tst_silent.cpp
index 999d9acf07..7d64efffa2 100644
--- a/tests/auto/testlib/selftests/silent/tst_silent.cpp
+++ b/tests/auto/testlib/selftests/silent/tst_silent.cpp
@@ -102,5 +102,14 @@ void tst_Silent::messages()
qFatal("This is a fatal error message that should still appear in silent test output");
}
-QTEST_MAIN(tst_Silent)
+int main(int argc, char *argv[])
+{
+ std::vector<const char*> args(argv, argv + argc);
+ args.push_back("-silent");
+ argc = args.size();
+ argv = const_cast<char**>(&args[0]);
+
+ QTEST_MAIN_IMPL(tst_Silent)
+}
+
#include "tst_silent.moc"