From 5242171c43e0eda68116c688ff9aba67ed6bc62d Mon Sep 17 00:00:00 2001 From: rusefi Date: Sun, 13 Dec 2020 00:17:54 -0500 Subject: [PATCH] basic hw in the loop - pwm self validation #2028 --- .../com/rusefi/RealHardwareTestLauncher.java | 41 +------------------ 1 file changed, 1 insertion(+), 40 deletions(-) diff --git a/java_console/autotest/src/com/rusefi/RealHardwareTestLauncher.java b/java_console/autotest/src/com/rusefi/RealHardwareTestLauncher.java index f788a3972a..87b59e226e 100644 --- a/java_console/autotest/src/com/rusefi/RealHardwareTestLauncher.java +++ b/java_console/autotest/src/com/rusefi/RealHardwareTestLauncher.java @@ -1,14 +1,5 @@ package com.rusefi; -import com.devexperts.logging.Logging; -import com.rusefi.io.LinkManager; - -import java.io.PrintWriter; -import java.io.StringWriter; - -import static com.devexperts.logging.Logging.getLogging; -import static com.rusefi.Timeouts.SECOND; - /** * dead? * @@ -23,44 +14,14 @@ import static com.rusefi.Timeouts.SECOND; * 2/22/2015 */ public class RealHardwareTestLauncher { - private static final Logging log = getLogging(RealHardwareTestLauncher.class); - public static final String HW_TESTS_START_UP_SLEEP = "hw_tests_start_up_sleep"; - private static final int STARTUP_SLEEP = Integer.getInteger(HW_TESTS_START_UP_SLEEP, 0); public static void main(String[] args) throws InterruptedException { - if (STARTUP_SLEEP != 0) { - log.info("Sleeping " + STARTUP_SLEEP + " seconds to give OS time to connect VCP driver"); - Thread.sleep(STARTUP_SLEEP * SECOND); - } else { - log.info(HW_TESTS_START_UP_SLEEP + " VM option not specified, no start-up sleep in java code"); - } - - boolean isSuccess = runHardwareTest(); - if (!isSuccess) - System.exit(-1); - log.info("+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++"); - log.info("++++++++++++++++++++++++++++++++++++ Real Hardware Test Passed +++++++++++++++"); - log.info("+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++"); - System.exit(0); // this is a safer method eliminating the issue of non-daemon threads } /** * @return true if test is a SUCCESS, false if a FAILURE */ public static boolean runHardwareTest() { - long start = System.currentTimeMillis(); - try { -// runRealHardwareTest(ControllerConnectorState.getLinkManager()); - } catch (Throwable e) { - StringWriter sw = new StringWriter(); - PrintWriter pw = new PrintWriter(sw); - e.printStackTrace(pw); - log.info("Test failed: " + e + " at " + sw); - e.printStackTrace(); - return false; - } - long time = (System.currentTimeMillis() - start) / 1000; - log.info("Done in " + time + "secs"); - return true; + return false; } }