From d053fbfb7599ce2648c8dab9a6ce8edf0fc391a6 Mon Sep 17 00:00:00 2001 From: "Erik C. Thauvin" Date: Tue, 25 Mar 2025 12:15:39 -0700 Subject: [PATCH] Only check jacoco arguments on Linux --- .../bld/extension/JacocoReportOperationBuild.java | 11 +++++++---- .../rife/bld/extension/JacocoReportOperationTest.java | 3 +++ 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/src/bld/java/rife/bld/extension/JacocoReportOperationBuild.java b/src/bld/java/rife/bld/extension/JacocoReportOperationBuild.java index 97c73f7..30f8198 100644 --- a/src/bld/java/rife/bld/extension/JacocoReportOperationBuild.java +++ b/src/bld/java/rife/bld/extension/JacocoReportOperationBuild.java @@ -100,10 +100,13 @@ public class JacocoReportOperationBuild extends Project { @Override public void test() throws Exception { - new ExecOperation() - .fromProject(this) - .command("scripts/cliargs.sh") - .execute(); + var os = System.getProperty("os.name"); + if (os != null && os.toLowerCase().contains("linux")) { + new ExecOperation() + .fromProject(this) + .command("scripts/cliargs.sh") + .execute(); + } super.test(); } } diff --git a/src/test/java/rife/bld/extension/JacocoReportOperationTest.java b/src/test/java/rife/bld/extension/JacocoReportOperationTest.java index 06a9eb9..46b8bf2 100644 --- a/src/test/java/rife/bld/extension/JacocoReportOperationTest.java +++ b/src/test/java/rife/bld/extension/JacocoReportOperationTest.java @@ -18,6 +18,8 @@ package rife.bld.extension; import org.assertj.core.api.AutoCloseableSoftAssertions; import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.condition.EnabledOnOs; +import org.junit.jupiter.api.condition.OS; import rife.bld.Project; import rife.bld.operations.exceptions.ExitStatusException; @@ -58,6 +60,7 @@ class JacocoReportOperationTest { } @Test + @EnabledOnOs(OS.LINUX) void checkAllParamsTest() throws IOException { var supported = List.of("", "--classfiles",