Skip to content

Commit e540822

Browse files
author
jan
committed
BuildAndVerify refactory and adding beforeclass (see coments)
The beforeclass is added to the data gathering code because it somethimes gets ignored The BuildAndVerify to buildAndVerify was done in another commit but due to problem investigation Regressiontest.java was to brokjen to check in
1 parent 20c5e18 commit e540822

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

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

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ public class RegressionTest {
6161
* start testing
6262
*/
6363
@BeforeClass
64-
public static void WaitForInstallerToFinish() {
64+
public static void beforeClass() {
6565
Shared.waitForAllJobsToFinish();
6666
Shared.setDeleteProjects(false);
6767
Preferences.setUseBonjour(false);
@@ -652,6 +652,7 @@ public void uploadPattern() throws Exception {
652652
}
653653

654654
public static Stream<Arguments> testDifferentSourceFoldersData() {
655+
beforeClass();//This is not always called
655656
List<Arguments> ret = new LinkedList<>();
656657
OtherDescription otherDesc = new OtherDescription();
657658
CompileDescription projCompileDesc = new CompileDescription();
@@ -709,9 +710,10 @@ public void testDifferentSourceFolders(String projectName, CodeDescription codeD
709710
/**
710711
* Test wether a platform json redirect is handled properly
711712
* https://github.com/jantje/arduino-eclipse-plugin/issues/393
713+
* @throws Exception
712714
*/
713715
@Test
714-
public void redirectedJson() {
716+
public void redirectedJson() throws Exception {
715717
//this board references to arduino avr so install that one to
716718
Arduino.installLatestAVRBoards();
717719
BoardsManager.installLatestPlatform("package_talk2.wisen.com_index.json", "Talk2", "avr");
@@ -723,14 +725,15 @@ public void redirectedJson() {
723725
fail("redirect Json ");
724726
return;
725727
}
726-
if (!Shared.BuildAndVerify("redirect_json", boardid, CodeDescription.createDefaultIno(),
728+
if (!Shared.buildAndVerify("redirect_json", boardid, CodeDescription.createDefaultIno(),
727729
new CompileDescription())) {
728730
fail(Shared.getLastFailMessage() );
729731
}
730732
}
731733

732734

733735
static Stream<Arguments> openAndClosePreservesSettingsValueCmd() {
736+
beforeClass();//This is not always called
734737
CodeDescription codeDescriptordefaultCPPRoot = new CodeDescription(CodeDescription.CodeTypes.defaultCPP);
735738
CodeDescription codeDescriptordefaultCPPSrc = new CodeDescription(CodeDescription.CodeTypes.defaultCPP);
736739
CodeDescription codeDescriptordefaultCPXX = new CodeDescription(CodeDescription.CodeTypes.defaultCPP);
@@ -749,6 +752,7 @@ static Stream<Arguments> openAndClosePreservesSettingsValueCmd() {
749752

750753

751754
public static Stream<Arguments> NightlyBoardPatronTestData() {
755+
beforeClass();//This is not always called
752756
Preferences.setUseArduinoToolSelection(true);
753757
CompileDescription compileOptions = new CompileDescription();
754758
MCUBoard zeroBoard = Arduino.zeroProgrammingPort();
@@ -773,15 +777,15 @@ public static Stream<Arguments> NightlyBoardPatronTestData() {
773777

774778
@ParameterizedTest
775779
@MethodSource("NightlyBoardPatronTestData")
776-
public void NightlyBoardPatron( String name, MCUBoard boardID, Example example,CompileDescription compileOptions) {
780+
public void NightlyBoardPatron( String name, MCUBoard boardID, Example example,CompileDescription compileOptions) throws Exception {
777781

778782
Set<IExample> examples = new HashSet<>();
779783
examples.add(example);
780784
CodeDescription codeDescriptor = CodeDescription.createExample(false, examples);
781785

782786
BoardDescription boardDescriptor = boardID.getBoardDescriptor();
783787
boardDescriptor.setOptions(boardID.getBoardOptions(example));
784-
if(!Shared.BuildAndVerify(name,boardID.getBoardDescriptor(), codeDescriptor, compileOptions)) {
788+
if(!Shared.buildAndVerifyAllBuilders(name,boardID.getBoardDescriptor(), codeDescriptor, compileOptions)) {
785789
fail(Shared.getLastFailMessage() );
786790
}
787791

0 commit comments

Comments
 (0)