Skip to content

Commit 2d720d9

Browse files
author
jantje
committed
do not test blink examples whith boards wit§hout buildinled
1 parent b522af4 commit 2d720d9

File tree

3 files changed

+13
-0
lines changed

3 files changed

+13
-0
lines changed

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ public class BoardAttributes {
1010
public boolean mouse = false;
1111
public boolean wire1 = false;
1212
public boolean rawHID = false;
13+
public boolean buildInLed = true;
1314
/*
1415
* Only a very rara selection of boards supports input_pulldown as pin mode
1516
*/
@@ -42,6 +43,7 @@ public boolean compatibleWithExampleRequirements(BoardAttributes example) {
4243
ret = ret && matches(example.inputPullDown, inputPullDown);
4344
ret = ret && matches(example.mo_mcu, mo_mcu);
4445
ret = ret && matches(example.esp8266_mcu, esp8266_mcu);
46+
ret = ret && matches(example.buildInLed, buildInLed);
4547
if (example.boardName != null) {
4648
ret = ret && example.boardName.equals(boardName);
4749
}
@@ -64,6 +66,7 @@ public BoardAttributes or(BoardAttributes or) {
6466
BoardAttributes ret = new BoardAttributes();
6567
// fields that need a binary and
6668
ret.worksOutOfTheBox = worksOutOfTheBox && or.worksOutOfTheBox;
69+
ret.buildInLed = buildInLed && or.buildInLed;
6770
// fields that can do with or
6871
ret.serial = serial || or.serial;
6972
ret.rawHID = rawHID || or.rawHID;
@@ -78,6 +81,7 @@ public BoardAttributes or(BoardAttributes or) {
7881
ret.teensy = teensy || or.teensy;
7982
ret.mo_mcu = mo_mcu || or.mo_mcu;
8083
ret.esp8266_mcu = esp8266_mcu || or.esp8266_mcu;
84+
8185
// other special fields
8286
if (boardName == null) {
8387
ret.boardName = or.boardName;

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ public Examples(String fqn, IPath path) {
3838
myRequiredBoardAttributes.boardName = getRequiredBoardID(myFQN);
3939
myRequiredBoardAttributes.mo_mcu = examplesUsingMCUmo().contains(fqn);
4040
myRequiredBoardAttributes.rawHID = myFQN.contains("USB_RawHID");
41+
myRequiredBoardAttributes.buildInLed = myFQN.contains("Blink");
4142
myRequiredBoardAttributes = myRequiredBoardAttributes.or(Libraries.getRequiredBoardAttributes(getLibName()));
4243
}
4344

io.sloeber.tests/src/io/sloeber/providers/Arduino.java

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -177,6 +177,7 @@ private Arduino(String providerName, String architectureName, String boardName)
177177
myAttributes.serial1 = supportSerial1List().contains(boardName);
178178
myAttributes.keyboard = supportKeyboardList().contains(boardName);
179179
myAttributes.wire1 = supportWire1List().contains(boardName);
180+
myAttributes.buildInLed = !doesNotSupportbuildInLed().contains(boardName);
180181

181182
}
182183

@@ -186,6 +187,13 @@ static List<String> supportWire1List() {
186187
return ret;
187188
}
188189

190+
static List<String> doesNotSupportbuildInLed() {
191+
List<String> ret = new LinkedList<>();
192+
ret.add("robotControl");
193+
ret.add("robotMotor");
194+
return ret;
195+
}
196+
189197
static List<String> supportSerial1List() {
190198
List<String> ret = new LinkedList<>();
191199
ret.add("circuitplay32u4cat");

0 commit comments

Comments
 (0)