aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto')
-rw-r--r--tests/auto/blackbox/testdata/disable-product/project.qbs5
-rw-r--r--tests/auto/blackbox/testdata/exportSimple/project.qbs4
-rw-r--r--tests/auto/blackbox/tst_blackbox.cpp15
-rw-r--r--tests/auto/blackbox/tst_blackbox.h1
4 files changed, 25 insertions, 0 deletions
diff --git a/tests/auto/blackbox/testdata/disable-product/project.qbs b/tests/auto/blackbox/testdata/disable-product/project.qbs
new file mode 100644
index 000000000..3aa7afd50
--- /dev/null
+++ b/tests/auto/blackbox/testdata/disable-product/project.qbs
@@ -0,0 +1,5 @@
+import qbs
+
+Product {
+ // condition: false
+}
diff --git a/tests/auto/blackbox/testdata/exportSimple/project.qbs b/tests/auto/blackbox/testdata/exportSimple/project.qbs
index 1b665b880..96244671a 100644
--- a/tests/auto/blackbox/testdata/exportSimple/project.qbs
+++ b/tests/auto/blackbox/testdata/exportSimple/project.qbs
@@ -19,6 +19,10 @@ Project {
}
Export {
Depends { name: 'dummy2' }
+ Properties { // QBS-550
+ condition: false
+ qbs.optimization: "ludicrous speed"
+ }
}
}
diff --git a/tests/auto/blackbox/tst_blackbox.cpp b/tests/auto/blackbox/tst_blackbox.cpp
index df5d8143b..c2eba5608 100644
--- a/tests/auto/blackbox/tst_blackbox.cpp
+++ b/tests/auto/blackbox/tst_blackbox.cpp
@@ -1429,6 +1429,21 @@ void TestBlackbox::disabledProject()
QCOMPARE(runQbs(), 0);
}
+void TestBlackbox::disableProduct()
+{
+ QDir::setCurrent(testDataDir + "/disable-product");
+ QCOMPARE(runQbs(), 0);
+ waitForNewTimestamp();
+ QFile projectFile("project.qbs");
+ QVERIFY(projectFile.open(QIODevice::ReadWrite));
+ QByteArray content = projectFile.readAll();
+ content.replace("// condition: false", "condition: false");
+ projectFile.resize(0);
+ projectFile.write(content);
+ projectFile.close();
+ QCOMPARE(runQbs(), 0);
+}
+
void TestBlackbox::duplicateProductNames()
{
QDir::setCurrent(testDataDir + "/duplicateProductNames");
diff --git a/tests/auto/blackbox/tst_blackbox.h b/tests/auto/blackbox/tst_blackbox.h
index 6bc2e2fe3..7bf47e2c7 100644
--- a/tests/auto/blackbox/tst_blackbox.h
+++ b/tests/auto/blackbox/tst_blackbox.h
@@ -108,6 +108,7 @@ private slots:
void dependenciesProperty();
void disabledProduct();
void disabledProject();
+ void disableProduct();
void duplicateProductNames();
void duplicateProductNames_data();
void dynamicLibs();