summaryrefslogtreecommitdiffstats
path: root/tests/auto/testlib/selftests/tst_selftests.cpp
diff options
context:
space:
mode:
authorEdward Welbourne <edward.welbourne@qt.io>2018-10-15 19:48:13 +0200
committerEdward Welbourne <edward.welbourne@qt.io>2018-11-01 15:06:08 +0000
commitb22e50acda53d32f5df12a8567a0c5f206e203ad (patch)
treef791e4eb3b77d9cb04b52cd177547e4ac6ad12ef /tests/auto/testlib/selftests/tst_selftests.cpp
parent30101884a6f3ab2f3d4d11426373eca3fca10652 (diff)
generate_expected_output.py: match tst_selftest's test environments
The testlib selftest sets various things in the environment for crashing tests; the generator for its expected output should set the same things, as they affect what output is produced. Change-Id: Iec2ed59982ea1043582573530c33619d8e8ed08e Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@qt.io>
Diffstat (limited to 'tests/auto/testlib/selftests/tst_selftests.cpp')
-rw-r--r--tests/auto/testlib/selftests/tst_selftests.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/tests/auto/testlib/selftests/tst_selftests.cpp b/tests/auto/testlib/selftests/tst_selftests.cpp
index 2d3cfaf176..008cce6218 100644
--- a/tests/auto/testlib/selftests/tst_selftests.cpp
+++ b/tests/auto/testlib/selftests/tst_selftests.cpp
@@ -520,6 +520,7 @@ void tst_Selftests::runSubTest_data()
foreach (QString const& subtest, tests) {
QStringList arguments = loggerSet.arguments;
+ // Keep in sync with generateTestData()'s extraArgs in generate_expected_output.py:
if (subtest == "commandlinedata") {
arguments << QString("fiveTablePasses fiveTablePasses:fiveTablePasses_data1 -v2").split(' ');
}
@@ -612,6 +613,7 @@ void tst_Selftests::runSubTest_data()
if (loggerSet.name.contains("teamcity") && subtest.startsWith("benchlib"))
continue; // Skip benchmark for TeamCity logger
+ // Keep in sync with generateTestData()'s crashers in generate_expected_output.py:
const bool crashes = subtest == QLatin1String("assert") || subtest == QLatin1String("exceptionthrow")
|| subtest == QLatin1String("fetchbogus") || subtest == QLatin1String("crashedterminate")
|| subtest == QLatin1String("crashes") || subtest == QLatin1String("silent")
@@ -687,6 +689,7 @@ void tst_Selftests::doRunSubTest(QString const& subdir, QStringList const& logge
QProcess proc;
QProcessEnvironment environment = processEnvironment();
+ // Keep in sync with generateTestData()'s extraEnv in generate_expected_output.py:
if (crashes) {
environment.insert("QTEST_DISABLE_CORE_DUMP", "1");
environment.insert("QTEST_DISABLE_STACK_DUMP", "1");