diff options
author | Jason McDonald <jason.mcdonald@nokia.com> | 2011-10-28 18:19:05 +1000 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2011-11-03 02:42:56 +0100 |
commit | 8cb52795f1dc0bdc06ce4fa9dc49ac9e5141ab0f (patch) | |
tree | e4fb1bf1ced3f5ff8aae8f502632f645af5a8ffe /tests/auto/testlib/selftests | |
parent | 9022f42a4fb0965df480b440edf6bbce0286081f (diff) |
Allow extra selftests without modifying source.
Change-Id: I21708b725611eb64bdb0414cee08ca00dd62b213
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
Diffstat (limited to 'tests/auto/testlib/selftests')
-rw-r--r-- | tests/auto/testlib/selftests/tst_selftests.cpp | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/tests/auto/testlib/selftests/tst_selftests.cpp b/tests/auto/testlib/selftests/tst_selftests.cpp index bbdc5ee9e9..9a56ce8c1b 100644 --- a/tests/auto/testlib/selftests/tst_selftests.cpp +++ b/tests/auto/testlib/selftests/tst_selftests.cpp @@ -305,13 +305,6 @@ void tst_Selftests::runSubTest_data() #endif << "benchlibeventcounter" << "benchliboptions" -#if 0 - // These tests are affected by timing and whether the CPU tick counter - // is monotonically increasing. They won't work on some machines so - // leave them off by default. Feel free to uncomment for your own testing. - << "benchlibtickcounter" - << "benchlibwalltime" -#endif << "cmptest" << "commandlinedata" << "crashes" @@ -344,6 +337,16 @@ void tst_Selftests::runSubTest_data() << "xunit" ; + // These tests are affected by timing and whether the CPU tick counter + // is monotonically increasing. They won't work on some machines so + // leave them off by default. Feel free to enable them for your own + // testing by setting the QTEST_ENABLE_EXTRA_SELFTESTS environment + // variable to something non-empty. + if (!qgetenv("QTEST_ENABLE_EXTRA_SELFTESTS").isEmpty()) + tests << "benchlibtickcounter" + << "benchlibwalltime" + ; + foreach (LoggerSet const& loggerSet, allLoggerSets()) { QStringList loggers = loggerSet.loggers; |