forked from qt-creator/qt-creator
Tests: Provide qbs files for some manual tests
Change-Id: I6c5c839dc199379edaf4c43ae4d6a0ed6ebdf751 Reviewed-by: <github-actions-qt-creator@cristianadam.eu> Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
21
qbs/imports/QtcManualtest.qbs
Normal file
21
qbs/imports/QtcManualtest.qbs
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
import qbs
|
||||||
|
import qbs.FileInfo
|
||||||
|
|
||||||
|
QtcProduct {
|
||||||
|
type: ["application"]
|
||||||
|
|
||||||
|
Depends { name: "Qt.testlib" }
|
||||||
|
Depends { name: "copyable_resource" }
|
||||||
|
targetName: "tst_" + name.split(' ').join("")
|
||||||
|
|
||||||
|
cpp.rpaths: [
|
||||||
|
project.buildDirectory + '/' + qtc.ide_library_path,
|
||||||
|
project.buildDirectory + '/' + qtc.ide_plugin_path
|
||||||
|
]
|
||||||
|
cpp.defines: {
|
||||||
|
var defines = base.filter(function(d) { return d !== "QT_RESTRICTED_CAST_FROM_ASCII"; });
|
||||||
|
return defines;
|
||||||
|
}
|
||||||
|
|
||||||
|
install: false
|
||||||
|
}
|
13
tests/manual/debugger/gui/gui.qbs
Normal file
13
tests/manual/debugger/gui/gui.qbs
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
QtApplication {
|
||||||
|
name: "Manual debugger gui test"
|
||||||
|
Depends { name: "Qt.widgets" }
|
||||||
|
|
||||||
|
files: [
|
||||||
|
"mainwindow.cpp",
|
||||||
|
"mainwindow.h",
|
||||||
|
"mainwindow.ui",
|
||||||
|
"tst_gui.cpp",
|
||||||
|
]
|
||||||
|
|
||||||
|
install: false
|
||||||
|
}
|
13
tests/manual/debugger/simple/simple.qbs
Normal file
13
tests/manual/debugger/simple/simple.qbs
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
import qbs
|
||||||
|
import qbs.FileInfo
|
||||||
|
|
||||||
|
Project {
|
||||||
|
name: "Manual debugger simple tests"
|
||||||
|
|
||||||
|
condition: project.withAutotests
|
||||||
|
|
||||||
|
references: [
|
||||||
|
"simple_test_app.qbs",
|
||||||
|
"simple_test_plugin.qbs"
|
||||||
|
]
|
||||||
|
}
|
73
tests/manual/debugger/simple/simple_test_app.qbs
Normal file
73
tests/manual/debugger/simple/simple_test_app.qbs
Normal file
@@ -0,0 +1,73 @@
|
|||||||
|
import qbs.File
|
||||||
|
import qbs.FileInfo
|
||||||
|
|
||||||
|
CppApplication {
|
||||||
|
name: "Manual Test Simple Application"
|
||||||
|
targetName: "simple_test_app"
|
||||||
|
|
||||||
|
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 }
|
||||||
|
Depends { name: "Qt.gui" }
|
||||||
|
Depends { name: "Qt.xml"; condition: Qt.core.versionMajor < 6 }
|
||||||
|
Depends { name: "Qt.widgets"; condition: Qt.core.versionMajor > 4 }
|
||||||
|
Depends { name: "Qt.network" }
|
||||||
|
Depends { name: "Qt.script"; required: false }
|
||||||
|
Depends { name: "Qt.webkit"; required: false }
|
||||||
|
Depends { name: "Qt.webkitwidgets"; required: false; condition: Qt.core.versionMajor > 4 }
|
||||||
|
|
||||||
|
cpp.cxxLanguageVersion: "c++11"
|
||||||
|
|
||||||
|
cpp.defines: {
|
||||||
|
var additional = ["USE_GUILIB"];
|
||||||
|
|
||||||
|
if (File.exists("/usr/include/boost/optional.hpp"))
|
||||||
|
additional = additional.concat(["HAS_BOOST"]);
|
||||||
|
|
||||||
|
if (File.exists("/usr/include/eigen2/Eigen/Core") || File.exists("/usr/local/include/eigen2/Eigen/Core"))
|
||||||
|
additional = additional.concat(["HAS_EIGEN2"]);
|
||||||
|
if (File.exists("/usr/include/eigen3/Eigen/Core") || File.exists("/usr/local/include/eigen3/Eigen/Core"))
|
||||||
|
additional = additional.concat(["HAS_EIGEN3"]);
|
||||||
|
|
||||||
|
if (Qt.core.versionMajor > 4)
|
||||||
|
additional = additional.concat(["HAS_PRIVATE"]);
|
||||||
|
|
||||||
|
if (Qt.script.present)
|
||||||
|
additional = additional.concat(["HAS_SCRIPT"]);
|
||||||
|
|
||||||
|
if (qbs.toolchain.contains("msvc"))
|
||||||
|
additional = additional.concat(["_CRT_SECURE_NO_WARNINGS"]);
|
||||||
|
|
||||||
|
/* use following for semi-automated testing */
|
||||||
|
/* additional.concat(["USE_AUTORUN=1"]); */
|
||||||
|
|
||||||
|
return additional;
|
||||||
|
}
|
||||||
|
|
||||||
|
cpp.includePaths: {
|
||||||
|
var additional = [];
|
||||||
|
|
||||||
|
if (File.exists("/usr/include/eigen2/Eigen/Core"))
|
||||||
|
additional = additional.concat(["/usr/include/eigen2"]);
|
||||||
|
if (File.exists("/usr/include/eigen3/Eigen/Core"))
|
||||||
|
additional = additional.concat(["/usr/include/eigen3"]);
|
||||||
|
if (File.exists("/usr/local/include/eigen2/Eigen/Core"))
|
||||||
|
additional.concat(["/usr/local/include/eigen2"]);
|
||||||
|
if (File.exists("/usr/local/include/eigen3/Eigen/Core"))
|
||||||
|
additional = additional.concat(["/usr/include/eigen3"]);
|
||||||
|
|
||||||
|
return additional;
|
||||||
|
}
|
||||||
|
|
||||||
|
files: [
|
||||||
|
"simple_test_app.cpp"
|
||||||
|
]
|
||||||
|
|
||||||
|
destinationDirectory: FileInfo.joinPaths(
|
||||||
|
FileInfo.path(project.buildDirectory + '/'
|
||||||
|
+ FileInfo.relativePath(project.ide_source_tree,
|
||||||
|
sourceDirectory)),
|
||||||
|
"simple")
|
||||||
|
|
||||||
|
install: false
|
||||||
|
}
|
16
tests/manual/debugger/simple/simple_test_plugin.qbs
Normal file
16
tests/manual/debugger/simple/simple_test_plugin.qbs
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
import qbs.FileInfo
|
||||||
|
|
||||||
|
DynamicLibrary {
|
||||||
|
name: "Manual Test Simple Plugin"
|
||||||
|
targetName: "simple_test_plugin"
|
||||||
|
|
||||||
|
Depends { name: "Qt.core" }
|
||||||
|
|
||||||
|
files: [ "simple_test_plugin.cpp" ]
|
||||||
|
|
||||||
|
destinationDirectory: FileInfo.joinPaths(
|
||||||
|
FileInfo.path(project.buildDirectory + '/'
|
||||||
|
+ FileInfo.relativePath(project.ide_source_tree,
|
||||||
|
sourceDirectory)),
|
||||||
|
"simple")
|
||||||
|
}
|
29
tests/manual/fakevim/fakevim.qbs
Normal file
29
tests/manual/fakevim/fakevim.qbs
Normal file
@@ -0,0 +1,29 @@
|
|||||||
|
import qbs.FileInfo
|
||||||
|
|
||||||
|
QtcManualtest {
|
||||||
|
name: "Manual FakeVim test"
|
||||||
|
type: ["application"]
|
||||||
|
|
||||||
|
Depends { name: "Utils" }
|
||||||
|
|
||||||
|
property string fakeVimDir: FileInfo.joinPaths(project.ide_source_tree, "src", "plugins", "fakevim")
|
||||||
|
|
||||||
|
cpp.defines: base.concat(["FAKEVIM_STANDALONE"])
|
||||||
|
cpp.includePaths: fakeVimDir
|
||||||
|
|
||||||
|
files: [
|
||||||
|
"main.cpp"
|
||||||
|
]
|
||||||
|
|
||||||
|
Group {
|
||||||
|
name: "FakeVim files"
|
||||||
|
|
||||||
|
prefix: fakeVimDir + "/"
|
||||||
|
files: [
|
||||||
|
"fakevimactions.cpp",
|
||||||
|
"fakevimactions.h",
|
||||||
|
"fakevimhandler.cpp",
|
||||||
|
"fakevimhandler.h",
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
@@ -6,6 +6,15 @@ Project {
|
|||||||
condition: project.withAutotests
|
condition: project.withAutotests
|
||||||
|
|
||||||
references: [
|
references: [
|
||||||
|
"debugger/gui/gui.qbs",
|
||||||
|
"debugger/simple/simple.qbs",
|
||||||
|
"fakevim/fakevim.qbs",
|
||||||
|
"pluginview/pluginview.qbs",
|
||||||
|
"process/process.qbs",
|
||||||
|
"proparser/testreader.qbs",
|
||||||
|
"shootout/shootout.qbs",
|
||||||
|
"ssh/shell/shell.qbs",
|
||||||
|
"ssh/sftpfsmodel/sftpfsmodel.qbs",
|
||||||
"widgets/widgets.qbs",
|
"widgets/widgets.qbs",
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
14
tests/manual/pluginview/plugins/plugin1/plugin1.qbs
Normal file
14
tests/manual/pluginview/plugins/plugin1/plugin1.qbs
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
QtcManualtest {
|
||||||
|
name: "Manual test plugin1"
|
||||||
|
targetName: "plugin1"
|
||||||
|
type: [ "dynamiclibrary" ]
|
||||||
|
|
||||||
|
Depends { name: "ExtensionSystem" }
|
||||||
|
Depends { name: "Manual test plugin2"}
|
||||||
|
Depends { name: "Manual test plugin3"}
|
||||||
|
|
||||||
|
files: [
|
||||||
|
"plugin1.cpp",
|
||||||
|
"plugin1.h"
|
||||||
|
]
|
||||||
|
}
|
12
tests/manual/pluginview/plugins/plugin2/plugin2.qbs
Normal file
12
tests/manual/pluginview/plugins/plugin2/plugin2.qbs
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
QtcManualtest {
|
||||||
|
name: "Manual test plugin2"
|
||||||
|
targetName: "plugin2"
|
||||||
|
type: [ "dynamiclibrary" ]
|
||||||
|
|
||||||
|
Depends { name: "ExtensionSystem" }
|
||||||
|
|
||||||
|
files: [
|
||||||
|
"plugin2.cpp",
|
||||||
|
"plugin2.h"
|
||||||
|
]
|
||||||
|
}
|
13
tests/manual/pluginview/plugins/plugin3/plugin3.qbs
Normal file
13
tests/manual/pluginview/plugins/plugin3/plugin3.qbs
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
QtcManualtest {
|
||||||
|
name: "Manual test plugin3"
|
||||||
|
targetName: "plugin3"
|
||||||
|
type: [ "dynamiclibrary" ]
|
||||||
|
|
||||||
|
Depends { name: "ExtensionSystem" }
|
||||||
|
Depends { name: "Manual test plugin2" }
|
||||||
|
|
||||||
|
files: [
|
||||||
|
"plugin3.cpp",
|
||||||
|
"plugin3.h"
|
||||||
|
]
|
||||||
|
}
|
21
tests/manual/pluginview/pluginview.qbs
Normal file
21
tests/manual/pluginview/pluginview.qbs
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
Project {
|
||||||
|
name: "Manual plugin test"
|
||||||
|
|
||||||
|
QtcManualtest {
|
||||||
|
name: "Manual plugin view test"
|
||||||
|
|
||||||
|
Depends { name: "ExtensionSystem" }
|
||||||
|
Depends { name: "Utils" }
|
||||||
|
|
||||||
|
files: [
|
||||||
|
"plugindialog.cpp",
|
||||||
|
"plugindialog.h"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
||||||
|
references: [
|
||||||
|
"plugins/plugin1/plugin1.qbs",
|
||||||
|
"plugins/plugin2/plugin2.qbs",
|
||||||
|
"plugins/plugin3/plugin3.qbs",
|
||||||
|
]
|
||||||
|
}
|
14
tests/manual/process/process.qbs
Normal file
14
tests/manual/process/process.qbs
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
import qbs
|
||||||
|
|
||||||
|
QtcManualtest {
|
||||||
|
name: "Manual QtcProcess test"
|
||||||
|
condition: qbs.targetOS.contains("unix")
|
||||||
|
Depends { name: "Utils" }
|
||||||
|
targetName: "process"
|
||||||
|
|
||||||
|
files: [
|
||||||
|
"main.cpp",
|
||||||
|
"mainwindow.cpp",
|
||||||
|
"mainwindow.h"
|
||||||
|
]
|
||||||
|
}
|
61
tests/manual/proparser/testreader.qbs
Normal file
61
tests/manual/proparser/testreader.qbs
Normal file
@@ -0,0 +1,61 @@
|
|||||||
|
QtcManualtest {
|
||||||
|
name: "Manual ProParser test"
|
||||||
|
Depends { name: "Qt.core" }
|
||||||
|
|
||||||
|
cpp.includePaths: base.concat(["../../../src/shared/proparser/",
|
||||||
|
"../../../src/libs/"])
|
||||||
|
|
||||||
|
cpp.defines: ["QMAKE_BUILTIN_PRFS",
|
||||||
|
"QT_NO_CAST_TO_ASCII",
|
||||||
|
"QT_RESTRICTED_CAST_FROM_ASCII",
|
||||||
|
"QT_USE_QSTRINGBUILDER",
|
||||||
|
"PROEVALUATOR_FULL",
|
||||||
|
"PROEVALUATOR_CUMULATIVE",
|
||||||
|
"PROEVALUATOR_INIT_PROPS"]
|
||||||
|
|
||||||
|
Properties {
|
||||||
|
condition: qbs.targetOS.contains("windows")
|
||||||
|
cpp.dynamicLibraries: "advapi32"
|
||||||
|
}
|
||||||
|
|
||||||
|
files: [
|
||||||
|
"main.cpp",
|
||||||
|
]
|
||||||
|
|
||||||
|
Group {
|
||||||
|
name: "ProParser files"
|
||||||
|
prefix: "../../../src/shared/proparser/"
|
||||||
|
|
||||||
|
files: [
|
||||||
|
"ioutils.cpp",
|
||||||
|
"ioutils.h",
|
||||||
|
"profileevaluator.cpp",
|
||||||
|
"profileevaluator.h",
|
||||||
|
"proitems.cpp",
|
||||||
|
"proitems.h",
|
||||||
|
"proparser.qrc",
|
||||||
|
"qmake_global.h",
|
||||||
|
"qmakebuiltins.cpp",
|
||||||
|
"qmakeevaluator.cpp",
|
||||||
|
"qmakeevaluator.h",
|
||||||
|
"qmakeevaluator_p.h",
|
||||||
|
"qmakeglobals.cpp",
|
||||||
|
"qmakeglobals.h",
|
||||||
|
"qmakeparser.cpp",
|
||||||
|
"qmakeparser.h",
|
||||||
|
"qmakevfs.cpp",
|
||||||
|
"qmakevfs.h",
|
||||||
|
"registry.cpp",
|
||||||
|
"registry_p.h",
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
||||||
|
Group {
|
||||||
|
name: "Porting Helper"
|
||||||
|
prefix: "../../../src/libs/utils/"
|
||||||
|
|
||||||
|
files: [
|
||||||
|
"porting.h"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
7
tests/manual/shootout/shootout.qbs
Normal file
7
tests/manual/shootout/shootout.qbs
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
QtcManualtest {
|
||||||
|
name: "Manual debugger shootout test"
|
||||||
|
|
||||||
|
files: [
|
||||||
|
"tst_codesize.cpp",
|
||||||
|
]
|
||||||
|
}
|
38
tests/manual/ssh/sftpfsmodel/sftpfsmodel.qbs
Normal file
38
tests/manual/ssh/sftpfsmodel/sftpfsmodel.qbs
Normal file
@@ -0,0 +1,38 @@
|
|||||||
|
import qbs
|
||||||
|
import qbs.FileInfo
|
||||||
|
|
||||||
|
QtcManualtest {
|
||||||
|
name: "Manual sftpfs model test"
|
||||||
|
condition: qbs.targetOS.contains("unix")
|
||||||
|
Depends { name: "Utils" }
|
||||||
|
Depends { name: "QtcSsh" }
|
||||||
|
Depends { name: "Qt.widgets" }
|
||||||
|
|
||||||
|
cpp.includePaths: [ "../../../../src/shared/modeltest" ]
|
||||||
|
|
||||||
|
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: [
|
||||||
|
"main.cpp",
|
||||||
|
"window.cpp",
|
||||||
|
"window.h",
|
||||||
|
"window.ui",
|
||||||
|
]
|
||||||
|
|
||||||
|
Group {
|
||||||
|
name: "Model test files"
|
||||||
|
prefix: "../../../../src/shared/modeltest/"
|
||||||
|
|
||||||
|
files: [
|
||||||
|
"modeltest.cpp",
|
||||||
|
"modeltest.h"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
17
tests/manual/ssh/shell/shell.qbs
Normal file
17
tests/manual/ssh/shell/shell.qbs
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
import qbs
|
||||||
|
|
||||||
|
QtcManualtest {
|
||||||
|
name: "Manual ssh shell test"
|
||||||
|
condition: qbs.targetOS.contains("unix")
|
||||||
|
Depends { name: "Utils" }
|
||||||
|
Depends { name: "QtcSsh" }
|
||||||
|
Depends { name: "Qt.network" }
|
||||||
|
|
||||||
|
files: [
|
||||||
|
"argumentscollector.cpp",
|
||||||
|
"argumentscollector.h",
|
||||||
|
"main.cpp",
|
||||||
|
"shell.cpp",
|
||||||
|
"shell.h",
|
||||||
|
]
|
||||||
|
}
|
Reference in New Issue
Block a user