auto-sync
This commit is contained in:
parent
489636e5cc
commit
da1bfe693b
|
@ -6,19 +6,23 @@ import static com.rusefi.RealHwTest.startRealHardwareTest;
|
|||
|
||||
public class EnduranceTest {
|
||||
|
||||
private static final int COUNT = 2000;
|
||||
private static final int DEFAULT_COUNT = 2000;
|
||||
|
||||
public static void main(String[] args) {
|
||||
long start = System.currentTimeMillis();
|
||||
FileLog.MAIN.logLine("Running " + COUNT + " cycles");
|
||||
int count = parseCount(args);
|
||||
try {
|
||||
String port = startRealHardwareTest(args);
|
||||
|
||||
if (port == null)
|
||||
if (port == null) {
|
||||
System.out.println("EnduranceTest [SERIAL] [COUNT]");
|
||||
return;
|
||||
}
|
||||
|
||||
FileLog.MAIN.logLine("Running " + count + " cycles");
|
||||
|
||||
IoUtil.realHardwareConnect(port);
|
||||
for (int i = 0; i < COUNT; i++) {
|
||||
for (int i = 0; i < count; i++) {
|
||||
AutoTest.currentEngineType = 3;
|
||||
sendCommand("set_engine_type " + 3, AutoTest.COMPLEX_COMMAND_RETRY, 600);
|
||||
sleep(2);
|
||||
|
@ -35,10 +39,17 @@ public class EnduranceTest {
|
|||
System.exit(-1);
|
||||
}
|
||||
FileLog.MAIN.logLine("+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++");
|
||||
FileLog.MAIN.logLine("++++++++++++++++++++++++++++++++++++ YES YES YES " + COUNT + " +++++++++++++++");
|
||||
FileLog.MAIN.logLine("++++++++++++++++++++++++++++++++++++ YES YES YES " + count + " +++++++++++++++");
|
||||
FileLog.MAIN.logLine("+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++");
|
||||
long totalTime = System.currentTimeMillis() - start;
|
||||
long minutes = totalTime / 1000 / 60;
|
||||
FileLog.MAIN.logLine("In " + minutes + " minutes");
|
||||
}
|
||||
|
||||
private static int parseCount(String[] args) {
|
||||
if (args.length == 2) {
|
||||
return Integer.parseInt(args[1]);
|
||||
}
|
||||
return DEFAULT_COUNT;
|
||||
}
|
||||
}
|
|
@ -39,7 +39,7 @@ public class RealHwTest {
|
|||
TestingUtils.isRealHardware = true;
|
||||
FileLog.MAIN.start();
|
||||
String port;
|
||||
if (args.length == 1) {
|
||||
if (args.length == 1 || args.length == 2) {
|
||||
port = args[0];
|
||||
} else if (args.length == 0) {
|
||||
port = IoUtil.getDefaultPort();
|
||||
|
|
Loading…
Reference in New Issue