修复 Native 观测性兼容并补齐分层验证流程

This commit is contained in:
2026-09-25 18:30:45 +00:00
parent 9cf2d235df
commit 4c7be4cd0d
11 changed files with 315 additions and 26 deletions
+20
View File
@@ -51,3 +51,23 @@ dependencies {
tasks.named('test') {
useJUnitPlatform()
}
// Run generated AOT test context on the JVM before the more expensive native compile.
tasks.register('testAot', Test) {
dependsOn tasks.named('aotTestClasses')
testClassesDirs = sourceSets.test.output.classesDirs
classpath = sourceSets.test.runtimeClasspath + sourceSets.aotTest.output
systemProperty 'spring.aot.enabled', 'true'
useJUnitPlatform()
shouldRunAfter tasks.named('test')
}
// Native tests check behavior, not throughput. Keep the application binary optimized.
graalvmNative {
binaries {
test {
quickBuild = true
runtimeArgs.add(providers.systemProperty('user.home').map { "-Duser.home=${it}" })
}
}
}