From adc100e7f675fae502fea1809526e9399f7e9faa Mon Sep 17 00:00:00 2001 From: Michael Williamson Date: Tue, 10 Dec 2024 23:02:11 +0000 Subject: Allow INCLUDE_WIP_TESTS to be set to 0 to disable WIP tests --- src/test/java/org/shedlang/compiler/backends/ExampleTests.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src/test/java') diff --git a/src/test/java/org/shedlang/compiler/backends/ExampleTests.java b/src/test/java/org/shedlang/compiler/backends/ExampleTests.java index 0d7eba56..be9329d6 100644 --- a/src/test/java/org/shedlang/compiler/backends/ExampleTests.java +++ b/src/test/java/org/shedlang/compiler/backends/ExampleTests.java @@ -37,7 +37,7 @@ public abstract class ExampleTests { private void runTest(File exampleDirectory) throws IOException, InterruptedException { var isWipTest = isDisabled(exampleDirectory.getName()); - var includeWipTests = System.getenv("INCLUDE_WIP_TESTS") != null; + var includeWipTests = includeWipTests(); Assumptions.assumeFalse(isWipTest && !includeWipTests); var backend = backend(); @@ -72,6 +72,11 @@ public abstract class ExampleTests { } } + private static boolean includeWipTests() { + var variable = System.getenv("INCLUDE_WIP_TESTS"); + return variable != null && !variable.equals("0"); + } + private ExecutionResult runExampleBinary(String binary) throws IOException, InterruptedException { var fullCommand = P.vector() .plusAll(binaryRunner()) -- cgit v1.2.3