diff options
-rw-r--r-- | src/lib/corelib/buildgraph/executor.cpp | 9 | ||||
-rw-r--r-- | tests/auto/blackbox/tst_blackbox.cpp | 1 |
2 files changed, 5 insertions, 5 deletions
diff --git a/src/lib/corelib/buildgraph/executor.cpp b/src/lib/corelib/buildgraph/executor.cpp index 5c6376658..832d0f5e1 100644 --- a/src/lib/corelib/buildgraph/executor.cpp +++ b/src/lib/corelib/buildgraph/executor.cpp @@ -116,12 +116,13 @@ void Executor::retrieveSourceFileTimestamp(Artifact *artifact) const { QBS_CHECK(artifact->artifactType == Artifact::SourceFile); - if (m_buildOptions.changedFiles().contains(artifact->filePath())) + if (m_buildOptions.changedFiles().isEmpty()) + artifact->setTimestamp(recursiveFileTime(artifact->filePath())); + else if (m_buildOptions.changedFiles().contains(artifact->filePath())) artifact->setTimestamp(FileTime::currentTime()); - else if (m_buildOptions.changedFiles().isEmpty()) + else if (!artifact->timestamp().isValid()) artifact->setTimestamp(recursiveFileTime(artifact->filePath())); - else - artifact->setTimestamp(FileTime::oldestTime()); + artifact->timestampRetrieved = true; } diff --git a/tests/auto/blackbox/tst_blackbox.cpp b/tests/auto/blackbox/tst_blackbox.cpp index 452e7759b..100ad4d04 100644 --- a/tests/auto/blackbox/tst_blackbox.cpp +++ b/tests/auto/blackbox/tst_blackbox.cpp @@ -416,7 +416,6 @@ void TestBlackbox::changedFiles() QbsRunParameters params2(QStringList("--changed-files") << changedFile); QCOMPARE(runQbs(params2), 0); QCOMPARE(m_qbsStdout.count("compiling"), 1); - QEXPECT_FAIL("initial build without changed files", "QBS-660", Continue); QCOMPARE(m_qbsStdout.count("creating"), 1); QVERIFY2(m_qbsStdout.contains("file1.cpp"), m_qbsStdout.constData()); } |