Let's admit it it's time to move to gradle #3014

This commit is contained in:
rusefillc 2023-01-23 12:15:52 -05:00
parent 1627dad0f1
commit de05fa0b81
5 changed files with 59 additions and 33 deletions

View File

@ -1,43 +1,17 @@
package com.rusefi;
import com.rusefi.f4discovery.CommonFunctionalTest;
import com.rusefi.f4discovery.HighRevTest;
import com.rusefi.f4discovery.PwmHardwareTest;
import com.rusefi.f4discovery.VssHardwareLoopTest;
import org.junit.runner.JUnitCore;
import org.junit.runner.Result;
/**
* dead?
*
* The following jumper wires are used to test some subsystems as realistically as possible:
* PD1 <=> PC6
* PD2 <=> PA5
* <p>
* <p>
* <p>
* this test connects to real hardware via serial port
* Andrey Belomutskiy, (c) 2013-2020
* 2/22/2015
*/
public class RealHardwareTestLauncher {
public static void main(String[] args) {
boolean isOk = runHardwareTest();
if (!isOk)
System.exit(-1);
}
public class CmdJUnitRunner {
/**
* @return true if test is a SUCCESS, false if a FAILURE
* @param classes
*/
public static boolean runHardwareTest() {
public static boolean runHardwareTest(Class[] classes) {
JUnitCore junit = new JUnitCore();
Result result = junit.run(
CommonFunctionalTest.class,
PwmHardwareTest.class,
VssHardwareLoopTest.class,
HighRevTest.class
classes
);
// Print a summary of tests run

View File

@ -0,0 +1,38 @@
package com.rusefi;
import com.rusefi.common.MiscTest;
import com.rusefi.f4discovery.CommonFunctionalTest;
import com.rusefi.f4discovery.HighRevTest;
import com.rusefi.f4discovery.PwmHardwareTest;
import com.rusefi.f4discovery.VssHardwareLoopTest;
/**
* dead?
*
* The following jumper wires are used to test some subsystems as realistically as possible:
* PD1 <=> PC6
* PD2 <=> PA5
* <p>
* <p>
* <p>
* this test connects to real hardware via serial port
* Andrey Belomutskiy, (c) 2013-2020
* 2/22/2015
*/
public class HwCiF4Discovery {
public static void main(String[] args) {
boolean isOk = runHardwareTest();
if (!isOk)
System.exit(-1);
}
static boolean runHardwareTest() {
return CmdJUnitRunner.runHardwareTest(
new Class[]{MiscTest.class,
CommonFunctionalTest.class,
PwmHardwareTest.class,
VssHardwareLoopTest.class,
HighRevTest.class});
}
}

View File

@ -0,0 +1,15 @@
package com.rusefi;
import com.rusefi.common.MiscTest;
import com.rusefi.proteus.ProteusAnalogTest;
public class HwCiF4Proteus {
public static void main(String[] args) {
boolean isOk = CmdJUnitRunner.runHardwareTest(new Class[]{
MiscTest.class,
ProteusAnalogTest.class,
});
if (!isOk)
System.exit(-1);
}
}

View File

@ -27,7 +27,6 @@ import java.awt.*;
import java.awt.event.*;
import java.io.File;
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
import static com.devexperts.logging.Logging.getLogging;
@ -310,7 +309,7 @@ public class StartupFrame {
}
private void runFunctionalHardwareTest() {
boolean isSuccess = RealHardwareTestLauncher.runHardwareTest();
boolean isSuccess = HwCiF4Discovery.runHardwareTest();
JOptionPane.showMessageDialog(null, "Function test passed: " + isSuccess + "\nSee log folder for details.");
}
};

View File

@ -240,7 +240,7 @@ public class ConsoleTools {
private static void runFunctionalTest(String[] args) throws InterruptedException {
// passing port argument if it was specified
String[] toolArgs = args.length == 1 ? new String[0] : new String[]{args[1]};
RealHardwareTestLauncher.main(toolArgs);
HwCiF4Discovery.main(toolArgs);
}
private static void runHeadless(String[] args) {