aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorChristian Kandeler <christian.kandeler@qt.io>2020-08-05 11:05:00 +0200
committerChristian Kandeler <christian.kandeler@qt.io>2020-08-05 10:24:30 +0000
commit25671a60915dd8ed5f1b2e57df478803c0c0be9e (patch)
treebf931f8e46a2f54c77aab2ffd7922606bf9729bc /tests
parent37543b53cd3351c963b932fdafd6a7ea799ac1a1 (diff)
Add XFAIL-ing autotest for newly discovered bug
Task-number: QBS-1576 Change-Id: I333164e160655492c1378d96673fc8c8ab6f6330 Reviewed-by: Ivan Komissarov <ABBAPOH@gmail.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/blackbox/testdata/product-in-exported-module/modules/m/m.qbs3
-rw-r--r--tests/auto/blackbox/testdata/product-in-exported-module/product-in-exported-module.qbs10
-rw-r--r--tests/auto/blackbox/tst_blackbox.cpp8
-rw-r--r--tests/auto/blackbox/tst_blackbox.h1
4 files changed, 22 insertions, 0 deletions
diff --git a/tests/auto/blackbox/testdata/product-in-exported-module/modules/m/m.qbs b/tests/auto/blackbox/testdata/product-in-exported-module/modules/m/m.qbs
new file mode 100644
index 000000000..0e79d0abe
--- /dev/null
+++ b/tests/auto/blackbox/testdata/product-in-exported-module/modules/m/m.qbs
@@ -0,0 +1,3 @@
+Module {
+ Depends { name: "dummy"; condition: { console.info("product: " + product.name); return false; } }
+}
diff --git a/tests/auto/blackbox/testdata/product-in-exported-module/product-in-exported-module.qbs b/tests/auto/blackbox/testdata/product-in-exported-module/product-in-exported-module.qbs
new file mode 100644
index 000000000..f978aa778
--- /dev/null
+++ b/tests/auto/blackbox/testdata/product-in-exported-module/product-in-exported-module.qbs
@@ -0,0 +1,10 @@
+Project {
+ Product {
+ name: "p"
+ Depends { name: "dep" }
+ }
+ Product {
+ name: "dep"
+ Export { Depends { name: "m" } }
+ }
+}
diff --git a/tests/auto/blackbox/tst_blackbox.cpp b/tests/auto/blackbox/tst_blackbox.cpp
index 20269d25c..366a618c0 100644
--- a/tests/auto/blackbox/tst_blackbox.cpp
+++ b/tests/auto/blackbox/tst_blackbox.cpp
@@ -5691,6 +5691,14 @@ void TestBlackbox::productDependenciesByType()
QVERIFY(apps.empty());
}
+void TestBlackbox::productInExportedModule()
+{
+ QDir::setCurrent(testDataDir + "/product-in-exported-module");
+ QCOMPARE(runQbs(), 0);
+ QEXPECT_FAIL(nullptr, "QBS-1576", Abort);
+ QVERIFY2(!m_qbsStdout.contains("product: dep"), m_qbsStdout.constData());
+}
+
void TestBlackbox::properQuoting()
{
QDir::setCurrent(testDataDir + "/proper quoting");
diff --git a/tests/auto/blackbox/tst_blackbox.h b/tests/auto/blackbox/tst_blackbox.h
index e958a113c..578ccd3ad 100644
--- a/tests/auto/blackbox/tst_blackbox.h
+++ b/tests/auto/blackbox/tst_blackbox.h
@@ -242,6 +242,7 @@ private slots:
void probesAndArrayProperties();
void probesInNestedModules();
void productDependenciesByType();
+ void productInExportedModule();
void productProperties();
void propertyAssignmentOnNonPresentModule();
void propertyAssignmentInFailedModule();