aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristian Kandeler <christian.kandeler@qt.io>2016-11-17 17:49:54 +0100
committerChristian Kandeler <christian.kandeler@qt.io>2016-11-17 17:50:08 +0100
commitef4e2c97997e9ea32344841a17a830e937769cb3 (patch)
treecf8e6f856c43647f55e9db1102b1378a93e0dc94
parent0e1f1c909ada3f1cc423b6e7f31ab1a50a22e5df (diff)
parent0649b77b020b02436a843ee72a5941f2f875c846 (diff)
Merge 1.6 into 1.7
-rw-r--r--src/lib/corelib/buildgraph/executor.cpp2
-rw-r--r--tests/auto/blackbox/testdata/generated-artifact-as-input-to-dynamic-rule/p.qbs9
-rw-r--r--tests/auto/blackbox/tst_blackbox.cpp3
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)