aboutsummaryrefslogtreecommitdiff
path: root/src/test/java
diff options
context:
space:
mode:
authorMichael Williamson <mike@zwobble.org>2024-12-10 23:02:11 +0000
committerMichael Williamson <mike@zwobble.org>2024-12-10 23:02:11 +0000
commitadc100e7f675fae502fea1809526e9399f7e9faa (patch)
tree6092cb4e566a10823520f1ce816f8b4e4df3f055 /src/test/java
parent79d25245ba6f99e6116c91e0c39eda1382980636 (diff)
Allow INCLUDE_WIP_TESTS to be set to 0 to disable WIP tests
Diffstat (limited to 'src/test/java')
-rw-r--r--src/test/java/org/shedlang/compiler/backends/ExampleTests.java7
1 files changed, 6 insertions, 1 deletions
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.<String>vector()
.plusAll(binaryRunner())