Partition hw tests (#2267)
* partition in to f4 disco * cleanup * stub proteus test * add proteus build config
This commit is contained in:
parent
f1afc26c74
commit
3688cc59c8
|
@ -1,5 +1,9 @@
|
|||
package com.rusefi;
|
||||
|
||||
import com.rusefi.common.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;
|
||||
|
||||
|
@ -21,7 +25,7 @@ public class RealHardwareTestLauncher {
|
|||
public static void main(String[] args) throws InterruptedException {
|
||||
JUnitCore junit = new JUnitCore();
|
||||
Result result = junit.run(
|
||||
FunctionalTest.class,
|
||||
CommonFunctionalTest.class,
|
||||
PwmHardwareTest.class,
|
||||
VssHardwareLoopTest.class,
|
||||
HighRevTest.class
|
||||
|
|
|
@ -6,7 +6,7 @@ import org.junit.Before;
|
|||
public class RusefiTestBase {
|
||||
protected EcuTestHelper ecu;
|
||||
|
||||
boolean needsHardwareTriggerInput() {
|
||||
protected boolean needsHardwareTriggerInput() {
|
||||
// Most tests do not, but some may need it
|
||||
return false;
|
||||
}
|
||||
|
|
|
@ -1,13 +1,13 @@
|
|||
package com.rusefi;
|
||||
package com.rusefi.common;
|
||||
|
||||
|
||||
import com.rusefi.RusefiTestBase;
|
||||
import com.rusefi.TestingUtils;
|
||||
import com.rusefi.Timeouts;
|
||||
import com.rusefi.core.Sensor;
|
||||
import com.rusefi.core.SensorCentral;
|
||||
import com.rusefi.functional_tests.EcuTestHelper;
|
||||
import com.rusefi.waves.EngineChart;
|
||||
import com.rusefi.waves.EngineReport;
|
||||
import org.junit.Before;
|
||||
import org.junit.Ignore;
|
||||
import org.junit.Test;
|
||||
|
||||
import java.util.Arrays;
|
||||
|
@ -16,6 +16,7 @@ import static com.rusefi.IoUtil.getEnableCommand;
|
|||
import static com.rusefi.TestingUtils.*;
|
||||
import static com.rusefi.config.generated.Fields.*;
|
||||
import static org.junit.Assert.assertFalse;
|
||||
import static org.junit.Assert.assertTrue;
|
||||
|
||||
/**
|
||||
* rusEfi firmware simulator functional test suite
|
||||
|
@ -25,11 +26,9 @@ import static org.junit.Assert.assertFalse;
|
|||
* @author Andrey Belomutskiy
|
||||
* 3/5/14
|
||||
*/
|
||||
public class FunctionalTest extends RusefiTestBase {
|
||||
public class CommonFunctionalTest extends RusefiTestBase {
|
||||
@Test
|
||||
public void testChangingIgnitionMode() {
|
||||
String msg = "change ign mode";
|
||||
|
||||
ecu.setEngineType(ET_FORD_ASPIRE);
|
||||
ecu.changeRpm(2000);
|
||||
|
||||
|
@ -341,7 +340,7 @@ public class FunctionalTest extends RusefiTestBase {
|
|||
assertWaveNull(msg, chart, EngineChart.TRIGGER_2);
|
||||
sendComplexCommand("set " + "trigger_type" + " 1"); // TT_FORD_ASPIRE
|
||||
chart = nextChart();
|
||||
assertTrue(msg + " trigger2", chart.get(EngineChart.TRIGGER_2) != null);
|
||||
assertTrue(chart.get(EngineChart.TRIGGER_2) != null);
|
||||
}
|
||||
|
||||
@Test
|
|
@ -1,5 +1,6 @@
|
|||
package com.rusefi;
|
||||
package com.rusefi.common;
|
||||
|
||||
import com.rusefi.RusefiTestBase;
|
||||
import com.rusefi.binaryprotocol.BinaryProtocol;
|
||||
import com.rusefi.functional_tests.EcuTestHelper;
|
||||
import org.junit.Ignore;
|
|
@ -1,5 +1,6 @@
|
|||
package com.rusefi;
|
||||
package com.rusefi.f4discovery;
|
||||
|
||||
import com.rusefi.RusefiTestBase;
|
||||
import com.rusefi.functional_tests.EcuTestHelper;
|
||||
import org.junit.Ignore;
|
||||
import org.junit.Test;
|
|
@ -1,5 +1,7 @@
|
|||
package com.rusefi;
|
||||
package com.rusefi.f4discovery;
|
||||
|
||||
import com.rusefi.RusefiTestBase;
|
||||
import com.rusefi.Timeouts;
|
||||
import com.rusefi.config.generated.Fields;
|
||||
import com.rusefi.core.Sensor;
|
||||
import com.rusefi.core.SensorCentral;
|
||||
|
@ -20,7 +22,7 @@ import static com.rusefi.config.generated.Fields.*;
|
|||
|
||||
public class PwmHardwareTest extends RusefiTestBase {
|
||||
@Override
|
||||
boolean needsHardwareTriggerInput() {
|
||||
protected boolean needsHardwareTriggerInput() {
|
||||
// This test uses hardware trigger input!
|
||||
return true;
|
||||
}
|
|
@ -1,5 +1,8 @@
|
|||
package com.rusefi;
|
||||
package com.rusefi.f4discovery;
|
||||
|
||||
import com.rusefi.ControllerConnectorState;
|
||||
import com.rusefi.RusefiTestBase;
|
||||
import com.rusefi.Timeouts;
|
||||
import com.rusefi.config.generated.Fields;
|
||||
import com.rusefi.core.Sensor;
|
||||
import com.rusefi.core.SensorCentral;
|
||||
|
@ -18,7 +21,7 @@ import static com.rusefi.config.generated.Fields.*;
|
|||
*/
|
||||
public class VssHardwareLoopTest extends RusefiTestBase {
|
||||
@Override
|
||||
boolean needsHardwareTriggerInput() {
|
||||
protected boolean needsHardwareTriggerInput() {
|
||||
// This test uses hardware trigger input!
|
||||
return true;
|
||||
}
|
|
@ -0,0 +1,7 @@
|
|||
package com.rusefi.proteus;
|
||||
|
||||
import com.rusefi.RusefiTestBase;
|
||||
|
||||
public class ProteusAnalogTest extends RusefiTestBase {
|
||||
// stub for now
|
||||
}
|
|
@ -201,7 +201,29 @@
|
|||
<classpath
|
||||
path="build/classes:lib/junit.jar:${lib_list}:lib/commons-logging.jar"/>
|
||||
<batchtest todir="${hw_tests}">
|
||||
<fileset dir="autotest/src" includes="**/*Test.java"/>
|
||||
<fileset dir="autotest/src" includes="**/common/*.java"/>
|
||||
<fileset dir="autotest/src" includes="**/f4discovery/*.java"/>
|
||||
</batchtest>
|
||||
<formatter type="plain" usefile="false" /> <!-- to screen -->
|
||||
</junit>
|
||||
</target>
|
||||
|
||||
<target name="hardware_ci_proteus" depends="jar">
|
||||
<mkdir dir="${hw_tests}"/>
|
||||
<junit fork="no"
|
||||
maxmemory="512m"
|
||||
printsummary="yes"
|
||||
showoutput="true"
|
||||
haltonfailure="yes">
|
||||
|
||||
<jvmarg value="-ea"/>
|
||||
<jvmarg value="-XX:+HeapDumpOnOutOfMemoryError"/>
|
||||
<formatter type="brief"/>
|
||||
<classpath
|
||||
path="build/classes:lib/junit.jar:${lib_list}:lib/commons-logging.jar"/>
|
||||
<batchtest todir="${hw_tests}">
|
||||
<fileset dir="autotest/src" includes="**/common/*.java"/>
|
||||
<fileset dir="autotest/src" includes="**/proteus/*.java"/>
|
||||
</batchtest>
|
||||
<formatter type="plain" usefile="false" /> <!-- to screen -->
|
||||
</junit>
|
||||
|
|
Loading…
Reference in New Issue