Add qbs project files to unit tests

Change-Id: I27918b0beaa39926c13dbf54e1479502a598a598
Reviewed-by: Christian Kandeler <christian.kandeler@theqtcompany.com>
This commit is contained in:
Christian Stenger
2015-07-27 16:07:47 +02:00
parent 7c06e4b768
commit 828b61e941
16 changed files with 232 additions and 0 deletions

View File

@@ -0,0 +1,8 @@
import qbs
Project {
references: [
"src/src.qbs",
"tests/tests.qbs"
]
}

View File

@@ -0,0 +1,11 @@
import qbs
CppApplication {
type: "application"
name: "Dummy Application"
Depends { name: "Qt.gui" }
Depends { name: "Qt.widgets" }
files: [ "main.cpp" ]
}

View File

@@ -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"
]
}

View File

@@ -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)
}

View File

@@ -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" ]
}

View File

@@ -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)
}

View File

@@ -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 + "\"")
}

View File

@@ -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 + "\"")
}

View File

@@ -0,0 +1,7 @@
import qbs
Project {
name: "Tests"
references: [ "auto/auto.qbs" ]
}

View File

@@ -0,0 +1,7 @@
import qbs
Project {
name: "Plain test project"
references: [ "test_plain/test_plain.qbs" ]
}

View File

@@ -0,0 +1,10 @@
import qbs
CppApplication {
type: "application" // suppress bundle generation on OSX
Depends { name: "Qt.gui" }
Depends { name: "Qt.test" }
files: [ "tst_simple.cpp", "tst_simple.h" ]
}