returning simlator test into CI

This commit is contained in:
rusefi 2019-02-28 18:38:27 -05:00
parent d1da63ecac
commit 5432ac0849
4 changed files with 19 additions and 3 deletions

View File

@ -472,6 +472,7 @@ public class AutoTest {
System.exit(-1);
}
});
boolean startSimulator = args.length == 1 && args[0].equalsIgnoreCase("start");
long start = System.currentTimeMillis();
FileLog.SIMULATOR_CONSOLE.start();
@ -479,7 +480,7 @@ public class AutoTest {
boolean failed = false;
try {
IoUtil.launchSimulator(false);
IoUtil.connectToSimulator(startSimulator);
mainTestBody();
} catch (Throwable e) {
e.printStackTrace();

View File

@ -105,7 +105,7 @@ public class IoUtil {
FileLog.MAIN.logLine("Got first signal in " + (System.currentTimeMillis() - waitStart));
}
static void launchSimulator(boolean startProcess) throws InterruptedException {
static void connectToSimulator(boolean startProcess) throws InterruptedException {
if (startProcess) {
if (!TcpConnector.getAvailablePorts().isEmpty())
throw new IllegalStateException("Port already binded on startup?");

View File

@ -88,7 +88,7 @@
<java jar="${jar_file}" fork="true"/>
</target>
<target name="autotest" depends="jar">
<target name="simlator_test" depends="jar">
<java classpath="${jar_file}" classname="com.rusefi.AutoTest" failonerror="true">
</java>

View File

@ -0,0 +1,15 @@
echo I am simulator_test.bat
pwd
cd java_console
echo Running simulator functional test
which java
which javac
ant simlator_test
IF NOT ERRORLEVEL echo ERROR DETECTED
IF NOT ERRORLEVEL 0 EXIT /B 1
echo %date% %time%
echo simulator_test.bat: done