diff options
author | Joerg Bornemann <joerg.bornemann@digia.com> | 2014-08-06 14:22:30 +0200 |
---|---|---|
committer | Joerg Bornemann <joerg.bornemann@digia.com> | 2014-08-06 18:27:17 +0200 |
commit | 6e84baa18751ac972a4e5c5300b48707f90057f9 (patch) | |
tree | 37e9ab247d4c621ad959247acd9b503881fe805d | |
parent | 3871bb116d893c5bd405c32217aceaf8824d9bbc (diff) |
fix --changed-files functionality
Task-number: QBS-660
Change-Id: I6cc960c358b23a6ee38f2533334ca2c7cd8cdf33
Reviewed-by: Christian Kandeler <christian.kandeler@digia.com>
-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()); } |