From 09beae6e4eee20847564d61448c2f28a73824c0a Mon Sep 17 00:00:00 2001 From: "Erik C. Thauvin" Date: Tue, 25 Mar 2025 13:14:57 -0700 Subject: [PATCH] Only check pitest arguments on Linux --- .../java/rife/bld/extension/PitestOperationBuild.java | 11 +++++++---- .../java/rife/bld/extension/PitestOperationTest.java | 3 +++ 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/src/bld/java/rife/bld/extension/PitestOperationBuild.java b/src/bld/java/rife/bld/extension/PitestOperationBuild.java index fc37994..613592d 100644 --- a/src/bld/java/rife/bld/extension/PitestOperationBuild.java +++ b/src/bld/java/rife/bld/extension/PitestOperationBuild.java @@ -108,10 +108,13 @@ public class PitestOperationBuild 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/PitestOperationTest.java b/src/test/java/rife/bld/extension/PitestOperationTest.java index 109e17b..bb5ed8c 100644 --- a/src/test/java/rife/bld/extension/PitestOperationTest.java +++ b/src/test/java/rife/bld/extension/PitestOperationTest.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.BaseProject; import rife.bld.Project; import rife.bld.WebProject; @@ -64,6 +66,7 @@ class PitestOperationTest { } @Test + @EnabledOnOs(OS.LINUX) void checkAllParameters() throws IOException { var args = Files.readAllLines(Paths.get("src", "test", "resources", "pitest-args.txt"));