mirror of https://github.com/rusefi/rusefi.git
Let's admit it it's time to move to gradle #3014
This commit is contained in:
parent
1627dad0f1
commit
de05fa0b81
|
@ -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
|
|
@ -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});
|
||||
}
|
||||
}
|
|
@ -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);
|
||||
}
|
||||
}
|
|
@ -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.");
|
||||
}
|
||||
};
|
||||
|
|
|
@ -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) {
|
||||
|
|
Loading…
Reference in New Issue