diff options
author | Christian Kandeler <christian.kandeler@digia.com> | 2013-04-03 15:50:02 +0200 |
---|---|---|
committer | Joerg Bornemann <joerg.bornemann@digia.com> | 2013-04-05 17:09:09 +0200 |
commit | a28ff4c7890a97098d50378eeddee41cd7bb83c2 (patch) | |
tree | 1219abeeef2523a8e4a3adca1d8481395620c427 /tests/auto/blackbox/testdata/productproperties | |
parent | 141cd263bdc3c3822ccc5b2b54f4762d3fe17645 (diff) |
Update product properties test to cover referenced products.
Fails currently.
Change-Id: Idfed174ec48663b5dee232775229049dc8c5d1dd
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
Diffstat (limited to 'tests/auto/blackbox/testdata/productproperties')
4 files changed, 50 insertions, 47 deletions
diff --git a/tests/auto/blackbox/testdata/productproperties/app.qbs b/tests/auto/blackbox/testdata/productproperties/app.qbs new file mode 100644 index 000000000..08334e791 --- /dev/null +++ b/tests/auto/blackbox/testdata/productproperties/app.qbs @@ -0,0 +1,11 @@ +import qbs 1.0 + +Product { + type: "application" + name: "blubb_user" + + files: "main.cpp" + + Depends { name: "blubb_header" } + Depends { name: "cpp" } +} diff --git a/tests/auto/blackbox/testdata/productproperties/header.qbs b/tests/auto/blackbox/testdata/productproperties/header.qbs new file mode 100644 index 000000000..36e6f06a5 --- /dev/null +++ b/tests/auto/blackbox/testdata/productproperties/header.qbs @@ -0,0 +1,33 @@ +import qbs 1.0 + +Product { + name: "blubb_header" + type: "hpp" + files: "blubb_header.h.in" + property string blubbProp: project.blubbProp + + Transformer { + Artifact { + fileName: "blubb_header.h" + fileTags: "hpp" + } + prepare: { + var cmd = new JavaScriptCommand(); + cmd.description = "generating blubb_header.h"; + cmd.highlight = "codegen"; + cmd.blubbProp = product.blubbProp; + cmd.sourceCode = function() { + file = new TextFile(output.fileName, TextFile.WriteOnly); + file.truncate(); + file.write("#define BLUBB_PROP " + blubbProp); + file.close(); + } + return cmd; + } + } + + ProductModule { + Depends { name: "cpp" } + cpp.includePaths: product.buildDirectory + } +} diff --git a/tests/auto/blackbox/testdata/productproperties/productproperties.qbs b/tests/auto/blackbox/testdata/productproperties/productproperties.qbs deleted file mode 100644 index 73239ff6d..000000000 --- a/tests/auto/blackbox/testdata/productproperties/productproperties.qbs +++ /dev/null @@ -1,47 +0,0 @@ -import qbs 1.0 - -Project { - property string blubbProp: 5 - - Product { - name: "blubb_header" - type: "hpp" - files: "blubb_header.h.in" - property string blubbProp: project.blubbProp - - Transformer { - Artifact { - fileName: "blubb_header.h" - fileTags: "hpp" - } - prepare: { - var cmd = new JavaScriptCommand(); - cmd.description = "generating blubb_header.h"; - cmd.highlight = "codegen"; - cmd.blubbProp = product.blubbProp; - cmd.sourceCode = function() { - file = new TextFile(output.fileName, TextFile.WriteOnly); - file.truncate(); - file.write("#define BLUBB_PROP " + blubbProp); - file.close(); - } - return cmd; - } - } - - ProductModule { - Depends { name: "cpp" } - cpp.includePaths: product.buildDirectory - } - } - - Product { - type: "application" - name: "blubb_user" - - files: "main.cpp" - - Depends { name: "blubb_header" } - Depends { name: "cpp" } - } -} diff --git a/tests/auto/blackbox/testdata/productproperties/project.qbs b/tests/auto/blackbox/testdata/productproperties/project.qbs new file mode 100644 index 000000000..e190e6bbf --- /dev/null +++ b/tests/auto/blackbox/testdata/productproperties/project.qbs @@ -0,0 +1,6 @@ +import qbs 1.0 + +Project { + property string blubbProp: 5 + references: ["header.qbs", "app.qbs"] +} |