Compare commits

...

3 commits

4 changed files with 28 additions and 12 deletions

View file

@ -4,11 +4,13 @@ on: [push, pull_request, workflow_dispatch]
jobs: jobs:
build-bld-project: build-bld-project:
runs-on: ubuntu-latest
strategy: strategy:
matrix: matrix:
java-version: [ 17, 21, 24 ] java-version: [ 17, 21, 24 ]
kotlin-version: [ 1.9.25, 2.0.21, 2.1.20 ]
os: [ ubuntu-latest, windows-latest, macos-latest ]
runs-on: ${{ matrix.os }}
steps: steps:
- name: Checkout source repository - name: Checkout source repository
@ -22,6 +24,14 @@ jobs:
distribution: "zulu" distribution: "zulu"
java-version: ${{ matrix.java-version }} java-version: ${{ matrix.java-version }}
- name: Download dependencies [examples]
working-directory: examples
run: ./bld download
- name: Run PIT tests [examples]
working-directory: examples
run: ./bld compile pit
- name: Download dependencies - name: Download dependencies
run: ./bld download run: ./bld download

View file

@ -108,10 +108,13 @@ public class PitestOperationBuild extends Project {
@Override @Override
public void test() throws Exception { public void test() throws Exception {
var os = System.getProperty("os.name");
if (os != null && os.toLowerCase().contains("linux")) {
new ExecOperation() new ExecOperation()
.fromProject(this) .fromProject(this)
.command("scripts/cliargs.sh") .command("scripts/cliargs.sh")
.execute(); .execute();
}
super.test(); super.test();
} }
} }

View file

@ -432,9 +432,9 @@ public class PitestOperation extends AbstractProcessOperation<PitestOperation> {
if (project_ != null) { if (project_ != null) {
args.add(javaTool()); args.add(javaTool());
args.add("-cp"); args.add("-cp");
args.add(String.format("%s:%s:%s:%s", new File(project_.libTestDirectory(), "*"), args.add(String.format("%s%s%s%s%s%s%s", new File(project_.libTestDirectory(), "*"), File.pathSeparator,
new File(project_.libCompileDirectory(), "*"), project_.buildMainDirectory(), new File(project_.libCompileDirectory(), "*"), File.pathSeparator, project_.buildMainDirectory(),
project_.buildTestDirectory())); File.pathSeparator, project_.buildTestDirectory()));
args.add("org.pitest.mutationtest.commandline.MutationCoverageReport"); args.add("org.pitest.mutationtest.commandline.MutationCoverageReport");
if (!options_.containsKey(SOURCE_DIRS)) { if (!options_.containsKey(SOURCE_DIRS)) {

View file

@ -18,6 +18,8 @@ package rife.bld.extension;
import org.assertj.core.api.AutoCloseableSoftAssertions; import org.assertj.core.api.AutoCloseableSoftAssertions;
import org.junit.jupiter.api.Test; 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.BaseProject;
import rife.bld.Project; import rife.bld.Project;
import rife.bld.WebProject; import rife.bld.WebProject;
@ -64,6 +66,7 @@ class PitestOperationTest {
} }
@Test @Test
@EnabledOnOs(OS.LINUX)
void checkAllParameters() throws IOException { void checkAllParameters() throws IOException {
var args = Files.readAllLines(Paths.get("src", "test", "resources", "pitest-args.txt")); var args = Files.readAllLines(Paths.get("src", "test", "resources", "pitest-args.txt"));