Optimize unit test app config.

This commit is contained in:
Roman Telezhynskyi 2023-01-10 10:02:30 +02:00
parent 895b02ef0d
commit 3af79ccfcc
5 changed files with 11 additions and 20 deletions

6
qbs/imports/VTestApp.qbs Normal file
View File

@ -0,0 +1,6 @@
VApp {
type: base.concat("autotest")
bundle.isBundle: false
install: false
condition: buildconfig.enableUnitTests
}

View File

@ -1,7 +1,7 @@
import qbs.FileInfo
import qbs.File
VApp {
VTestApp {
Depends { name: "buildconfig" }
Depends { name: "Qt"; submodules: ["testlib", "gui", "printsupport"] }
Depends { name: "VTestLib" }
@ -9,10 +9,7 @@ VApp {
name: "CollectionTest"
buildconfig.appTarget: qbs.targetOS.contains("macos") ? "CollectionTest" : "collectionTest"
targetName: buildconfig.appTarget
type: base.concat("autotest", "tst_files")
bundle.isBundle: false
install: false
condition: buildconfig.enableUnitTests
type: base.concat("tst_files")
files: [
"qttestmainlambda.cpp",

View File

@ -1,15 +1,11 @@
VApp {
VTestApp {
Depends { name: "buildconfig" }
Depends { name: "QMUParserLib" }
name: "ParserTest"
buildconfig.appTarget: qbs.targetOS.contains("macos") ? "ParserTest" : "parserTest"
targetName: buildconfig.appTarget
type: base.concat("autotest")
consoleApplication: true
bundle.isBundle: false
install: false
condition: buildconfig.enableUnitTests
files: [
"main.cpp"

View File

@ -1,6 +1,6 @@
import qbs.FileInfo
VApp {
VTestApp {
Depends { name: "buildconfig" }
Depends { name: "VTestLib" }
Depends { name: "Qt"; submodules: ["testlib", "xml", "gui", "printsupport"] }
@ -8,10 +8,6 @@ VApp {
name: "TranslationsTest"
buildconfig.appTarget: qbs.targetOS.contains("macos") ? "TranslationsTest" : "translationsTest"
targetName: buildconfig.appTarget
type: base.concat("autotest")
bundle.isBundle: false
install: false
condition: buildconfig.enableUnitTests
files: [
"qttestmainlambda.cpp",

View File

@ -1,4 +1,4 @@
VApp {
VTestApp {
Depends { name: "buildconfig" }
Depends { name: "VTestLib" }
Depends { name: "Qt"; submodules: ["testlib"] }
@ -11,10 +11,6 @@ VApp {
name: "ValentinaTest"
buildconfig.appTarget: qbs.targetOS.contains("macos") ? "ValentinaTest" : "valentinaTest"
targetName: buildconfig.appTarget
type: base.concat("autotest")
bundle.isBundle: false
install: false
condition: buildconfig.enableUnitTests
files: [
"qttestmainlambda.cpp",