diff options
author | Joerg Bornemann <joerg.bornemann@digia.com> | 2014-07-16 18:50:45 +0200 |
---|---|---|
committer | Joerg Bornemann <joerg.bornemann@digia.com> | 2014-07-18 10:57:50 +0200 |
commit | dce309bf4e18cc20f3f9b03fbd33f63f5c60d025 (patch) | |
tree | 117edb10fc3dd42b4a4b6591c23897589669f9c9 /tests/auto/blackbox/tst_blackbox.cpp | |
parent | bbdf9592d14dfb9cc771e0fed4881428830d916f (diff) |
invalidate artifacts if a dependency is removed
Artifacts must be invalidated if a dependency is removed.
Consider a foo.cpp that includes bar.h. If bar.h is removed from the
project, then we must recompile foo.cpp to trigger the compile error
that stems from the wrong include.
Change-Id: Ifc2bc3085be553f87685a17c5ff05273daa6579c
Task-number: QBS-631
Reviewed-by: Christian Kandeler <christian.kandeler@digia.com>
Diffstat (limited to 'tests/auto/blackbox/tst_blackbox.cpp')
-rw-r--r-- | tests/auto/blackbox/tst_blackbox.cpp | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/tests/auto/blackbox/tst_blackbox.cpp b/tests/auto/blackbox/tst_blackbox.cpp index f998f8b95..30cf99cd1 100644 --- a/tests/auto/blackbox/tst_blackbox.cpp +++ b/tests/auto/blackbox/tst_blackbox.cpp @@ -662,6 +662,26 @@ void TestBlackbox::rc() QCOMPARE(rcFileWasCompiled, HostOsInfo::isWindowsHost()); } +void TestBlackbox::renameDependency() +{ + QDir::setCurrent(testDataDir + "/renameDependency"); + if (QFile::exists("work")) + rmDirR("work"); + QDir().mkdir("work"); + ccp("before", "work"); + QDir::setCurrent(testDataDir + "/renameDependency/work"); + QCOMPARE(runQbs(), 0); + + waitForNewTimestamp(); + QFile::remove("lib.h"); + QFile::remove("lib.cpp"); + ccp("../after", "."); + QbsRunParameters params; + params.expectFailure = true; + QVERIFY(runQbs(params) != 0); + QVERIFY(m_qbsStdout.contains("compiling main.cpp")); +} + void TestBlackbox::renameProduct() { QDir::setCurrent(testDataDir + "/renameProduct"); |