forked from qt-creator/qt-creator
qbs build: Fix manual tests
- Remove dependency on project.withAutotests by adding local {Qt,Cpp}Application overrides that alias QtcManualTest. This way, the respective products are a QtcManualTest when inside Qt Creator, while also working outside the source tree. - Rename QtcManualtest to QtcManualTest. (The reason QtcAutotest is not camel-cased is because "autotest" is a single word.) - Plus some minor clean-ups. Change-Id: Idd77191f0b433d6d7443c639eebda383ab110082 Reviewed-by: Christian Stenger <christian.stenger@qt.io> Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
Project {
|
||||
name: "Qt Creator"
|
||||
minimumQbsVersion: "2.0.0"
|
||||
property bool withAutotests: qbs.buildVariant === "debug" // FIXME: Remove
|
||||
property bool withAutotests: qbs.buildVariant === "debug" // TODO: compat, remove
|
||||
property path ide_source_tree: path
|
||||
property pathList additionalPlugins: []
|
||||
property pathList additionalLibs: []
|
||||
|
@@ -1,6 +1,6 @@
|
||||
QtApplication {
|
||||
name: "Manual debugger gui test"
|
||||
Depends { name: "qtc" }
|
||||
|
||||
Depends { name: "Qt.widgets" }
|
||||
|
||||
files: [
|
||||
|
@@ -2,11 +2,9 @@ import qbs.File
|
||||
import qbs.FileInfo
|
||||
|
||||
CppApplication {
|
||||
condition: qtc.withAutotests
|
||||
name: "Manual Test Simple Application"
|
||||
targetName: "simple_test_app"
|
||||
|
||||
Depends { name: "qtc" }
|
||||
Depends { name: "Qt.core" }
|
||||
Depends { name: "Qt.core-private"; required: false; condition: Qt.core.versionMajor > 4 }
|
||||
Depends { name: "Qt.core5compat"; condition: Qt.core.versionMajor > 5 }
|
||||
|
@@ -1,11 +1,11 @@
|
||||
import qbs.FileInfo
|
||||
|
||||
DynamicLibrary {
|
||||
condition: qtc.withAutotests
|
||||
condition: !qtc.present || qtc.withAutotests
|
||||
name: "Manual Test Simple Plugin"
|
||||
targetName: "simple_test_plugin"
|
||||
|
||||
Depends { name: "qtc" }
|
||||
Depends { name: "qtc"; required: false }
|
||||
Depends { name: "Qt.core" }
|
||||
|
||||
files: [ "simple_test_plugin.cpp" ]
|
||||
|
@@ -1,22 +1,19 @@
|
||||
import qbs.FileInfo
|
||||
|
||||
Project {
|
||||
QtcManualtest {
|
||||
name: "DeviceShell manualtest"
|
||||
QtcManualTest {
|
||||
name: "DeviceShell manualtest"
|
||||
|
||||
Depends { name: "Utils" }
|
||||
Depends { name: "app_version_header" }
|
||||
Depends { name: "Utils" }
|
||||
Depends { name: "app_version_header" }
|
||||
|
||||
files: [
|
||||
"tst_deviceshell.cpp",
|
||||
]
|
||||
cpp.defines: {
|
||||
var defines = base;
|
||||
var absLibExecPath = FileInfo.joinPaths(qbs.installRoot, qbs.installPrefix,
|
||||
qtc.ide_libexec_path);
|
||||
var relLibExecPath = FileInfo.relativePath(destinationDirectory, absLibExecPath);
|
||||
defines.push('TEST_RELATIVE_LIBEXEC_PATH="' + relLibExecPath + '"');
|
||||
return defines;
|
||||
}
|
||||
cpp.defines: {
|
||||
var defines = base;
|
||||
var absLibExecPath = FileInfo.joinPaths(qbs.installRoot, qbs.installPrefix,
|
||||
qtc.ide_libexec_path);
|
||||
var relLibExecPath = FileInfo.relativePath(destinationDirectory, absLibExecPath);
|
||||
defines.push('TEST_RELATIVE_LIBEXEC_PATH="' + relLibExecPath + '"');
|
||||
return defines;
|
||||
}
|
||||
|
||||
files: "tst_deviceshell.cpp"
|
||||
}
|
||||
|
@@ -1,6 +1,6 @@
|
||||
import qbs.FileInfo
|
||||
|
||||
QtcManualtest {
|
||||
QtcManualTest {
|
||||
name: "Manual FakeVim test"
|
||||
type: ["application"]
|
||||
|
||||
@@ -11,9 +11,7 @@ QtcManualtest {
|
||||
cpp.defines: base.concat(["FAKEVIM_STANDALONE"])
|
||||
cpp.includePaths: fakeVimDir
|
||||
|
||||
files: [
|
||||
"main.cpp"
|
||||
]
|
||||
files: "main.cpp"
|
||||
|
||||
Group {
|
||||
name: "FakeVim files"
|
||||
|
@@ -1,7 +1,7 @@
|
||||
Project {
|
||||
name: "QtcManualtests"
|
||||
name: "QtcManualTests"
|
||||
|
||||
condition: project.withAutotests // FIXME: Why are these not QtcManualTests?
|
||||
qbsSearchPaths: "qbs"
|
||||
|
||||
references: [
|
||||
"debugger/gui/gui.qbs",
|
||||
|
@@ -1,6 +1,6 @@
|
||||
import qbs.FileInfo
|
||||
|
||||
QtcManualtest {
|
||||
QtcManualTest {
|
||||
name: "Manual test plugin1"
|
||||
targetName: "plugin1"
|
||||
type: [ "dynamiclibrary" ]
|
||||
|
@@ -1,6 +1,6 @@
|
||||
import qbs.FileInfo
|
||||
|
||||
QtcManualtest {
|
||||
QtcManualTest {
|
||||
name: "Manual test plugin2"
|
||||
targetName: "plugin2"
|
||||
type: [ "dynamiclibrary" ]
|
||||
|
@@ -1,6 +1,6 @@
|
||||
import qbs.FileInfo
|
||||
|
||||
QtcManualtest {
|
||||
QtcManualTest {
|
||||
name: "Manual test plugin3"
|
||||
targetName: "plugin3"
|
||||
type: [ "dynamiclibrary" ]
|
||||
|
@@ -1,7 +1,7 @@
|
||||
Project {
|
||||
name: "Manual plugin test"
|
||||
|
||||
QtcManualtest {
|
||||
QtcManualTest {
|
||||
name: "Manual plugin view test"
|
||||
|
||||
Depends { name: "ExtensionSystem" }
|
||||
|
@@ -1,4 +1,4 @@
|
||||
QtcManualtest {
|
||||
QtcManualTest {
|
||||
name: "Manual ProParser test"
|
||||
Depends { name: "Qt.core" }
|
||||
|
||||
@@ -18,9 +18,7 @@ QtcManualtest {
|
||||
cpp.dynamicLibraries: "advapi32"
|
||||
}
|
||||
|
||||
files: [
|
||||
"main.cpp",
|
||||
]
|
||||
files: "main.cpp"
|
||||
|
||||
Group {
|
||||
name: "ProParser files"
|
||||
|
1
tests/manual/qbs/imports/CppApplication.qbs
Normal file
1
tests/manual/qbs/imports/CppApplication.qbs
Normal file
@@ -0,0 +1 @@
|
||||
QtcManualTest {}
|
1
tests/manual/qbs/imports/QtApplication.qbs
Normal file
1
tests/manual/qbs/imports/QtApplication.qbs
Normal file
@@ -0,0 +1 @@
|
||||
QtcManualTest {}
|
@@ -1,7 +1,5 @@
|
||||
QtcManualtest {
|
||||
QtcManualTest {
|
||||
name: "Manual debugger shootout test"
|
||||
|
||||
files: [
|
||||
"tst_codesize.cpp",
|
||||
]
|
||||
files: "tst_codesize.cpp"
|
||||
}
|
||||
|
@@ -1,13 +1,11 @@
|
||||
import qbs.FileInfo
|
||||
|
||||
QtcManualtest {
|
||||
QtcManualTest {
|
||||
name: "Spinner example"
|
||||
type: ["application"]
|
||||
|
||||
Depends { name: "Qt"; submodules: ["widgets"] }
|
||||
Depends { name: "Spinner" }
|
||||
|
||||
files: [
|
||||
"main.cpp",
|
||||
]
|
||||
files: "main.cpp"
|
||||
}
|
||||
|
@@ -1,15 +1,13 @@
|
||||
import qbs.FileInfo
|
||||
|
||||
QtcManualtest {
|
||||
QtcManualTest {
|
||||
name: "Manual SubDirFileContainer test"
|
||||
type: ["application"]
|
||||
|
||||
Depends { name: "Utils" }
|
||||
Depends { name: "app_version_header" }
|
||||
|
||||
files: [
|
||||
"tst_subdirfilecontainer.cpp",
|
||||
]
|
||||
files: "tst_subdirfilecontainer.cpp"
|
||||
|
||||
cpp.defines: {
|
||||
var defines = base;
|
||||
|
@@ -1,6 +1,6 @@
|
||||
import qbs.FileInfo
|
||||
|
||||
QtcManualtest {
|
||||
QtcManualTest {
|
||||
name: "Tasking demo"
|
||||
type: ["application"]
|
||||
|
||||
|
@@ -1,6 +1,4 @@
|
||||
import qbs.FileInfo
|
||||
|
||||
QtcManualtest {
|
||||
QtcManualTest {
|
||||
name: "Tasking imagescaling"
|
||||
type: ["application"]
|
||||
|
||||
|
@@ -3,13 +3,10 @@ import "../common/common.qbs" as Common
|
||||
CppApplication {
|
||||
name: "Manual Test Utils CrumblePath"
|
||||
|
||||
Depends { name: "qtc" }
|
||||
Depends { name: "Core" }
|
||||
Depends { name: "Utils" }
|
||||
|
||||
files: [
|
||||
"tst_manual_widgets_crumblepath.cpp",
|
||||
]
|
||||
files: "tst_manual_widgets_crumblepath.cpp"
|
||||
|
||||
Common {}
|
||||
}
|
||||
|
@@ -3,13 +3,10 @@ import "../common/common.qbs" as Common
|
||||
CppApplication {
|
||||
name: "Manual Test Utils InfoLabel"
|
||||
|
||||
Depends { name: "qtc" }
|
||||
Depends { name: "Core" }
|
||||
Depends { name: "Utils" }
|
||||
|
||||
files: [
|
||||
"tst_manual_widgets_infolabel.cpp",
|
||||
]
|
||||
files: "tst_manual_widgets_infolabel.cpp"
|
||||
|
||||
Common {}
|
||||
}
|
||||
|
@@ -1,12 +1,8 @@
|
||||
|
||||
CppApplication {
|
||||
name: "Manual Test Utils LayoutBuilder"
|
||||
|
||||
Depends { name: "qtc" }
|
||||
Depends { name: "Core" }
|
||||
Depends { name: "Utils" }
|
||||
|
||||
files: [
|
||||
"tst_manual_widgets_layoutbuilder.cpp",
|
||||
]
|
||||
files: "tst_manual_widgets_layoutbuilder.cpp"
|
||||
}
|
||||
|
@@ -3,13 +3,10 @@ import "../common/common.qbs" as Common
|
||||
CppApplication {
|
||||
name: "Manual Test Utils ManhattanStyle"
|
||||
|
||||
Depends { name: "qtc" }
|
||||
Depends { name: "Core" }
|
||||
Depends { name: "Utils" }
|
||||
|
||||
files: [
|
||||
"tst_manual_widgets_manhattanstyle.cpp",
|
||||
]
|
||||
files: "tst_manual_widgets_manhattanstyle.cpp"
|
||||
|
||||
Common {}
|
||||
}
|
||||
|
@@ -3,15 +3,12 @@ import "../common/common.qbs" as Common
|
||||
CppApplication {
|
||||
name: "Manual Test Tracing"
|
||||
|
||||
Depends { name: "qtc" }
|
||||
Depends { name: "Qt.quick" }
|
||||
Depends { name: "Tracing" }
|
||||
Depends { name: "Utils" }
|
||||
Depends { name: "Core" }
|
||||
|
||||
files: [
|
||||
"tst_manual_widgets_tracing.cpp",
|
||||
]
|
||||
files: "tst_manual_widgets_tracing.cpp"
|
||||
|
||||
Common {}
|
||||
}
|
||||
|
Reference in New Issue
Block a user