From fd5476f63178cc98d5b76fdc28336d044075d17e Mon Sep 17 00:00:00 2001 From: Marten Lohstroh Date: Tue, 19 Dec 2023 23:26:24 -0800 Subject: [PATCH] Adjustment to test output to show progress --- .../java/org/lflang/tests/TestBase.java | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git a/core/src/testFixtures/java/org/lflang/tests/TestBase.java b/core/src/testFixtures/java/org/lflang/tests/TestBase.java index 8f8d8f0021..6923149f07 100644 --- a/core/src/testFixtures/java/org/lflang/tests/TestBase.java +++ b/core/src/testFixtures/java/org/lflang/tests/TestBase.java @@ -683,11 +683,13 @@ private ProcessBuilder getExecCommand(LFTest test) throws TestError { private void validateAndRun( Set tests, Transformer transformer, Configurator configurator, TestLevel level) throws IOException { - final var x = 78f / tests.size(); - var marks = 0; - var done = 0; + var done = 1; + + System.out.println(THICK_LINE); for (var test : tests) { + System.out.println( + "Running: " + test.toString() + " (" + (int) (done / (float) tests.size() * 100) + "%)"); try { test.redirectOutputs(); prepare(test, transformer, configurator); @@ -706,14 +708,6 @@ private void validateAndRun( test.restoreOutputs(); } done++; - while (Math.floor(done * x) >= marks && marks < 78) { - System.out.print("="); - marks++; - } - } - while (marks < 78) { - System.out.print("="); - marks++; } System.out.print(System.lineSeparator());