diff options
author | Christian Kandeler <christian.kandeler@digia.com> | 2013-09-09 15:21:03 +0200 |
---|---|---|
committer | Joerg Bornemann <joerg.bornemann@digia.com> | 2013-09-09 16:17:04 +0200 |
commit | 49ebbc396cc0276dace901b67b9e974750b50f81 (patch) | |
tree | 5de8f745182a32a3005d689dbff1076da8969ecd /tests/auto/blackbox | |
parent | 7b87337f402da091648a97414d0201c096411902 (diff) | |
download | qbs-49ebbc396cc0276dace901b67b9e974750b50f81.tar.gz |
Add autotest for products exporting a module with dependencies.
Fails at the moment.
Change-Id: I037c47d33cce2b0901572e158325e1ceeed33f01
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
Diffstat (limited to 'tests/auto/blackbox')
7 files changed, 42 insertions, 0 deletions
diff --git a/tests/auto/blackbox/testdata/exportWithRecursiveDepends/main1.cpp b/tests/auto/blackbox/testdata/exportWithRecursiveDepends/main1.cpp new file mode 100644 index 000000000..237c8ce18 --- /dev/null +++ b/tests/auto/blackbox/testdata/exportWithRecursiveDepends/main1.cpp @@ -0,0 +1 @@ +int main() {} diff --git a/tests/auto/blackbox/testdata/exportWithRecursiveDepends/main2.cpp b/tests/auto/blackbox/testdata/exportWithRecursiveDepends/main2.cpp new file mode 100644 index 000000000..c7f2e65ab --- /dev/null +++ b/tests/auto/blackbox/testdata/exportWithRecursiveDepends/main2.cpp @@ -0,0 +1,6 @@ +int main() +{ +#ifndef HAS_FOO + blubb(); +#endif +} diff --git a/tests/auto/blackbox/testdata/exportWithRecursiveDepends/project.qbs b/tests/auto/blackbox/testdata/exportWithRecursiveDepends/project.qbs new file mode 100644 index 000000000..0e554b808 --- /dev/null +++ b/tests/auto/blackbox/testdata/exportWithRecursiveDepends/project.qbs @@ -0,0 +1,16 @@ +import qbs + +Project { + CppApplication { + name: "app1" + files: "main1.cpp" + Export { Depends { name: "module1" } } + } + + CppApplication { + name: "app2" + Depends { name: "app1" } + files: "main2.cpp" + } + moduleSearchPaths: "qbs" +} diff --git a/tests/auto/blackbox/testdata/exportWithRecursiveDepends/qbs/module1/module1.qbs b/tests/auto/blackbox/testdata/exportWithRecursiveDepends/qbs/module1/module1.qbs new file mode 100644 index 000000000..c1c4ad358 --- /dev/null +++ b/tests/auto/blackbox/testdata/exportWithRecursiveDepends/qbs/module1/module1.qbs @@ -0,0 +1,5 @@ +import qbs + +Module { + Depends { name: "module2" } +} diff --git a/tests/auto/blackbox/testdata/exportWithRecursiveDepends/qbs/module2/module2.qbs b/tests/auto/blackbox/testdata/exportWithRecursiveDepends/qbs/module2/module2.qbs new file mode 100644 index 000000000..75a274631 --- /dev/null +++ b/tests/auto/blackbox/testdata/exportWithRecursiveDepends/qbs/module2/module2.qbs @@ -0,0 +1,6 @@ +import qbs + +Module { + Depends { name: "cpp" } + cpp.defines: ["HAS_FOO"] +} diff --git a/tests/auto/blackbox/tst_blackbox.cpp b/tests/auto/blackbox/tst_blackbox.cpp index 2ccf23270..cb9a9d8f5 100644 --- a/tests/auto/blackbox/tst_blackbox.cpp +++ b/tests/auto/blackbox/tst_blackbox.cpp @@ -409,6 +409,13 @@ void TestBlackbox::clean() QVERIFY(QFile(depExeFilePath).exists()); } +void TestBlackbox::exportWithRecursiveDepends() +{ + QDir::setCurrent(testDataDir + "/exportWithRecursiveDepends"); + QEXPECT_FAIL("", "currently broken", Abort); + QCOMPARE(runQbs(), 0); +} + void TestBlackbox::renameProduct() { QDir::setCurrent(testDataDir + "/renameProduct"); diff --git a/tests/auto/blackbox/tst_blackbox.h b/tests/auto/blackbox/tst_blackbox.h index e54679b09..635c52a75 100644 --- a/tests/auto/blackbox/tst_blackbox.h +++ b/tests/auto/blackbox/tst_blackbox.h @@ -105,6 +105,7 @@ private slots: void resolve_project_dry_run_data(); void resolve_project_dry_run(); void clean(); + void exportWithRecursiveDepends(); void renameProduct(); void renameTargetArtifact(); void subProjects(); |