Skip to content

Commit ea23cd7

Browse files
author
jantje
committed
more test stuff
1 parent d92effb commit ea23cd7

File tree

3 files changed

+9
-20
lines changed

3 files changed

+9
-20
lines changed

io.sloeber.tests/src/io/sloeber/core/CreateAndCompileArduinoIDEExamplesonJantjesBoardsTest.java

Lines changed: 8 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -27,15 +27,15 @@
2727

2828
@SuppressWarnings({"nls"})
2929
@RunWith(Parameterized.class)
30-
public class CreateAndCompileJantjesBoardsTest {
30+
public class CreateAndCompileArduinoIDEExamplesonJantjesBoardsTest {
3131
private CodeDescriptor myCodeDescriptor;
3232
private static BoardDescriptor myBoard;
3333
private static int myBuildCounter = 0;
3434
private static int myTotalFails = 0;
3535
private static int maxFails = 200;
3636
private static int mySkipAtStart = 0;
3737

38-
public CreateAndCompileJantjesBoardsTest( String name,CodeDescriptor codeDescriptor,BoardDescriptor board) {
38+
public CreateAndCompileArduinoIDEExamplesonJantjesBoardsTest( String name,CodeDescriptor codeDescriptor,BoardDescriptor board) {
3939

4040
myCodeDescriptor = codeDescriptor;
4141
myBoard=board;
@@ -45,14 +45,13 @@ public CreateAndCompileJantjesBoardsTest( String name,CodeDescriptor codeDescrip
4545
@SuppressWarnings("rawtypes")
4646
@Parameters(name = "{0}")
4747
public static Collection examples() {
48+
Preferences.setUseBonjour(false);
4849
String[] packageUrlsToAdd = {Jantje.jsonURL };
49-
MCUBoard[] allBoards=Jantje.getAllBoards();
5050
PackageManager.addPackageURLs(new HashSet<>(Arrays.asList(packageUrlsToAdd)), true);
5151
Jantje.installLatestLocalDebugBoards();
52-
Preferences.setUseBonjour(false);
53-
54-
5552
Shared.waitForAllJobsToFinish();
53+
54+
MCUBoard[] allBoards=Jantje.getAllBoards();
5655
LinkedList<Object[]> examples = new LinkedList<>();
5756

5857
TreeMap<String, IPath> exampleFolders = LibraryManager.getAllArduinoIDEExamples();
@@ -101,15 +100,9 @@ private static boolean skipExample(Examples example) {
101100
}
102101
@Test
103102
public void testExample() {
104-
// Stop after X fails because
105-
// the fails stays open in eclipse and it becomes really slow
106-
// There are only a number of issues you can handle
107-
// best is to focus on the first ones and then rerun starting with the
108-
// failures
109-
Assume.assumeTrue("Skipping first " + mySkipAtStart + " tests", (myBuildCounter++ >= mySkipAtStart)?Shared.increaseBuildCounter():false);
110-
Assume.assumeTrue("To many fails. Stopping test", (myTotalFails < maxFails)?Shared.increaseBuildCounter():false);
111-
//because we run all examples on all boards we need to filter incompatible combinations
112-
//like serial examples on gemma
103+
Assume.assumeTrue("Skipping first " + mySkipAtStart + " tests", myBuildCounter++ >= mySkipAtStart);
104+
Assume.assumeTrue("To many fails. Stopping test", myTotalFails < maxFails);
105+
113106

114107
if (!Shared.BuildAndVerify( myBoard, myCodeDescriptor)) {
115108
myTotalFails++;

io.sloeber.tests/src/io/sloeber/core/Shared.java

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -262,10 +262,6 @@ public static String getCounterName(String name) {
262262
return counterName;
263263
}
264264

265-
public static boolean increaseBuildCounter() {
266-
myBuildCounter++;
267-
return true;
268-
}
269265

270266
public static String getProjectName(CodeDescriptor codeDescriptor, Examples example, MCUBoard board) {
271267
return String.format("%05d_%s_%s", new Integer(myTestCounter++), codeDescriptor.getExampleName(),

io.sloeber.tests/src/io/sloeber/core/releaseTesting_takes_very_long.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
CreateAndCompileArduinoIDEExamplesOnAVRHardwareTest.class,
1717
CreateAndCompileArduinoIDEExamplesOnTeensyTest.class,
1818
CreateAndCompileExamplesTest.class,
19-
CreateAndCompileJantjesBoardsTest.class,
19+
CreateAndCompileArduinoIDEExamplesonJantjesBoardsTest.class,
2020
CreateAndCompileLibraryExamplesTest.class
2121
})
2222
public class releaseTesting_takes_very_long {

0 commit comments

Comments
 (0)