diff options
author | Christian Kandeler <christian.kandeler@qt.io> | 2017-10-27 12:52:18 +0200 |
---|---|---|
committer | Christian Kandeler <christian.kandeler@qt.io> | 2017-11-02 16:29:25 +0000 |
commit | 1202dd60e6e40af9cfae7cb09c17ee418fa5ada4 (patch) | |
tree | abd28ef050b7a2db9a5da2ce0c1fed45ed2333dc /tests | |
parent | 6534ed02c9878c4fa02dea5cc646e0e7f1696cbd (diff) |
Include file dependencies in artifact rescue data
These were just getting lost. Alternatively, we could always do a re-
scan of rescued artifacts, but that would be unnecessary most of the
time, and scanning is an expensive operation.
Task-number: QBS-697
Change-Id: I49f1a7b5b5c1a1691cb9f97e553b2b1b98fab3bd
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/auto/blackbox/testdata/fileDependencies/fileDependencies.qbs | 4 | ||||
-rw-r--r-- | tests/auto/blackbox/tst_blackbox.cpp | 18 |
2 files changed, 22 insertions, 0 deletions
diff --git a/tests/auto/blackbox/testdata/fileDependencies/fileDependencies.qbs b/tests/auto/blackbox/testdata/fileDependencies/fileDependencies.qbs index 662879ccb..e99e0932c 100644 --- a/tests/auto/blackbox/testdata/fileDependencies/fileDependencies.qbs +++ b/tests/auto/blackbox/testdata/fileDependencies/fileDependencies.qbs @@ -8,6 +8,10 @@ Project { Depends { name: "cpp" } cpp.includePaths: ["awesomelib"] files: ["src/narf.h", "src/narf.cpp", "src/zort.cpp"] + // Group { + // fileTagsFilter: product.type + // qbs.install: true + // } } } diff --git a/tests/auto/blackbox/tst_blackbox.cpp b/tests/auto/blackbox/tst_blackbox.cpp index 3abd5e3b3..8869e2619 100644 --- a/tests/auto/blackbox/tst_blackbox.cpp +++ b/tests/auto/blackbox/tst_blackbox.cpp @@ -3085,6 +3085,24 @@ void TestBlackbox::fileDependencies() QCOMPARE(runQbs(), 0); QVERIFY(m_qbsStdout.contains("compiling narf.cpp")); QVERIFY(!m_qbsStdout.contains("compiling zort.cpp")); + + // Change the product in between to force the list of dependencies to get rescued. + QFile projectFile("fileDependencies.qbs"); + QVERIFY2(projectFile.open(QIODevice::ReadWrite), qPrintable(projectFile.errorString())); + QByteArray contents = projectFile.readAll(); + contents.replace("//", ""); + projectFile.resize(0); + projectFile.write(contents); + projectFile.close(); + QCOMPARE(runQbs(), 0); + QVERIFY2(m_qbsStdout.contains("Resolving"), m_qbsStdout.constData()); + QVERIFY(!m_qbsStdout.contains("compiling narf.cpp")); + QVERIFY(!m_qbsStdout.contains("compiling zort.cpp")); + WAIT_FOR_NEW_TIMESTAMP(); + touch("awesomelib/magnificent.h"); + QCOMPARE(runQbs(), 0); + QVERIFY(m_qbsStdout.contains("compiling narf.cpp")); + QVERIFY(!m_qbsStdout.contains("compiling zort.cpp")); } void TestBlackbox::installedTransformerOutput() |