summaryrefslogtreecommitdiff
path: root/tests/auto/blackbox
diff options
context:
space:
mode:
authorChristian Kandeler <christian.kandeler@digia.com>2013-09-09 15:21:03 +0200
committerJoerg Bornemann <joerg.bornemann@digia.com>2013-09-09 16:17:04 +0200
commit49ebbc396cc0276dace901b67b9e974750b50f81 (patch)
tree5de8f745182a32a3005d689dbff1076da8969ecd /tests/auto/blackbox
parent7b87337f402da091648a97414d0201c096411902 (diff)
downloadqbs-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')
-rw-r--r--tests/auto/blackbox/testdata/exportWithRecursiveDepends/main1.cpp1
-rw-r--r--tests/auto/blackbox/testdata/exportWithRecursiveDepends/main2.cpp6
-rw-r--r--tests/auto/blackbox/testdata/exportWithRecursiveDepends/project.qbs16
-rw-r--r--tests/auto/blackbox/testdata/exportWithRecursiveDepends/qbs/module1/module1.qbs5
-rw-r--r--tests/auto/blackbox/testdata/exportWithRecursiveDepends/qbs/module2/module2.qbs6
-rw-r--r--tests/auto/blackbox/tst_blackbox.cpp7
-rw-r--r--tests/auto/blackbox/tst_blackbox.h1
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();