diff options
Diffstat (limited to 'tests/auto')
11 files changed, 65 insertions, 4 deletions
diff --git a/tests/auto/api/testdata/infinite-loop-process/infinite-loop.qbs b/tests/auto/api/testdata/infinite-loop-process/infinite-loop.qbs index 540ce030a..2df24d6b6 100644 --- a/tests/auto/api/testdata/infinite-loop-process/infinite-loop.qbs +++ b/tests/auto/api/testdata/infinite-loop-process/infinite-loop.qbs @@ -12,7 +12,7 @@ Project { name: "caller" Depends { name: "infinite-loop" } Rule { - usings: "application" + inputsFromDependencies: "application" Artifact { filePath: "dummy" fileTags: "mytype" diff --git a/tests/auto/blackbox/testdata/build-directories/project.qbs b/tests/auto/blackbox/testdata/build-directories/project.qbs index 4d2758527..ef4947d61 100644 --- a/tests/auto/blackbox/testdata/build-directories/project.qbs +++ b/tests/auto/blackbox/testdata/build-directories/project.qbs @@ -24,7 +24,7 @@ Project { type: "blubb2" Depends { name: "p1" } Rule { - usings: "blubb1" + inputsFromDependencies: "blubb1" Artifact { filePath: "dummy2.txt" fileTags: product.type diff --git a/tests/auto/blackbox/testdata/inputs-from-dependencies/file1.txt b/tests/auto/blackbox/testdata/inputs-from-dependencies/file1.txt new file mode 100644 index 000000000..e69de29bb --- /dev/null +++ b/tests/auto/blackbox/testdata/inputs-from-dependencies/file1.txt diff --git a/tests/auto/blackbox/testdata/inputs-from-dependencies/file2.txt b/tests/auto/blackbox/testdata/inputs-from-dependencies/file2.txt new file mode 100644 index 000000000..e69de29bb --- /dev/null +++ b/tests/auto/blackbox/testdata/inputs-from-dependencies/file2.txt diff --git a/tests/auto/blackbox/testdata/inputs-from-dependencies/file3.txt b/tests/auto/blackbox/testdata/inputs-from-dependencies/file3.txt new file mode 100644 index 000000000..e69de29bb --- /dev/null +++ b/tests/auto/blackbox/testdata/inputs-from-dependencies/file3.txt diff --git a/tests/auto/blackbox/testdata/inputs-from-dependencies/file4.txt b/tests/auto/blackbox/testdata/inputs-from-dependencies/file4.txt new file mode 100644 index 000000000..e69de29bb --- /dev/null +++ b/tests/auto/blackbox/testdata/inputs-from-dependencies/file4.txt diff --git a/tests/auto/blackbox/testdata/inputs-from-dependencies/project.qbs b/tests/auto/blackbox/testdata/inputs-from-dependencies/project.qbs new file mode 100644 index 000000000..087ad9bf6 --- /dev/null +++ b/tests/auto/blackbox/testdata/inputs-from-dependencies/project.qbs @@ -0,0 +1,51 @@ +import qbs + +Project { + Product { + name: "TextFileContainer1" + type: "txt_container" + Group { + files: ["file1.txt", "file2.txt"] + fileTags: "txt" + } + } + Product { + name: "TextFileContainer2" + Group { + files: ["file3.txt"] + fileTags: "txt" + } + } + Product { + name: "TextFileContainer3" + Group { + files: ["file4.txt"] + fileTags: "txt" + } + } + + Product { + name: "TextFileGatherer" + type: "printed_txt" + Depends { name: "TextFileContainer1" } + Depends { name: "TextFileContainer2" } + Rule { + inputsFromDependencies: "txt" + multiplex: true + Artifact { + filePath: "blubb" + fileTags: "printed_txt" + alwaysUpdated: false + } + prepare: { + var cmd = new JavaScriptCommand(); + cmd.description = "Gathering text files"; + cmd.sourceCode = function() { + for (i in inputs.txt) + print("\t" + inputs.txt[i].filePath); + }; + return cmd; + } + } + } +} diff --git a/tests/auto/blackbox/testdata/product-dependencies-by-type/project.qbs b/tests/auto/blackbox/testdata/product-dependencies-by-type/project.qbs index 1a85149e6..f3df47e10 100644 --- a/tests/auto/blackbox/testdata/product-dependencies-by-type/project.qbs +++ b/tests/auto/blackbox/testdata/product-dependencies-by-type/project.qbs @@ -42,7 +42,7 @@ Project { Rule { multiplex: true - usings: "application" + inputsFromDependencies: "application" Artifact { filePath: "app-list.txt" fileTags: "app-list" diff --git a/tests/auto/blackbox/testdata/usings-as-sole-inputs-non-multiplexed/project.qbs b/tests/auto/blackbox/testdata/usings-as-sole-inputs-non-multiplexed/project.qbs index 899b4445f..7d4087620 100644 --- a/tests/auto/blackbox/testdata/usings-as-sole-inputs-non-multiplexed/project.qbs +++ b/tests/auto/blackbox/testdata/usings-as-sole-inputs-non-multiplexed/project.qbs @@ -43,7 +43,7 @@ Project { Depends { name: "p1" } Depends { name: "p2" } Rule { - usings: "custom" + inputsFromDependencies: "custom" Artifact { filePath: FileInfo.fileName(input.filePath) + ".plus" fileTags: "custom-plus" diff --git a/tests/auto/blackbox/tst_blackbox.cpp b/tests/auto/blackbox/tst_blackbox.cpp index b3d423c15..c3b6437c2 100644 --- a/tests/auto/blackbox/tst_blackbox.cpp +++ b/tests/auto/blackbox/tst_blackbox.cpp @@ -1206,6 +1206,15 @@ void TestBlackbox::installedTransformerOutput() QVERIFY2(QFile::exists(installedFilePath), qPrintable(installedFilePath)); } +void TestBlackbox::inputsFromDependencies() +{ + QDir::setCurrent(testDataDir + "/inputs-from-dependencies"); + QbsRunParameters params(QStringList("-qq")); + QCOMPARE(runQbs(params), 0); + const QList<QByteArray> output = m_qbsStderr.trimmed().split('\n'); + QVERIFY2(output.count() == 3, m_qbsStderr.constData()); +} + void TestBlackbox::jsExtensionsFile() { QDir::setCurrent(testDataDir + "/jsextensions"); diff --git a/tests/auto/blackbox/tst_blackbox.h b/tests/auto/blackbox/tst_blackbox.h index f158f2cf7..5a67a7f9f 100644 --- a/tests/auto/blackbox/tst_blackbox.h +++ b/tests/auto/blackbox/tst_blackbox.h @@ -103,6 +103,7 @@ private slots: void exportRule(); void fileDependencies(); void installedTransformerOutput(); + void inputsFromDependencies(); void jsExtensionsFile(); void jsExtensionsFileInfo(); void jsExtensionsProcess(); |