Allow extra selftests without modifying source.

Change-Id: I21708b725611eb64bdb0414cee08ca00dd62b213
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
This commit is contained in:
Jason McDonald 2011-10-28 18:19:05 +10:00 committed by Qt by Nokia
parent 9022f42a4f
commit 8cb52795f1

View File

@ -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;