From 25671a60915dd8ed5f1b2e57df478803c0c0be9e Mon Sep 17 00:00:00 2001 From: Christian Kandeler Date: Wed, 5 Aug 2020 11:05:00 +0200 Subject: Add XFAIL-ing autotest for newly discovered bug Task-number: QBS-1576 Change-Id: I333164e160655492c1378d96673fc8c8ab6f6330 Reviewed-by: Ivan Komissarov --- .../testdata/product-in-exported-module/modules/m/m.qbs | 3 +++ .../product-in-exported-module/product-in-exported-module.qbs | 10 ++++++++++ tests/auto/blackbox/tst_blackbox.cpp | 8 ++++++++ tests/auto/blackbox/tst_blackbox.h | 1 + 4 files changed, 22 insertions(+) create mode 100644 tests/auto/blackbox/testdata/product-in-exported-module/modules/m/m.qbs create mode 100644 tests/auto/blackbox/testdata/product-in-exported-module/product-in-exported-module.qbs 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(); -- cgit v1.2.3