Files
allwpilib/shared/cppDesktopTestTask.gradle

22 lines
763 B
Groovy
Raw Permalink Normal View History

model {
tasks {
def ts = $.testSuites
project.tasks.register('testDesktopCpp') { testTask->
def systemArch = getCurrentArch()
def found = false
ts.each {
2025-09-08 17:14:23 -04:00
if (it in GoogleTestTestSuiteSpec && (it.name == "${nativeName}Test" || it.name == "${nativeName}Catch2Test")) {
it.binaries.each {
if (found) return
def arch = it.targetPlatform.name
if (arch == systemArch && it.buildType.name == 'debug') {
testTask.dependsOn it.tasks.run
found = true
}
}
}
}
}
}
}