diff options
author | nea <nea@nea.moe> | 2023-08-11 02:26:00 +0200 |
---|---|---|
committer | nea <nea@nea.moe> | 2023-08-11 02:26:00 +0200 |
commit | 69f8367389c9d6f60ca594053d9d470e5a8ec999 (patch) | |
tree | 4fe2d341ca9ec9b8aaa0ec5cb18c53bf63265844 /build.gradle.kts | |
parent | 912c9918d9a5afbfb023b650bed6e2754f030d5e (diff) | |
download | nealisp-69f8367389c9d6f60ca594053d9d470e5a8ec999.tar.gz nealisp-69f8367389c9d6f60ca594053d9d470e5a8ec999.tar.bz2 nealisp-69f8367389c9d6f60ca594053d9d470e5a8ec999.zip |
Add output capture and more test reports
Diffstat (limited to 'build.gradle.kts')
-rw-r--r-- | build.gradle.kts | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/build.gradle.kts b/build.gradle.kts index 48834ea..c0e28f1 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -13,3 +13,32 @@ publishing { } } } + +val testReportFile = layout.buildDirectory.file("test-results/nealisp/results.xml") + +tasks.create("testLisps", JavaExec::class) { + javaLauncher.set(javaToolchains.launcherFor(java.toolchain)) + classpath(sourceSets.test.get().runtimeClasspath) + mainClass.set("TestMain") + dependsOn(tasks.testClasses) + dependsOn(tasks.processTestResources) + outputs.file(testReportFile) + systemProperty("test.report", testReportFile.map { it.asFile.absolutePath }.get()) + systemProperty("test.suites", "test") + systemProperty("test.imports", "secondary") + group = "verification" +} + + +tasks.create("testLispsHtml", Exec::class) { + dependsOn("testLisps") + executable("xunit-viewer") + inputs.file(testReportFile) + val testReportHtmlFile = layout.buildDirectory.file("reports/nealisp/tests/index.html") + outputs.file(testReportHtmlFile) + args( + "-r", testReportFile.map { it.asFile.absolutePath }.get(), + "-o", testReportHtmlFile.map { it.asFile.absolutePath }.get() + ) + group = "verification" +} |