27
27
28
28
@ SuppressWarnings ({"nls" })
29
29
@ RunWith (Parameterized .class )
30
- public class CreateAndCompileJantjesBoardsTest {
30
+ public class CreateAndCompileArduinoIDEExamplesonJantjesBoardsTest {
31
31
private CodeDescriptor myCodeDescriptor ;
32
32
private static BoardDescriptor myBoard ;
33
33
private static int myBuildCounter = 0 ;
34
34
private static int myTotalFails = 0 ;
35
35
private static int maxFails = 200 ;
36
36
private static int mySkipAtStart = 0 ;
37
37
38
- public CreateAndCompileJantjesBoardsTest ( String name ,CodeDescriptor codeDescriptor ,BoardDescriptor board ) {
38
+ public CreateAndCompileArduinoIDEExamplesonJantjesBoardsTest ( String name ,CodeDescriptor codeDescriptor ,BoardDescriptor board ) {
39
39
40
40
myCodeDescriptor = codeDescriptor ;
41
41
myBoard =board ;
@@ -45,14 +45,13 @@ public CreateAndCompileJantjesBoardsTest( String name,CodeDescriptor codeDescrip
45
45
@ SuppressWarnings ("rawtypes" )
46
46
@ Parameters (name = "{0}" )
47
47
public static Collection examples () {
48
+ Preferences .setUseBonjour (false );
48
49
String [] packageUrlsToAdd = {Jantje .jsonURL };
49
- MCUBoard [] allBoards =Jantje .getAllBoards ();
50
50
PackageManager .addPackageURLs (new HashSet <>(Arrays .asList (packageUrlsToAdd )), true );
51
51
Jantje .installLatestLocalDebugBoards ();
52
- Preferences .setUseBonjour (false );
53
-
54
-
55
52
Shared .waitForAllJobsToFinish ();
53
+
54
+ MCUBoard [] allBoards =Jantje .getAllBoards ();
56
55
LinkedList <Object []> examples = new LinkedList <>();
57
56
58
57
TreeMap <String , IPath > exampleFolders = LibraryManager .getAllArduinoIDEExamples ();
@@ -101,15 +100,9 @@ private static boolean skipExample(Examples example) {
101
100
}
102
101
@ Test
103
102
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
+
113
106
114
107
if (!Shared .BuildAndVerify ( myBoard , myCodeDescriptor )) {
115
108
myTotalFails ++;
0 commit comments