diff --git a/java_console/autotest/src/main/java/com/rusefi/SimulatorFunctionalTestLauncher.java b/java_console/autotest/src/main/java/com/rusefi/SimulatorFunctionalTestLauncher.java index 3fe10cb0f6..5f1074ab4e 100644 --- a/java_console/autotest/src/main/java/com/rusefi/SimulatorFunctionalTestLauncher.java +++ b/java_console/autotest/src/main/java/com/rusefi/SimulatorFunctionalTestLauncher.java @@ -3,18 +3,25 @@ package com.rusefi; import com.rusefi.io.LinkManager; import com.rusefi.simulator.SimulatorFunctionalTest; +import java.io.File; +import java.io.IOException; + /** * this class runs rusEFI functional tests against rusEFI simulator */ public class SimulatorFunctionalTestLauncher { static volatile boolean isHappy; - public static void main(String[] args) { + public static void main(String[] args) throws IOException, InterruptedException { Thread.setDefaultUncaughtExceptionHandler((t, e) -> { e.printStackTrace(); System.exit(66); }); boolean startSimulator = args.length == 1 && args[0].equalsIgnoreCase("start"); +// if (startSimulator) { +// buildSimulator(); +// } + long start = System.currentTimeMillis(); FileLog.SIMULATOR_CONSOLE.start(); FileLog.MAIN.start(); @@ -41,4 +48,10 @@ public class SimulatorFunctionalTestLauncher { FileLog.MAIN.logLine("Done in " + time + "secs"); System.exit(0); // this is a safer method eliminating the issue of non-daemon threads } + + private static void buildSimulator() throws IOException, InterruptedException { + Process makeProcess = Runtime.getRuntime().exec("make -j8", null, new File("../simulator")); + SimulatorExecHelper.dumpProcessOutput(makeProcess, null); + makeProcess.waitFor(); + } }