diff options
author | Christian Kandeler <christian.kandeler@qt.io> | 2016-11-18 10:21:59 +0000 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2016-11-18 10:21:59 +0000 |
commit | f3b97c9edf747d47a0783f9b450ac0df987a0318 (patch) | |
tree | 97093b605ffd482e217db337cb342df1cfba99eb | |
parent | 010cfb45a26646ce2858146613e14e50048ac2ed (diff) | |
parent | ef4e2c97997e9ea32344841a17a830e937769cb3 (diff) |
Merge "Merge 1.6 into 1.7" into 1.7
-rw-r--r-- | src/lib/corelib/buildgraph/executor.cpp | 2 | ||||
-rw-r--r-- | tests/auto/blackbox/testdata/generated-artifact-as-input-to-dynamic-rule/p.qbs | 9 | ||||
-rw-r--r-- | tests/auto/blackbox/tst_blackbox.cpp | 3 |
3 files changed, 12 insertions, 2 deletions
diff --git a/src/lib/corelib/buildgraph/executor.cpp b/src/lib/corelib/buildgraph/executor.cpp index 36e81ac56..946af9044 100644 --- a/src/lib/corelib/buildgraph/executor.cpp +++ b/src/lib/corelib/buildgraph/executor.cpp @@ -468,6 +468,8 @@ void Executor::executeRuleNode(RuleNode *ruleNode) for (const Artifact * const parent : artifact->parentArtifacts()) { if (parent->transformer->rule != ruleNode->rule()) continue; + if (!parent->alwaysUpdated) + continue; if (parent->timestamp() < artifact->timestamp()) { changedInputArtifacts += artifact; break; diff --git a/tests/auto/blackbox/testdata/generated-artifact-as-input-to-dynamic-rule/p.qbs b/tests/auto/blackbox/testdata/generated-artifact-as-input-to-dynamic-rule/p.qbs index 725966c3b..f26d92262 100644 --- a/tests/auto/blackbox/testdata/generated-artifact-as-input-to-dynamic-rule/p.qbs +++ b/tests/auto/blackbox/testdata/generated-artifact-as-input-to-dynamic-rule/p.qbs @@ -26,7 +26,7 @@ Product { Rule { inputs: ["mytype.out"] - outputFileTags: ["mytype.final"] + outputFileTags: ["mytype.final", "dummy"] outputArtifacts: { var file; var inFile = new TextFile(input.filePath, TextFile.ReadOnly); @@ -37,11 +37,16 @@ Product { } finally { inFile.close(); } - return [{ filePath: file, fileTags: ["mytype.final"] }]; + return [ + { filePath: file, fileTags: ["mytype.final"] }, + { filePath: "dummy", fileTags: ["dummy"], alwaysUpdated: false } + ]; } prepare: { var cmd = new JavaScriptCommand(); + var output = outputs["mytype.final"][0]; cmd.description = "generating " + output.fileName; + cmd.output = output; cmd.sourceCode = function() { File.copy(input.filePath, output.filePath); }; return [cmd]; } diff --git a/tests/auto/blackbox/tst_blackbox.cpp b/tests/auto/blackbox/tst_blackbox.cpp index a448cc5ed..c885bec4f 100644 --- a/tests/auto/blackbox/tst_blackbox.cpp +++ b/tests/auto/blackbox/tst_blackbox.cpp @@ -3806,6 +3806,9 @@ void TestBlackbox::generatedArtifactAsInputToDynamicRule() QVERIFY2(!regularFileExists(oldFile), qPrintable(oldFile)); const QString newFile = relativeProductBuildDir("p") + "/new.txt"; QVERIFY2(regularFileExists(newFile), qPrintable(oldFile)); + QVERIFY2(m_qbsStdout.contains("generating"), m_qbsStdout.constData()); + QCOMPARE(runQbs(), 0); + QVERIFY2(!m_qbsStdout.contains("generating"), m_qbsStdout.constData()); } static bool haveWiX(const Profile &profile) |