summaryrefslogtreecommitdiff
path: root/plugins/autotest/unit_test/mixed_atp
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/autotest/unit_test/mixed_atp')
-rw-r--r--plugins/autotest/unit_test/mixed_atp/mixed_atp.qbs8
-rw-r--r--plugins/autotest/unit_test/mixed_atp/src/src.qbs11
-rw-r--r--plugins/autotest/unit_test/mixed_atp/tests/auto/auto.qbs13
-rw-r--r--plugins/autotest/unit_test/mixed_atp/tests/auto/bench/bench.qbs14
-rw-r--r--plugins/autotest/unit_test/mixed_atp/tests/auto/dummy/dummy.qbs12
-rw-r--r--plugins/autotest/unit_test/mixed_atp/tests/auto/gui/gui.qbs13
-rw-r--r--plugins/autotest/unit_test/mixed_atp/tests/auto/quickauto/quickauto.qbs33
-rw-r--r--plugins/autotest/unit_test/mixed_atp/tests/auto/quickauto2/quickauto2.qbs29
-rw-r--r--plugins/autotest/unit_test/mixed_atp/tests/tests.qbs7
9 files changed, 140 insertions, 0 deletions
diff --git a/plugins/autotest/unit_test/mixed_atp/mixed_atp.qbs b/plugins/autotest/unit_test/mixed_atp/mixed_atp.qbs
new file mode 100644
index 0000000000..dfc99c15df
--- /dev/null
+++ b/plugins/autotest/unit_test/mixed_atp/mixed_atp.qbs
@@ -0,0 +1,8 @@
+import qbs
+
+Project {
+ references: [
+ "src/src.qbs",
+ "tests/tests.qbs"
+ ]
+}
diff --git a/plugins/autotest/unit_test/mixed_atp/src/src.qbs b/plugins/autotest/unit_test/mixed_atp/src/src.qbs
new file mode 100644
index 0000000000..5ed4dd4a36
--- /dev/null
+++ b/plugins/autotest/unit_test/mixed_atp/src/src.qbs
@@ -0,0 +1,11 @@
+import qbs
+
+CppApplication {
+ type: "application"
+ name: "Dummy Application"
+
+ Depends { name: "Qt.gui" }
+ Depends { name: "Qt.widgets" }
+
+ files: [ "main.cpp" ]
+}
diff --git a/plugins/autotest/unit_test/mixed_atp/tests/auto/auto.qbs b/plugins/autotest/unit_test/mixed_atp/tests/auto/auto.qbs
new file mode 100644
index 0000000000..a27b392244
--- /dev/null
+++ b/plugins/autotest/unit_test/mixed_atp/tests/auto/auto.qbs
@@ -0,0 +1,13 @@
+import qbs
+
+Project {
+ name: "Auto tests"
+
+ references: [
+ "bench/bench.qbs",
+ "dummy/dummy.qbs",
+ "gui/gui.qbs",
+ "quickauto/quickauto.qbs",
+ "quickauto2/quickauto2.qbs"
+ ]
+}
diff --git a/plugins/autotest/unit_test/mixed_atp/tests/auto/bench/bench.qbs b/plugins/autotest/unit_test/mixed_atp/tests/auto/bench/bench.qbs
new file mode 100644
index 0000000000..d10891316a
--- /dev/null
+++ b/plugins/autotest/unit_test/mixed_atp/tests/auto/bench/bench.qbs
@@ -0,0 +1,14 @@
+import qbs
+
+CppApplication {
+ type: "application"
+ name: "Benchmark Auto Test"
+ targetName: "tst_benchtest"
+
+ Depends { name: "cpp" }
+ Depends { name: "Qt.test" }
+
+ files: [ "tst_benchtest.cpp" ]
+
+ cpp.defines: base.concat("SRCDIR=" + path)
+}
diff --git a/plugins/autotest/unit_test/mixed_atp/tests/auto/dummy/dummy.qbs b/plugins/autotest/unit_test/mixed_atp/tests/auto/dummy/dummy.qbs
new file mode 100644
index 0000000000..012ba11a67
--- /dev/null
+++ b/plugins/autotest/unit_test/mixed_atp/tests/auto/dummy/dummy.qbs
@@ -0,0 +1,12 @@
+import qbs
+
+CppApplication {
+ type: "application"
+ name: "Dummy auto test"
+ targetName: "tst_FooBar"
+
+ Depends { name: "Qt.test" }
+ Depends { name: "Qt.gui" }
+
+ files: [ "tst_foo.cpp", "tst_foo.h" ]
+}
diff --git a/plugins/autotest/unit_test/mixed_atp/tests/auto/gui/gui.qbs b/plugins/autotest/unit_test/mixed_atp/tests/auto/gui/gui.qbs
new file mode 100644
index 0000000000..05359cf10f
--- /dev/null
+++ b/plugins/autotest/unit_test/mixed_atp/tests/auto/gui/gui.qbs
@@ -0,0 +1,13 @@
+import qbs
+
+CppApplication {
+ name: "Gui auto test"
+ targetName: "tst_gui"
+
+ Depends { name: "Qt"; submodules: [ "gui", "widgets", "test" ] }
+ Depends { name: "cpp" }
+
+ files: [ "tst_guitest.cpp" ]
+
+ cpp.defines: base.concat("SRCDIR=" + path)
+}
diff --git a/plugins/autotest/unit_test/mixed_atp/tests/auto/quickauto/quickauto.qbs b/plugins/autotest/unit_test/mixed_atp/tests/auto/quickauto/quickauto.qbs
new file mode 100644
index 0000000000..1697cd51a2
--- /dev/null
+++ b/plugins/autotest/unit_test/mixed_atp/tests/auto/quickauto/quickauto.qbs
@@ -0,0 +1,33 @@
+import qbs
+
+CppApplication {
+ name: "Qt Quick auto test"
+ targetName: "test_mal_qtquick"
+
+ Depends { name: "cpp" }
+ Depends { name: "Qt.core" }
+ Depends {
+ condition: Qt.core.versionMajor > 4
+ name: "Qt.qmltest"
+ }
+
+ Group {
+ name: "main application"
+ condition: Qt.core.versionMajor > 4
+
+ files: [ "main.cpp" ]
+ }
+
+ Group {
+ name: "qml test files"
+ qbs.install: true
+
+ files: [
+ "tst_test1.qml", "tst_test2.qml", "TestDummy.qml",
+ "bar/tst_foo.qml", "tst_test3.qml"
+ ]
+ }
+
+ // this should be set automatically, but it seems as if this does not happen
+ cpp.defines: base.concat("QUICK_TEST_SOURCE_DIR=\"" + path + "\"")
+}
diff --git a/plugins/autotest/unit_test/mixed_atp/tests/auto/quickauto2/quickauto2.qbs b/plugins/autotest/unit_test/mixed_atp/tests/auto/quickauto2/quickauto2.qbs
new file mode 100644
index 0000000000..a5fe65fbd6
--- /dev/null
+++ b/plugins/autotest/unit_test/mixed_atp/tests/auto/quickauto2/quickauto2.qbs
@@ -0,0 +1,29 @@
+import qbs
+
+CppApplication {
+ name: "Qt Quick auto test 2"
+ targetName: "test_mal_qtquick"
+
+ Depends { name: "cpp" }
+ Depends { name: "Qt.core" }
+ Depends {
+ condition: Qt.core.versionMajor > 4
+ name: "Qt.qmltest"
+ }
+
+ Group {
+ condition: Qt.core.versionMajor > 4
+ name: "main application"
+ files: [ "main.cpp" ]
+ }
+
+ Group {
+ name: "qml test files"
+ qbs.install: true
+
+ files: [ "tst_test1.qml", "tst_test2.qml" ]
+ }
+
+ // this should be set automatically, but it seems as if this does not happen
+ cpp.defines: base.concat("QUICK_TEST_SOURCE_DIR=\"" + path + "\"")
+}
diff --git a/plugins/autotest/unit_test/mixed_atp/tests/tests.qbs b/plugins/autotest/unit_test/mixed_atp/tests/tests.qbs
new file mode 100644
index 0000000000..e62815789f
--- /dev/null
+++ b/plugins/autotest/unit_test/mixed_atp/tests/tests.qbs
@@ -0,0 +1,7 @@
+import qbs
+
+Project {
+ name: "Tests"
+
+ references: [ "auto/auto.qbs" ]
+}