aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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"));
}