From 1627dad0f153d96f65046ff357dc42109fe6733a Mon Sep 17 00:00:00 2001 From: rusefillc Date: Mon, 23 Jan 2023 12:03:14 -0500 Subject: [PATCH] progress --- .../com/rusefi/RealHardwareTestLauncher.java | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/java_console/autotest/src/main/java/com/rusefi/RealHardwareTestLauncher.java b/java_console/autotest/src/main/java/com/rusefi/RealHardwareTestLauncher.java index df7ef1808a..0d021f10e3 100644 --- a/java_console/autotest/src/main/java/com/rusefi/RealHardwareTestLauncher.java +++ b/java_console/autotest/src/main/java/com/rusefi/RealHardwareTestLauncher.java @@ -23,6 +23,15 @@ import org.junit.runner.Result; public class RealHardwareTestLauncher { public static void main(String[] args) { + boolean isOk = runHardwareTest(); + if (!isOk) + System.exit(-1); + } + + /** + * @return true if test is a SUCCESS, false if a FAILURE + */ + public static boolean runHardwareTest() { JUnitCore junit = new JUnitCore(); Result result = junit.run( CommonFunctionalTest.class, @@ -44,12 +53,6 @@ public class RealHardwareTestLauncher { f.getException().printStackTrace(); }); - } - - /** - * @return true if test is a SUCCESS, false if a FAILURE - */ - public static boolean runHardwareTest() { - return false; + return result.getRunCount() > 0 && result.getFailureCount() == 0; } }