summaryrefslogtreecommitdiff
path: root/tests/auto/blackbox/tst_blackbox.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/blackbox/tst_blackbox.cpp')
-rw-r--r--tests/auto/blackbox/tst_blackbox.cpp29
1 files changed, 29 insertions, 0 deletions
diff --git a/tests/auto/blackbox/tst_blackbox.cpp b/tests/auto/blackbox/tst_blackbox.cpp
index 8ef77c9b4..6ace7e674 100644
--- a/tests/auto/blackbox/tst_blackbox.cpp
+++ b/tests/auto/blackbox/tst_blackbox.cpp
@@ -3910,6 +3910,35 @@ void TestBlackbox::multipleChanges()
QVERIFY(m_qbsStdout.contains("prop: true"));
}
+void TestBlackbox::multipleConfigurations()
+{
+ QDir::setCurrent(testDataDir + "/multiple-configurations");
+ QbsRunParameters params(QStringList{"config:x", "config:y", "config:z"});
+ params.profile.clear();
+ struct DefaultProfileSwitcher
+ {
+ DefaultProfileSwitcher()
+ {
+ const SettingsPtr s = settings();
+ oldDefaultProfile = s->defaultProfile();
+ s->setValue("defaultProfile", profileName());
+ s->sync();
+ }
+ ~DefaultProfileSwitcher()
+ {
+ const SettingsPtr s = settings();
+ s->setValue("defaultProfile", oldDefaultProfile);
+ s->sync();
+ }
+ QVariant oldDefaultProfile;
+ };
+ DefaultProfileSwitcher dps;
+ QCOMPARE(runQbs(params), 0);
+ QCOMPARE(m_qbsStdout.count("compiling lib.cpp"), 3);
+ QCOMPARE(m_qbsStdout.count("compiling file.cpp"), 3);
+ QCOMPARE(m_qbsStdout.count("compiling main.cpp"), 3);
+}
+
void TestBlackbox::nestedGroups()
{
QDir::setCurrent(testDataDir + "/nested-groups");