From 4f5426e95663a68c19efd266c1bf5ef66d40e4ae Mon Sep 17 00:00:00 2001 From: rusefi Date: Thu, 28 Feb 2019 19:00:15 -0500 Subject: [PATCH 1/2] fixing simulator test --- java_console/autotest/src/com/rusefi/ExecHelper.java | 12 ++++++------ java_console/build.xml | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/java_console/autotest/src/com/rusefi/ExecHelper.java b/java_console/autotest/src/com/rusefi/ExecHelper.java index 537351281b..827c44d8b7 100644 --- a/java_console/autotest/src/com/rusefi/ExecHelper.java +++ b/java_console/autotest/src/com/rusefi/ExecHelper.java @@ -1,7 +1,5 @@ package com.rusefi; -import org.jetbrains.annotations.NotNull; - import java.io.BufferedReader; import java.io.File; import java.io.IOException; @@ -13,7 +11,7 @@ import java.util.function.Consumer; * (c) Andrey Belomutskiy */ public class ExecHelper { - private static final String SIMULATOR_COMMAND = "../win32_functional_tests/build/rusefi_simulator.exe"; + private static final String SIMULATOR_BINARY = "../simulator/build/rusefi_simulator.exe"; static Process simulatorProcess; /** @@ -24,10 +22,10 @@ public class ExecHelper { FileLog.MAIN.logLine("runSimulator..."); try { - FileLog.MAIN.logLine("Binary size: " + new File(SIMULATOR_COMMAND).length()); + FileLog.MAIN.logLine("Binary size: " + new File(SIMULATOR_BINARY).length()); - FileLog.MAIN.logLine("Executing " + SIMULATOR_COMMAND); - ExecHelper.simulatorProcess = Runtime.getRuntime().exec(SIMULATOR_COMMAND); + FileLog.MAIN.logLine("Executing " + SIMULATOR_BINARY); + ExecHelper.simulatorProcess = Runtime.getRuntime().exec(SIMULATOR_BINARY); FileLog.MAIN.logLine("simulatorProcess: " + ExecHelper.simulatorProcess); dumpProcessOutput(ExecHelper.simulatorProcess); @@ -93,6 +91,8 @@ public class ExecHelper { } public static void startSimulator() { + if (!new File(SIMULATOR_BINARY).exists()) + throw new IllegalStateException(SIMULATOR_BINARY + " not found"); FileLog.MAIN.logLine("startSimulator..."); new Thread(new Runnable() { @Override diff --git a/java_console/build.xml b/java_console/build.xml index 9de772b33c..edaa1707d8 100644 --- a/java_console/build.xml +++ b/java_console/build.xml @@ -89,7 +89,7 @@ - + From 04183ad0396e175729fa8c44b19cb85a180351f6 Mon Sep 17 00:00:00 2001 From: rusefi Date: Thu, 28 Feb 2019 19:02:32 -0500 Subject: [PATCH 2/2] simulator back into CI --- misc/jenkins/functional_test_and_build_bundle/run.bat | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/misc/jenkins/functional_test_and_build_bundle/run.bat b/misc/jenkins/functional_test_and_build_bundle/run.bat index d967c1cabe..e7ea3c6c2f 100644 --- a/misc/jenkins/functional_test_and_build_bundle/run.bat +++ b/misc/jenkins/functional_test_and_build_bundle/run.bat @@ -4,6 +4,11 @@ IF NOT ERRORLEVEL 0 echo build ERROR DETECTED IF NOT ERRORLEVEL 0 EXIT /B 1 +call misc/jenkins/functional_test_and_build_bundle/simulator_test.bat +IF NOT ERRORLEVEL 0 echo simulator test ERROR DETECTED +IF NOT ERRORLEVEL 0 EXIT /B 1 + + call misc/jenkins/functional_test_and_build_bundle/hw_test.bat IF NOT ERRORLEVEL 0 echo real hardware test ERROR DETECTED IF NOT ERRORLEVEL 0 EXIT /B 1