diff options
author | Christian Kandeler <christian.kandeler@qt.io> | 2018-09-04 13:21:04 +0200 |
---|---|---|
committer | Christian Kandeler <christian.kandeler@qt.io> | 2018-09-04 13:21:04 +0200 |
commit | 5ecb6ad29ab2e75bf329f369c821179898dfad1f (patch) | |
tree | 60df57c4c74d9cddb5717960a59b96bb6a743b80 /tests | |
parent | 909128d2647498b66f4dc6c1e948af6b47d0c42a (diff) | |
parent | 4661759492c8dfc2830248f5d696a63365fc9e07 (diff) |
Merge 1.12 into master
Change-Id: Ia115255ae46772a83c1196fbe291ff295927ee92
Diffstat (limited to 'tests')
-rw-r--r-- | tests/auto/blackbox/testdata/not-always-updated/not-always-updated.qbs | 31 | ||||
-rw-r--r-- | tests/auto/blackbox/tst_blackbox.cpp | 7 | ||||
-rw-r--r-- | tests/auto/blackbox/tst_blackbox.h | 1 |
3 files changed, 39 insertions, 0 deletions
diff --git a/tests/auto/blackbox/testdata/not-always-updated/not-always-updated.qbs b/tests/auto/blackbox/testdata/not-always-updated/not-always-updated.qbs new file mode 100644 index 000000000..8d6c1f5da --- /dev/null +++ b/tests/auto/blackbox/testdata/not-always-updated/not-always-updated.qbs @@ -0,0 +1,31 @@ +import qbs.TextFile + +Product { + type: "p" + Rule { + multiplex: true + Artifact { filePath: "dummy.txt"; fileTags: "t1"; alwaysUpdated: false } + prepare: { + var cmd = new JavaScriptCommand(); + cmd.description = "creating dummy"; + cmd.sourceCode = function() {}; + return cmd; + } + } + Rule { + inputs: "t1" + Artifact { filePath: "o.txt"; fileTags: "p" } + prepare: { + var cmd = new JavaScriptCommand; + cmd.description = "creating final"; + cmd.sourceCode = function() { + var f = new TextFile(output.filePath, TextFile.WriteOnly); + f.close(); + }; + return cmd; + } + } +} + + + diff --git a/tests/auto/blackbox/tst_blackbox.cpp b/tests/auto/blackbox/tst_blackbox.cpp index 800ad5870..ea8b9bd52 100644 --- a/tests/auto/blackbox/tst_blackbox.cpp +++ b/tests/auto/blackbox/tst_blackbox.cpp @@ -4563,6 +4563,13 @@ void TestBlackbox::nonDefaultProduct() QVERIFY2(QFile::exists(nonDefaultAppExe), qPrintable(nonDefaultAppExe)); } +void TestBlackbox::notAlwaysUpdated() +{ + QDir::setCurrent(testDataDir + "/not-always-updated"); + QCOMPARE(runQbs(), 0); + QCOMPARE(runQbs(), 0); +} + static void switchProfileContents(qbs::Profile &p, qbs::Settings *s, bool on) { const QString scalarKey = "leaf.scalarProp"; diff --git a/tests/auto/blackbox/tst_blackbox.h b/tests/auto/blackbox/tst_blackbox.h index 33aba02eb..92ba338ab 100644 --- a/tests/auto/blackbox/tst_blackbox.h +++ b/tests/auto/blackbox/tst_blackbox.h @@ -193,6 +193,7 @@ private slots: void nodejs(); void nonBrokenFilesInBrokenProduct(); void nonDefaultProduct(); + void notAlwaysUpdated(); void nsis(); void nsisDependencies(); void outOfDateMarking(); |