aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJake Petroules <jake.petroules@petroules.com>2015-06-11 00:18:06 -0700
committerChristian Kandeler <christian.kandeler@theqtcompany.com>2015-06-11 10:06:35 +0000
commit2023fa30855db6cbfc2af63f328c3383698f31c8 (patch)
tree3b2ed284efc946089ea6838e5d5c37b01c023eef
parentdc130cbafd7ce135da0a1e59332c428a487dad41 (diff)
Add failing autotest for broken Depends.required property.
Task-number: QBS-821 Change-Id: Ib0dc87e7f4098a69a81e397fc17b794b3eea642f Reviewed-by: Christian Kandeler <christian.kandeler@theqtcompany.com>
-rw-r--r--tests/auto/blackbox/testdata/transitive-optional-dependencies/modules/a/a.qbs5
-rw-r--r--tests/auto/blackbox/testdata/transitive-optional-dependencies/modules/b/b.qbs5
-rw-r--r--tests/auto/blackbox/testdata/transitive-optional-dependencies/transitive-optional-dependencies.qbs5
-rw-r--r--tests/auto/blackbox/tst_blackbox.cpp9
-rw-r--r--tests/auto/blackbox/tst_blackbox.h1
5 files changed, 25 insertions, 0 deletions
diff --git a/tests/auto/blackbox/testdata/transitive-optional-dependencies/modules/a/a.qbs b/tests/auto/blackbox/testdata/transitive-optional-dependencies/modules/a/a.qbs
new file mode 100644
index 000000000..adec14e41
--- /dev/null
+++ b/tests/auto/blackbox/testdata/transitive-optional-dependencies/modules/a/a.qbs
@@ -0,0 +1,5 @@
+import qbs
+
+Module {
+ Depends { name: "b"; required: false }
+}
diff --git a/tests/auto/blackbox/testdata/transitive-optional-dependencies/modules/b/b.qbs b/tests/auto/blackbox/testdata/transitive-optional-dependencies/modules/b/b.qbs
new file mode 100644
index 000000000..fb38b600a
--- /dev/null
+++ b/tests/auto/blackbox/testdata/transitive-optional-dependencies/modules/b/b.qbs
@@ -0,0 +1,5 @@
+import qbs
+
+Module {
+ condition: false
+}
diff --git a/tests/auto/blackbox/testdata/transitive-optional-dependencies/transitive-optional-dependencies.qbs b/tests/auto/blackbox/testdata/transitive-optional-dependencies/transitive-optional-dependencies.qbs
new file mode 100644
index 000000000..08860b057
--- /dev/null
+++ b/tests/auto/blackbox/testdata/transitive-optional-dependencies/transitive-optional-dependencies.qbs
@@ -0,0 +1,5 @@
+import qbs
+
+Product {
+ Depends { name: "a" }
+}
diff --git a/tests/auto/blackbox/tst_blackbox.cpp b/tests/auto/blackbox/tst_blackbox.cpp
index 9f9d18991..2eb20ef4e 100644
--- a/tests/auto/blackbox/tst_blackbox.cpp
+++ b/tests/auto/blackbox/tst_blackbox.cpp
@@ -2652,4 +2652,13 @@ void TestBlackbox::qbsVersion()
QVERIFY(runQbs(params) != 0);
}
+void TestBlackbox::transitiveOptionalDependencies()
+{
+ QDir::setCurrent(testDataDir + "/transitive-optional-dependencies");
+ QbsRunParameters params;
+ params.expectFailure = true;
+ QEXPECT_FAIL(0, "QBS-821", Continue);
+ QCOMPARE(runQbs(params), 0);
+}
+
QTEST_MAIN(TestBlackbox)
diff --git a/tests/auto/blackbox/tst_blackbox.h b/tests/auto/blackbox/tst_blackbox.h
index 8c45b7086..fbac9bd19 100644
--- a/tests/auto/blackbox/tst_blackbox.h
+++ b/tests/auto/blackbox/tst_blackbox.h
@@ -177,6 +177,7 @@ private slots:
void testLoadableModule();
void testBadInterpreter();
void qbsVersion();
+ void transitiveOptionalDependencies();
private:
QByteArray m_qbsStderr;