aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorJoerg Bornemann <joerg.bornemann@qt.io>2017-06-23 12:23:38 +0200
committerJoerg Bornemann <joerg.bornemann@qt.io>2017-06-26 07:28:09 +0000
commit3a01ca5fc926faeb08a4a2734f5cf45835dd2014 (patch)
tree72578352a6e094939505fb12da479ce164856fc9 /tests
parentb20130e3975195c30bf05ef972766d9c2e6a896b (diff)
Add XFAIL-ing autotest for newly discovered bug
Change-Id: I3d3c21c5cedf62e650ee8238acf6495746b1fb9d Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/language/testdata/conditionaldepends.qbs11
-rw-r--r--tests/auto/language/testdata/modules/dummy3/dummy3.qbs4
-rw-r--r--tests/auto/language/tst_language.cpp15
3 files changed, 30 insertions, 0 deletions
diff --git a/tests/auto/language/testdata/conditionaldepends.qbs b/tests/auto/language/testdata/conditionaldepends.qbs
index 8ad3660ec..263237030 100644
--- a/tests/auto/language/testdata/conditionaldepends.qbs
+++ b/tests/auto/language/testdata/conditionaldepends.qbs
@@ -49,6 +49,17 @@ Project {
}
Product {
+ name: "multilevel_module_props_true"
+ Depends { name: "dummy3" }
+ dummy3.loadDummy: true
+ }
+
+ Product {
+ name: "multilevel_module_props_false"
+ Depends { name: "dummy3" }
+ }
+
+ Product {
name: "contradictory_conditions1"
Depends { condition: false; name: "dummy" }
Depends { condition: true; name: "dummy" } // this one wins
diff --git a/tests/auto/language/testdata/modules/dummy3/dummy3.qbs b/tests/auto/language/testdata/modules/dummy3/dummy3.qbs
new file mode 100644
index 000000000..c7451693f
--- /dev/null
+++ b/tests/auto/language/testdata/modules/dummy3/dummy3.qbs
@@ -0,0 +1,4 @@
+Module {
+ property bool loadDummy: false
+ Depends { name: "dummy"; condition: loadDummy }
+}
diff --git a/tests/auto/language/tst_language.cpp b/tests/auto/language/tst_language.cpp
index 3b076032c..702621871 100644
--- a/tests/auto/language/tst_language.cpp
+++ b/tests/auto/language/tst_language.cpp
@@ -371,6 +371,21 @@ void TestLanguage::conditionalDepends()
dependency = findModuleByName(product, "dummy");
QCOMPARE(dependency, ResolvedModuleConstPtr());
+ product = products.value("multilevel_module_props_true");
+ QVERIFY(!!product);
+ dependency = findModuleByName(product, "dummy3");
+ QVERIFY(!!dependency);
+ dependency = findModuleByName(product, "dummy");
+ QEXPECT_FAIL("", "This is broken. Sad!", Continue);
+ QVERIFY(!!dependency);
+
+ product = products.value("multilevel_module_props_false");
+ QVERIFY(!!product);
+ dependency = findModuleByName(product, "dummy3");
+ QVERIFY(!!dependency);
+ dependency = findModuleByName(product, "dummy");
+ QCOMPARE(dependency, ResolvedModuleConstPtr());
+
product = products.value("contradictory_conditions1");
QVERIFY(!!product);
dependency = findModuleByName(product, "dummy");