diff options
author | Jake Petroules <jake.petroules@qt.io> | 2017-11-12 20:07:14 -0800 |
---|---|---|
committer | Jake Petroules <jake.petroules@qt.io> | 2017-11-15 11:55:46 +0000 |
commit | 6e9ac907c5427fdf5f764a5736e9edf4db8d49d2 (patch) | |
tree | 8a18c782471bafb70a5401f3beb4d9aca2168bde /tests/auto/shared.h | |
parent | b5613da1391789fe661063ab9d30850aa96efd59 (diff) |
Allow overriding the autotest profile for each test suite individually
For example, this allows a Qt profile to be set only for the Qt test
suite, which avoids default profile properties "polluting" the results
of other test suites.
Change-Id: Ie6eb7131a9ce6b90c21b4e33e41f8f32df0e01e8
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Diffstat (limited to 'tests/auto/shared.h')
-rw-r--r-- | tests/auto/shared.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/auto/shared.h b/tests/auto/shared.h index 24bfc1e68..60bb3f64d 100644 --- a/tests/auto/shared.h +++ b/tests/auto/shared.h @@ -62,6 +62,10 @@ inline SettingsPtr settings() inline QString profileName() { + const QString suiteProfile = QLatin1String( + qgetenv("QBS_AUTOTEST_PROFILE_" QBS_TEST_SUITE_NAME)); + if (!suiteProfile.isEmpty()) + return suiteProfile; const QString profile = QLatin1String(qgetenv("QBS_AUTOTEST_PROFILE")); return !profile.isEmpty() ? profile : QLatin1String("none"); } |