diff options
author | Jake Petroules <jake.petroules@qt.io> | 2017-05-25 19:10:27 -0700 |
---|---|---|
committer | Jake Petroules <jake.petroules@qt.io> | 2017-05-30 15:29:51 +0000 |
commit | 8a7beb631787bbc61624f0fead0563b35649be3a (patch) | |
tree | 58b45d4c54238b67399b09d4831c8ced945df2a9 /tests/auto/blackbox/testdata-apple/apple-multiconfig | |
parent | b13a5e2a07764dbf92736a2c89e65af0d26c4556 (diff) | |
download | qbs-8a7beb631787bbc61624f0fead0563b35649be3a.tar.gz |
Migrate tests of Apple platforms/tools into new tst_blackboxapple target
This new test suite collects all the tests which test qbs' support for
Apple platforms, Xcode, and related tools.
Change-Id: I835e2d5bee46f1b4bb281c02b5b4ef814f196d7c
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Diffstat (limited to 'tests/auto/blackbox/testdata-apple/apple-multiconfig')
3 files changed, 146 insertions, 0 deletions
diff --git a/tests/auto/blackbox/testdata-apple/apple-multiconfig/app.c b/tests/auto/blackbox/testdata-apple/apple-multiconfig/app.c new file mode 100644 index 000000000..d0bb0c43c --- /dev/null +++ b/tests/auto/blackbox/testdata-apple/apple-multiconfig/app.c @@ -0,0 +1,2 @@ +extern int foo(); +int main() { return foo(); } diff --git a/tests/auto/blackbox/testdata-apple/apple-multiconfig/apple-multiconfig.qbs b/tests/auto/blackbox/testdata-apple/apple-multiconfig/apple-multiconfig.qbs new file mode 100644 index 000000000..a974e93e5 --- /dev/null +++ b/tests/auto/blackbox/testdata-apple/apple-multiconfig/apple-multiconfig.qbs @@ -0,0 +1,132 @@ +import qbs +import qbs.Utilities + +Project { + minimumQbsVersion: "1.8" + + CppApplication { + Depends { name: "singlelib" } + Depends { name: "bundle" } + name: "singleapp" + targetName: "singleapp" + files: ["app.c"] + cpp.rpaths: qbs.targetOS.contains("darwin") ? ["@loader_path/../../../"] : [] + + // Turn off multiplexing + aggregate: false + multiplexByQbsProperties: [] + + Group { + fileTagsFilter: ["bundle.content"] + qbs.install: true + qbs.installSourceBase: product.buildDirectory + } + } + + CppApplication { + Depends { name: "singlelib" } + Depends { name: "bundle" } + name: "singleapp_agg" + targetName: "singleapp_agg" + files: ["app.c"] + cpp.rpaths: qbs.targetOS.contains("darwin") ? ["@loader_path/../../../"] : [] + + // Force aggregation when not needed + aggregate: true + qbs.architectures: ["x86_64"] + qbs.buildVariants: ["release"] + + Group { + fileTagsFilter: ["bundle.content"] + qbs.install: true + qbs.installSourceBase: product.buildDirectory + } + } + + DynamicLibrary { + Depends { name: "cpp" } + Depends { name: "bundle" } + name: "singlelib" + targetName: "singlelib" + files: ["lib.c"] + cpp.sonamePrefix: qbs.targetOS.contains("darwin") ? "@rpath" : undefined + cpp.defines: ["VARIANT=" + Utilities.cStringQuote(qbs.buildVariant)] + + // Turn off multiplexing + aggregate: false + multiplexByQbsProperties: [] + + Group { + fileTagsFilter: ["bundle.content"] + qbs.install: true + qbs.installSourceBase: product.buildDirectory + } + } + + CppApplication { + Depends { name: "multilib" } + Depends { name: "bundle" } + name: "multiapp" + targetName: "multiapp" + files: ["app.c"] + cpp.rpaths: qbs.targetOS.contains("darwin") ? ["@loader_path/../../../"] : [] + + Group { + fileTagsFilter: ["bundle.content"] + qbs.install: true + qbs.installSourceBase: product.buildDirectory + } + } + + CppApplication { + Depends { name: "multilib" } + Depends { name: "bundle" } + name: "fatmultiapp" + targetName: "fatmultiapp" + files: ["app.c"] + cpp.rpaths: qbs.targetOS.contains("darwin") ? ["@loader_path/../../../"] : [] + qbs.architectures: ["x86", "x86_64"] + + Group { + fileTagsFilter: ["bundle.content"] + qbs.install: true + qbs.installSourceBase: product.buildDirectory + } + } + + DynamicLibrary { + Depends { name: "cpp" } + Depends { name: "bundle" } + name: "multilib" + targetName: "multilib" + files: ["lib.c"] + cpp.sonamePrefix: qbs.targetOS.contains("darwin") ? "@rpath" : undefined + cpp.defines: ["VARIANT=" + Utilities.cStringQuote(qbs.buildVariant)] + qbs.architectures: ["x86", "x86_64"] + qbs.buildVariants: ["release", "debug", "profile"] + + Group { + fileTagsFilter: ["bundle.content"] + qbs.install: true + qbs.installSourceBase: product.buildDirectory + } + } + + DynamicLibrary { + Depends { name: "cpp" } + Depends { name: "bundle" } + name: "multilib-no-release" + targetName: "multilib-no-release" + files: ["lib.c"] + cpp.sonamePrefix: qbs.targetOS.contains("darwin") ? "@rpath" : undefined + cpp.defines: ["VARIANT=" + Utilities.cStringQuote(qbs.buildVariant)] + qbs.architectures: ["x86", "x86_64"] + qbs.buildVariants: ["debug", "profile"] + + Group { + fileTagsFilter: ["bundle.content"] + qbs.install: true + qbs.installSourceBase: product.buildDirectory + } + } +} diff --git a/tests/auto/blackbox/testdata-apple/apple-multiconfig/lib.c b/tests/auto/blackbox/testdata-apple/apple-multiconfig/lib.c new file mode 100644 index 000000000..37dc6f016 --- /dev/null +++ b/tests/auto/blackbox/testdata-apple/apple-multiconfig/lib.c @@ -0,0 +1,12 @@ +#include <stdio.h> + +int foo() +{ +#ifdef __i386__ + printf("Hello from " VARIANT " i386\n"); +#endif +#ifdef __x86_64__ + printf("Hello from " VARIANT " x86_64\n"); +#endif + return 0; +} |