diff options
author | Christian Kandeler <christian.kandeler@digia.com> | 2014-05-26 16:50:15 +0200 |
---|---|---|
committer | Joerg Bornemann <joerg.bornemann@digia.com> | 2014-06-02 11:47:43 +0200 |
commit | 0d17c9617e1478951ea8e967937adb7d16a8e3b3 (patch) | |
tree | b79895ec64a03946f1719dbc8812acedfc6cf450 /tests/auto/blackbox/testdata | |
parent | d79628572eb4f89f243742394622007e2a27d0a8 (diff) |
Properly treat "usings" as inputs when applying rules.
This allows non-multiplex rules with only "usings" and no "inputs" to
work as expected, that is they create one transformer per "usings"
element.
Change-Id: Iba5144f81b082043878f3eefc111846b6d05646a
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
Diffstat (limited to 'tests/auto/blackbox/testdata')
-rw-r--r-- | tests/auto/blackbox/testdata/build-directories/project.qbs | 5 | ||||
-rw-r--r-- | tests/auto/blackbox/testdata/usings-as-sole-inputs-non-multiplexed/custom1.in (renamed from tests/auto/blackbox/testdata/build-directories/input.txt) | 0 | ||||
-rw-r--r-- | tests/auto/blackbox/testdata/usings-as-sole-inputs-non-multiplexed/custom2.in | 0 | ||||
-rw-r--r-- | tests/auto/blackbox/testdata/usings-as-sole-inputs-non-multiplexed/project.qbs | 62 |
4 files changed, 62 insertions, 5 deletions
diff --git a/tests/auto/blackbox/testdata/build-directories/project.qbs b/tests/auto/blackbox/testdata/build-directories/project.qbs index 025340a0a..cb83999e2 100644 --- a/tests/auto/blackbox/testdata/build-directories/project.qbs +++ b/tests/auto/blackbox/testdata/build-directories/project.qbs @@ -23,12 +23,7 @@ Project { name: "p2" type: "blubb2" Depends { name: "p1" } - Group { - files: "input.txt" - fileTags: "input" - } Rule { - inputs: "input" usings: "blubb1" Artifact { fileName: "dummy2.txt" diff --git a/tests/auto/blackbox/testdata/build-directories/input.txt b/tests/auto/blackbox/testdata/usings-as-sole-inputs-non-multiplexed/custom1.in index e69de29bb..e69de29bb 100644 --- a/tests/auto/blackbox/testdata/build-directories/input.txt +++ b/tests/auto/blackbox/testdata/usings-as-sole-inputs-non-multiplexed/custom1.in diff --git a/tests/auto/blackbox/testdata/usings-as-sole-inputs-non-multiplexed/custom2.in b/tests/auto/blackbox/testdata/usings-as-sole-inputs-non-multiplexed/custom2.in new file mode 100644 index 000000000..e69de29bb --- /dev/null +++ b/tests/auto/blackbox/testdata/usings-as-sole-inputs-non-multiplexed/custom2.in 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 new file mode 100644 index 000000000..bf34cc8e6 --- /dev/null +++ b/tests/auto/blackbox/testdata/usings-as-sole-inputs-non-multiplexed/project.qbs @@ -0,0 +1,62 @@ +import qbs +import qbs.FileInfo +import qbs.TextFile + +Project { + Product { + name: "p1" + type: "custom" + Group { + files: "custom1.in" + fileTags: "custom.in" + } + } + Product { + name: "p2" + type: "custom" + Group { + files: "custom2.in" + fileTags: "custom.in" + } + } + + Rule { + inputs: "custom.in" + Artifact { + fileName: FileInfo.baseName(input.filePath) + ".out" + fileTags: "custom" + } + prepare: { + var cmd = new JavaScriptCommand(); + cmd.description = "generating " + output.fileName; + cmd.sourceCode = function() { + var f = new TextFile(output.filePath, TextFile.WriteOnly); + f.close(); + } + return cmd; + } + } + + Product { + name: "p3" + type: "custom-plus" + Depends { name: "p1" } + Depends { name: "p2" } + Rule { + usings: "custom" + Artifact { + fileName: FileInfo.baseName(input.filePath) + ".plus" + fileTags: "custom-plus" + } + prepare: { + var cmd = new JavaScriptCommand(); + cmd.description = "generating " + output.fileName; + cmd.sourceCode = function() { + var f = new TextFile(output.filePath, TextFile.WriteOnly); + f.close(); + } + return cmd; + } + } + } +} |