diff options
author | Christian Kandeler <christian.kandeler@qt.io> | 2017-06-27 16:13:03 +0200 |
---|---|---|
committer | Christian Kandeler <christian.kandeler@qt.io> | 2017-06-30 07:48:59 +0000 |
commit | 7d0d9705ba4fb8e9813bbf425c10596d306f53c2 (patch) | |
tree | db1499e230d805682dad01ea23f329fbfef7810e /tests | |
parent | 6c221de960faa83f0c1769435aef4aed63391b98 (diff) |
Add product dependencies to ResolvedProduct::modules
Otherwise, Export items would not be first class modules, because their
properties would not be available in the depending products.
Change-Id: Ieb50ffdf2a8c8b37408278f71d8ddfb058bf1bef
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/auto/blackbox/testdata/export-rule/export-rule.qbs | 7 | ||||
-rw-r--r-- | tests/auto/blackbox/tst_blackbox.cpp | 10 |
2 files changed, 14 insertions, 3 deletions
diff --git a/tests/auto/blackbox/testdata/export-rule/export-rule.qbs b/tests/auto/blackbox/testdata/export-rule/export-rule.qbs index 51dd787a4..0b1f9f99b 100644 --- a/tests/auto/blackbox/testdata/export-rule/export-rule.qbs +++ b/tests/auto/blackbox/testdata/export-rule/export-rule.qbs @@ -6,14 +6,17 @@ Project { name: "MyApp" files: ["myapp.blubb"] Depends { name: "blubber" } - Depends { name: "cpp" } } StaticLibrary { name: "blubber" files: ["blubber.cpp"] Depends { name: "cpp" } Export { + Depends { name: "cpp" } + property bool enableTagger + property string description: "Creating C++ source file."; FileTagger { + condition: enableTagger patterns: ["*.blubb"] fileTags: ["blubb"] } @@ -25,7 +28,7 @@ Project { } prepare: { var cmd = new JavaScriptCommand(); - cmd.description = "Creating C++ source file."; + cmd.description = product.blubber.description; cmd.sourceCode = function() { File.copy(input.filePath, output.filePath); } diff --git a/tests/auto/blackbox/tst_blackbox.cpp b/tests/auto/blackbox/tst_blackbox.cpp index 5f479ad36..0bdb9c81f 100644 --- a/tests/auto/blackbox/tst_blackbox.cpp +++ b/tests/auto/blackbox/tst_blackbox.cpp @@ -2534,8 +2534,16 @@ void TestBlackbox::systemRunPaths_data() void TestBlackbox::exportRule() { QDir::setCurrent(testDataDir + "/export-rule"); - QbsRunParameters params; + QbsRunParameters params(QStringList{"modules.blubber.enableTagger:false"}); + params.expectFailure = true; + QVERIFY(runQbs(params) != 0); + params.command = "resolve"; + params.arguments = QStringList{"modules.blubber.enableTagger:true"}; + params.expectFailure = false; QCOMPARE(runQbs(params), 0); + QCOMPARE(runQbs(), 0); + QVERIFY2(m_qbsStdout.contains("Creating C++ source file"), m_qbsStdout.constData()); + QVERIFY2(m_qbsStdout.contains("compiling myapp.cpp"), m_qbsStdout.constData()); } void TestBlackbox::exportToOutsideSearchPath() |