diff options
author | Christian Kandeler <christian.kandeler@digia.com> | 2014-08-11 15:01:06 +0200 |
---|---|---|
committer | Christian Kandeler <christian.kandeler@digia.com> | 2014-08-12 10:01:14 +0200 |
commit | 3d818f14838d0bb6baa050cbb70e39ec972cf89a (patch) | |
tree | 4356b88d664f18d3bc2e17f5a34ac09848175b46 /tests/auto/api/testdata/subprojects | |
parent | b7d70d48508e46456930fcb13637356c4e3c1bec (diff) |
API test: Make defaultSetupParameters() smarter.
It now takes the project file path and can derive a couple of things
from that, so the calling functions need to do less.
With the newly introduced conventions, it is no longer possible to share
test data with the blackbox tests, so copy the respective directories.
Change-Id: I311d982364a87188441bc6f7fedda71d025acc38
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
Diffstat (limited to 'tests/auto/api/testdata/subprojects')
7 files changed, 65 insertions, 0 deletions
diff --git a/tests/auto/api/testdata/subprojects/resources/imports/LibraryType/type.js b/tests/auto/api/testdata/subprojects/resources/imports/LibraryType/type.js new file mode 100644 index 000000000..cb07f8e5b --- /dev/null +++ b/tests/auto/api/testdata/subprojects/resources/imports/LibraryType/type.js @@ -0,0 +1 @@ +function type() { return "dynamiclibrary"; } diff --git a/tests/auto/api/testdata/subprojects/resources/modules/QtCoreDepender/qtcoredepender.qbs b/tests/auto/api/testdata/subprojects/resources/modules/QtCoreDepender/qtcoredepender.qbs new file mode 100644 index 000000000..03d649309 --- /dev/null +++ b/tests/auto/api/testdata/subprojects/resources/modules/QtCoreDepender/qtcoredepender.qbs @@ -0,0 +1,5 @@ +import qbs + +Module { + Depends { name: "Qt.core" } +} diff --git a/tests/auto/api/testdata/subprojects/subproject1/main.cpp b/tests/auto/api/testdata/subprojects/subproject1/main.cpp new file mode 100644 index 000000000..6a0bac9f1 --- /dev/null +++ b/tests/auto/api/testdata/subprojects/subproject1/main.cpp @@ -0,0 +1,6 @@ +void f(); + +int main() +{ + f(); +} diff --git a/tests/auto/api/testdata/subprojects/subproject2/subproject2.qbs b/tests/auto/api/testdata/subprojects/subproject2/subproject2.qbs new file mode 100644 index 000000000..183df4dac --- /dev/null +++ b/tests/auto/api/testdata/subprojects/subproject2/subproject2.qbs @@ -0,0 +1,15 @@ +import qbs + +Project { + name: "subproject2" + property string libNamePrefix: "test" + SubProject { + filePath: "subproject3/subproject3.qbs" + inheritProperties: true + Properties { + name: "overridden name" + condition: true + libNameSuffix: "Lib" + } + } +} diff --git a/tests/auto/api/testdata/subprojects/subproject2/subproject3/subproject3.qbs b/tests/auto/api/testdata/subprojects/subproject2/subproject3/subproject3.qbs new file mode 100644 index 000000000..acdf1d7e6 --- /dev/null +++ b/tests/auto/api/testdata/subprojects/subproject2/subproject3/subproject3.qbs @@ -0,0 +1,16 @@ +import qbs +import LibraryType + +Project { + condition: false + property string libNameSuffix: "blubb" + Product { + name: project.libNamePrefix + project.libNameSuffix + type: LibraryType.type() + Depends { name: "cpp" } + Depends { name: "QtCoreDepender" } + cpp.defines: "MY_EXPORT=Q_DECL_EXPORT" + files: "testlib.cpp" + Export { Depends { name: "Qt.core" } } + } +} diff --git a/tests/auto/api/testdata/subprojects/subproject2/subproject3/testlib.cpp b/tests/auto/api/testdata/subprojects/subproject2/subproject3/testlib.cpp new file mode 100644 index 000000000..398034cb3 --- /dev/null +++ b/tests/auto/api/testdata/subprojects/subproject2/subproject3/testlib.cpp @@ -0,0 +1,3 @@ +#include <QtGlobal> + +MY_EXPORT void f() {} diff --git a/tests/auto/api/testdata/subprojects/toplevelproject.qbs b/tests/auto/api/testdata/subprojects/toplevelproject.qbs new file mode 100644 index 000000000..f167ccabc --- /dev/null +++ b/tests/auto/api/testdata/subprojects/toplevelproject.qbs @@ -0,0 +1,19 @@ +import qbs + +Project { + name: "top level project" + references: ["subproject2"] + + Project { + condition: true + name: "app-project" + CppApplication { + name: "app" + Depends { name: "testLib" } + cpp.defines: "MY_EXPORT=" + files: "subproject1/main.cpp" + } + } + + qbsSearchPaths: ["resources"] +} |