run tests from cmdline (#2132)
* run tests * include junit in jar * tabs spaces
This commit is contained in:
parent
39b189a301
commit
7be06627eb
|
@ -1,5 +1,8 @@
|
|||
package com.rusefi;
|
||||
|
||||
import org.junit.runner.JUnitCore;
|
||||
import org.junit.runner.Result;
|
||||
|
||||
/**
|
||||
* dead?
|
||||
*
|
||||
|
@ -16,6 +19,27 @@ package com.rusefi;
|
|||
public class RealHardwareTestLauncher {
|
||||
|
||||
public static void main(String[] args) throws InterruptedException {
|
||||
JUnitCore junit = new JUnitCore();
|
||||
Result result = junit.run(
|
||||
FunctionalTest.class,
|
||||
PwmHardwareTest.class,
|
||||
VssHardwareLoopTest.class,
|
||||
HighRevTest.class
|
||||
);
|
||||
|
||||
// Print a summary of tests run
|
||||
System.out.println("Ran " + result.getRunCount() + " tests total.");
|
||||
System.out.println("Ignored " + result.getIgnoreCount() + " tests.");
|
||||
System.out.println("Failed " + result.getFailureCount() + " tests.");
|
||||
|
||||
result.getFailures().forEach(f -> {
|
||||
System.out.println(f.toString());
|
||||
|
||||
System.out.println("Test failed: " + f.getTestHeader() + " because " + f.getMessage());
|
||||
System.out.println("Exception:");
|
||||
|
||||
f.getException().printStackTrace();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -173,6 +173,7 @@
|
|||
<zipfileset src="lib/batik/batik-util.jar" includes="**/*.class"/>
|
||||
<zipfileset src="lib/jlatexmath-1.0.6.jar" includes="**/*.class **/*.xml **/*.ttf"/>
|
||||
<zipfileset src="lib/json-simple-1.1.1.jar" includes="**/*.class"/>
|
||||
<zipfileset src="lib/junit.jar" includes="**/*.class"/>
|
||||
</jar>
|
||||
</target>
|
||||
|
||||
|
@ -187,9 +188,6 @@
|
|||
</target>
|
||||
|
||||
<target name="real_hardware_functional_test" depends="jar">
|
||||
<java classpath="${jar_file}" classname="com.rusefi.RealHardwareTestLauncher" failonerror="true">
|
||||
</java>
|
||||
|
||||
<mkdir dir="${hw_tests}"/>
|
||||
<junit fork="no"
|
||||
maxmemory="512m"
|
||||
|
|
Loading…
Reference in New Issue