summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Kandeler <christian.kandeler@theqtcompany.com>2015-01-15 11:26:07 +0100
committerJoerg Bornemann <joerg.bornemann@theqtcompany.com>2015-01-15 11:28:32 +0100
commitcdebe9ded4fb0703595b350db97b345705b875be (patch)
treecbe7d55451fe81957ec8cbefeecbb274fb5d421b
parentd8a90f254e37cd40cc2a684e584a579689a4fb16 (diff)
downloadqbs-cdebe9ded4fb0703595b350db97b345705b875be.tar.gz
Add XFAIL-ing autotest for bug.
Task-number: QBS-726 Change-Id: Ie4f3bce7a32b556058f01470b1a272ead528a30a Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
-rw-r--r--tests/auto/blackbox/testdata/nested-properties/dummy.txt0
-rw-r--r--tests/auto/blackbox/testdata/nested-properties/modules/higherlevel/higher-level.qbs6
-rw-r--r--tests/auto/blackbox/testdata/nested-properties/modules/lowerlevel/lower-level.qbs20
-rw-r--r--tests/auto/blackbox/testdata/nested-properties/product.qbs10
-rw-r--r--tests/auto/blackbox/tst_blackbox.cpp8
-rw-r--r--tests/auto/blackbox/tst_blackbox.h1
6 files changed, 45 insertions, 0 deletions
diff --git a/tests/auto/blackbox/testdata/nested-properties/dummy.txt b/tests/auto/blackbox/testdata/nested-properties/dummy.txt
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/tests/auto/blackbox/testdata/nested-properties/dummy.txt
diff --git a/tests/auto/blackbox/testdata/nested-properties/modules/higherlevel/higher-level.qbs b/tests/auto/blackbox/testdata/nested-properties/modules/higherlevel/higher-level.qbs
new file mode 100644
index 000000000..b6da4e030
--- /dev/null
+++ b/tests/auto/blackbox/testdata/nested-properties/modules/higherlevel/higher-level.qbs
@@ -0,0 +1,6 @@
+import qbs
+
+Module {
+ Depends { name: "lowerlevel" }
+ lowerlevel.prop: "value in higherlevel"
+}
diff --git a/tests/auto/blackbox/testdata/nested-properties/modules/lowerlevel/lower-level.qbs b/tests/auto/blackbox/testdata/nested-properties/modules/lowerlevel/lower-level.qbs
new file mode 100644
index 000000000..dfebb247b
--- /dev/null
+++ b/tests/auto/blackbox/testdata/nested-properties/modules/lowerlevel/lower-level.qbs
@@ -0,0 +1,20 @@
+import qbs
+
+Module {
+ property string prop: "value in lowerlevel module"
+ Rule {
+ inputs: ["dummy-input"]
+ Artifact {
+ filePath: "dummy.out"
+ fileTags: "mytype"
+ }
+ prepare: {
+ var cmd = new JavaScriptCommand();
+ cmd.sourceCode = function() { };
+ var prop = product.moduleProperty("lowerlevel", "prop");
+ var listProp = product.moduleProperties("lowerlevel", "listProp");
+ cmd.description = "lowerlevel.prop is '" + prop + "'.";
+ return [cmd];
+ }
+ }
+}
diff --git a/tests/auto/blackbox/testdata/nested-properties/product.qbs b/tests/auto/blackbox/testdata/nested-properties/product.qbs
new file mode 100644
index 000000000..b2356599d
--- /dev/null
+++ b/tests/auto/blackbox/testdata/nested-properties/product.qbs
@@ -0,0 +1,10 @@
+import qbs
+
+Product {
+ type: "mytype"
+ Depends { name: "higherlevel" }
+ Group {
+ files: ["dummy.txt"]
+ fileTags: ["dummy-input"]
+ }
+}
diff --git a/tests/auto/blackbox/tst_blackbox.cpp b/tests/auto/blackbox/tst_blackbox.cpp
index 49012c9d8..2c499ebcb 100644
--- a/tests/auto/blackbox/tst_blackbox.cpp
+++ b/tests/auto/blackbox/tst_blackbox.cpp
@@ -1898,6 +1898,14 @@ void TestBlackbox::mocCppIncluded()
QCOMPARE(runQbs(), 0);
}
+void TestBlackbox::nestedProperties()
+{
+ QDir::setCurrent(testDataDir + "/nested-properties");
+ QCOMPARE(runQbs(), 0);
+ QEXPECT_FAIL(0, "QBS-726", Abort);
+ QVERIFY2(m_qbsStdout.contains("value in higherlevel"), m_qbsStdout.constData());
+}
+
void TestBlackbox::newOutputArtifactInDependency()
{
QDir::setCurrent(testDataDir + "/new-output-artifact-in-dependency");
diff --git a/tests/auto/blackbox/tst_blackbox.h b/tests/auto/blackbox/tst_blackbox.h
index 5c9c6fe8a..7ab4d71ae 100644
--- a/tests/auto/blackbox/tst_blackbox.h
+++ b/tests/auto/blackbox/tst_blackbox.h
@@ -131,6 +131,7 @@ private slots:
void inheritQbsSearchPaths();
void mixedBuildVariants();
void mocCppIncluded();
+ void nestedProperties();
void newOutputArtifactInDependency();
void newPatternMatch();
void nonBrokenFilesInBrokenProduct();