aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoerg Bornemann <joerg.bornemann@digia.com>2014-05-19 16:28:10 +0200
committerJoerg Bornemann <joerg.bornemann@digia.com>2014-05-21 09:46:21 +0200
commitb0ff4c93ff290b492305e269dfa8e3ab5fba33e4 (patch)
tree980da9021d0954d6567ef96b214a1f245b67ec72
parent44518d22d75a4772ba9a3d838b84051c4ebb35ea (diff)
pass file dependencies to recursive dependency scanners
Recursive dependency scanners, like the C include file scanner, must be fed with file dependencies they've found. Task-number: QBS-566 Change-Id: I68a8e4a5cbb771ed2785ca69412a3b4c4e280eb2 Reviewed-by: Christian Kandeler <christian.kandeler@digia.com>
-rw-r--r--src/lib/corelib/buildgraph/inputartifactscanner.cpp18
-rw-r--r--tests/auto/blackbox/tst_blackbox.cpp1
2 files changed, 11 insertions, 8 deletions
diff --git a/src/lib/corelib/buildgraph/inputartifactscanner.cpp b/src/lib/corelib/buildgraph/inputartifactscanner.cpp
index b9fb6fea5..0f6161235 100644
--- a/src/lib/corelib/buildgraph/inputartifactscanner.cpp
+++ b/src/lib/corelib/buildgraph/inputartifactscanner.cpp
@@ -311,14 +311,18 @@ unresolved:
continue;
resolved:
- // Do not scan artifacts that are being built. Otherwise we might read an incomplete
- // file or conflict with the writing process.
- if (artifactsToScan) {
- Artifact *artifactDependency = dynamic_cast<Artifact *>(resolvedDependency->file);
- if (artifactDependency && artifactDependency->buildState != BuildGraphNode::Building)
- artifactsToScan->append(artifactDependency);
- }
handleDependency(*resolvedDependency);
+ if (artifactsToScan && resolvedDependency->file) {
+ if (Artifact *artifactDependency = dynamic_cast<Artifact *>(resolvedDependency->file)) {
+ // Do not scan artifacts that are being built. Otherwise we might read an incomplete
+ // file or conflict with the writing process.
+ if (artifactDependency->buildState != BuildGraphNode::Building)
+ artifactsToScan->append(artifactDependency);
+ } else {
+ // Add file dependency to the next round of scanning.
+ artifactsToScan->append(resolvedDependency->file);
+ }
+ }
}
}
diff --git a/tests/auto/blackbox/tst_blackbox.cpp b/tests/auto/blackbox/tst_blackbox.cpp
index 51ac5121b..cc68a57d4 100644
--- a/tests/auto/blackbox/tst_blackbox.cpp
+++ b/tests/auto/blackbox/tst_blackbox.cpp
@@ -1560,7 +1560,6 @@ void TestBlackbox::fileDependencies()
waitForNewTimestamp();
touch("awesomelib/magnificent.h");
QCOMPARE(runQbs(), 0);
- QEXPECT_FAIL("", "QBS-566", Abort);
QVERIFY(m_qbsStdout.contains("compiling narf.cpp"));
QVERIFY(!m_qbsStdout.contains("compiling zort.cpp"));
}