Add Gradle task "testNative"

Support running native tests with "gw testNative" for consistency with "gw test".
This commit is contained in:
translatenix
2024-02-14 06:14:21 -08:00
committed by Philip K.F. Hölzenspies
parent a49526649d
commit c3473cc626
3 changed files with 8 additions and 3 deletions

View File

@@ -28,7 +28,8 @@ jenv enable-plugin export
[source,shell] [source,shell]
---- ----
gw clean gw clean
gw test gw test # run all tests except native executable tests
gw testNative # run native executable tests
gw spotlessApply # fix code formatting gw spotlessApply # fix code formatting
gw build # build everything except native executables gw build # build everything except native executables
gw buildNative # build macOS executable on macOS, gw buildNative # build macOS executable on macOS,

View File

@@ -1,6 +1,10 @@
val assembleNative by tasks.registering {} val assembleNative by tasks.registering {}
val checkNative by tasks.registering {} val testNative by tasks.registering {}
val checkNative by tasks.registering {
dependsOn(testNative)
}
val buildNative by tasks.registering { val buildNative by tasks.registering {
dependsOn(assembleNative, checkNative) dependsOn(assembleNative, checkNative)

View File

@@ -271,7 +271,7 @@ val testAlpineExecutableAmd64 by tasks.registering(Test::class) {
} }
} }
tasks.checkNative { tasks.testNative {
dependsOn(testLinuxExecutableAmd64) dependsOn(testLinuxExecutableAmd64)
dependsOn(testLinuxExecutableAarch64) dependsOn(testLinuxExecutableAarch64)
dependsOn(testMacExecutableAmd64) dependsOn(testMacExecutableAmd64)