[wpiutil] Refactor SpanMatcher and TestPrinters from ntcore (#5658)

This commit is contained in:
Peter Johnson
2023-09-18 00:11:36 -07:00
committed by GitHub
parent 9fe258427a
commit 7be290147c
14 changed files with 86 additions and 45 deletions

View File

@@ -91,6 +91,19 @@ model {
}
}
}
"${nativeName}TestLib"(NativeLibrarySpec) {
sources {
cpp {
source {
srcDirs 'src/testlib/native/cpp'
include '**/*.cpp'
}
exportedHeaders {
srcDirs 'src/test/native/include'
}
}
}
}
}
testSuites {
"${nativeName}Test"(GoogleTestTestSuiteSpec) {
@@ -116,8 +129,10 @@ model {
binaries {
withType(GoogleTestTestSuiteBinarySpec) {
lib library: nativeName, linkage: 'shared'
lib library: "${nativeName}TestLib", linkage: 'shared'
if (!project.hasProperty('noWpiutil')) {
lib project: ':wpiutil', library: 'wpiutil', linkage: 'shared'
lib project: ':wpiutil', library: 'wpiutilTestLib', linkage: 'shared'
if (it.targetPlatform.name == nativeUtils.wpi.platforms.roborio) {
nativeUtils.useRequiredLibrary(it, 'ni_link_libraries', 'ni_runtime_libraries')
}