mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-07-04 03:11:43 +00:00
[wpinet] Translate unit tests to catch2 (#8954)
This commit is contained in:
@@ -28,7 +28,8 @@ ext {
|
||||
staticGtestConfigs = [:]
|
||||
}
|
||||
|
||||
staticGtestConfigs["${nativeName}Test"] = []
|
||||
def nativeTestSuiteName = project.findProperty('nativeTestSuiteName') ?: "${nativeName}Test"
|
||||
staticGtestConfigs[nativeTestSuiteName] = []
|
||||
|
||||
apply from: "${rootDir}/shared/googletest.gradle"
|
||||
apply from: "${rootDir}/shared/catch2.gradle"
|
||||
@@ -194,7 +195,7 @@ model {
|
||||
}
|
||||
}
|
||||
testSuites {
|
||||
"${nativeName}Test"(GoogleTestTestSuiteSpec) {
|
||||
"${nativeTestSuiteName}"(GoogleTestTestSuiteSpec) {
|
||||
for(NativeComponentSpec c : $.components) {
|
||||
if (c.name == nativeName) {
|
||||
testing c
|
||||
@@ -216,6 +217,11 @@ model {
|
||||
}
|
||||
}
|
||||
}
|
||||
if (nativeTestSuiteName.contains('Catch2')) {
|
||||
binaries.all {
|
||||
lib project: ':thirdparty:catch2', library: 'catch2', linkage: 'static'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
binaries {
|
||||
|
||||
Reference in New Issue
Block a user