Qbs build system: Add a component for test files groups

Mainly in order to enforce a unified group name across QtC libraries and
plugins.

Change-Id: I6eafe0f9d227ec73d8c9029675866c67063768fb
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
Alessandro Portale
2023-03-21 10:01:28 +01:00
parent 1029cb959b
commit 50a214de9e
24 changed files with 29 additions and 68 deletions

View File

@@ -0,0 +1,6 @@
import qbs 1.0
Group {
name: "Unit tests"
condition: qtc.testsEnabled
}

View File

@@ -116,9 +116,7 @@ Project {
"sdkmanageroutputparser.h"
]
Group {
name: "Unit tests"
condition: qtc.testsEnabled
QtcTestFiles {
files: [
"android_tst.qrc",
"androidsdkmanager_test.cpp",

View File

@@ -125,9 +125,7 @@ QtcPlugin {
]
}
Group {
name: "Test sources"
condition: qtc.testsEnabled
QtcTestFiles {
files: [
"autotestunittests.cpp",
"autotestunittests.h",

View File

@@ -94,9 +94,7 @@ QtcPlugin {
}
}
Group {
name: "Tests"
condition: qtc.testsEnabled
QtcTestFiles {
prefix: "test/"
files: [
"activationsequenceprocessortest.cpp",

View File

@@ -54,10 +54,8 @@ QtcPlugin {
"clangformatutils.cpp",
]
Group {
name: "Tests"
QtcTestFiles {
prefix: "tests/"
condition: qtc.testsEnabled
cpp.defines: outer.concat('TESTDATA_DIR="' + sourceDirectory + "/tests/data" + '"')
files: [
"clangformat-test.cpp",

View File

@@ -74,9 +74,7 @@ QtcPlugin {
"virtualfilesystemoverlay.h",
]
Group {
name: "Unit tests"
condition: qtc.testsEnabled
QtcTestFiles {
files: [
"clangtoolspreconfiguredsessiontests.cpp",
"clangtoolspreconfiguredsessiontests.h",

View File

@@ -21,9 +21,7 @@ QtcPlugin {
"compilationdbparser.h",
]
Group {
name: "Tests"
condition: qtc.testsEnabled
QtcTestFiles {
files: [
"compilationdatabasetests.cpp",
"compilationdatabasetests.h",

View File

@@ -271,9 +271,7 @@ Project {
]
}
Group {
name: "Tests"
condition: qtc.testsEnabled
QtcTestFiles {
files: [
"testdatadir.cpp",
"testdatadir.h",

View File

@@ -245,9 +245,7 @@ QtcPlugin {
]
}
Group {
name: "Tests"
condition: qtc.testsEnabled
QtcTestFiles {
cpp.defines: outer.concat(['SRCDIR="' + FileInfo.path(filePath) + '"'])
files: [
"compileroptionsbuilder_test.cpp",

View File

@@ -239,9 +239,7 @@ Project {
]
}
Group {
name: "Unit tests"
condition: qtc.testsEnabled
QtcTestFiles {
files: [
"debuggerunittests.qrc",
]

View File

@@ -77,9 +77,7 @@ QtcPlugin {
]
}
Group {
name: "Tests"
condition: qtc.testsEnabled
QtcTestFiles {
files: [ "gotoslot_test.cpp" ]
cpp.defines: outer.concat(['SRCDIR="' + FileInfo.path(filePath) + '"'])

View File

@@ -25,9 +25,7 @@ QtcPlugin {
"fakevimtr.h",
]
Group {
name: "Tests"
condition: qtc.testsEnabled
QtcTestFiles {
files: ["fakevim_test.cpp"]
}
}

View File

@@ -58,8 +58,7 @@ QtcPlugin {
"settingshandler.cpp",
]
Group {
name: "McuSupport test files"
QtcTestFiles {
condition: qtc.testsEnabled && (qtc_gtest_gmock.hasRepo || qtc_gtest_gmock.externalLibsPresent)
prefix: "test/"
files: [

View File

@@ -75,9 +75,7 @@ QtcPlugin {
files: [ "PerfProfilerFlameGraphView.qml" ]
}
Group {
name: "Unit tests"
condition: qtc.testsEnabled
QtcTestFiles {
prefix: "tests/"
files: [
"perfprofilertracefile_test.cpp",

View File

@@ -250,9 +250,7 @@ Project {
]
}
Group {
name: "Tests"
condition: qtc.testsEnabled
QtcTestFiles {
files: ["outputparser_test.h", "outputparser_test.cpp"]
}

View File

@@ -54,9 +54,7 @@ QtcPlugin {
"qmljstools.qrc"
]
Group {
name: "Tests"
condition: qtc.testsEnabled
QtcTestFiles {
files: ["qmljstools_test.cpp"]
}

View File

@@ -38,9 +38,7 @@ QtcPlugin {
]
}
Group {
name: "Unit tests"
condition: qtc.testsEnabled
QtcTestFiles {
prefix: "tests/"
files: [
"qmlpreviewclient_test.cpp",

View File

@@ -73,9 +73,7 @@ QtcPlugin {
files: "qml/**"
}
Group {
name: "Unit tests"
condition: qtc.testsEnabled
QtcTestFiles {
prefix: "tests/"
files: [
"debugmessagesmodel_test.cpp", "debugmessagesmodel_test.h",

View File

@@ -67,9 +67,7 @@ Project {
"images/embeddedtarget.png",
]
Group {
name: "Tests"
condition: qtc.testsEnabled
QtcTestFiles {
files: [
"filesystemaccess_test.cpp",
"filesystemaccess_test.h",

View File

@@ -13,9 +13,7 @@ QtcPlugin {
"silversearcherplugin.cpp", "silversearcherplugin.h",
]
Group {
name: "Tests"
condition: qtc.testsEnabled
QtcTestFiles {
files: [
"outputparser_test.cpp",
"outputparser_test.h",

View File

@@ -222,9 +222,7 @@ Project {
]
}
Group {
name: "Tests"
condition: qtc.testsEnabled
QtcTestFiles {
files: [
"texteditor_test.cpp",
]

View File

@@ -76,9 +76,7 @@ QtcPlugin {
]
}
Group {
name: "Test sources"
condition: qtc.testsEnabled
QtcTestFiles {
files: [
"valgrindmemcheckparsertest.cpp",
"valgrindmemcheckparsertest.h",

View File

@@ -23,9 +23,7 @@ QtcPlugin {
"vcpkgsettings.h",
]
Group {
name: "Unit tests"
condition: qtc.testsEnabled
QtcTestFiles {
files: [
"vcpkg_test.h",
"vcpkg_test.cpp",

View File

@@ -33,9 +33,7 @@ QtcPlugin {
"webassemblytoolchain.h",
]
Group {
name: "Unit tests"
condition: qtc.testsEnabled
QtcTestFiles {
files: [
"webassembly_test.cpp",
"webassembly_test.h",