public static void BuildAndVerify(BoardDescriptor boardid) { IProject theTestProject = null; CodeDescriptor codeDescriptor = CodeDescriptor.createDefaultIno(); NullProgressMonitor monitor = new NullProgressMonitor(); String projectName = String.format("%03d_", new Integer(mCounter++)) + boardid.getBoardID(); try { theTestProject = boardid.createProject( projectName, null, ConfigurationDescriptor.getDefaultDescriptors(), codeDescriptor, monitor); Shared.waitForAllJobsToFinish(); // for the indexer } catch (Exception e) { e.printStackTrace(); fail("Failed to create the project:" + projectName); return; } try { theTestProject.build(IncrementalProjectBuilder.FULL_BUILD, monitor); if (Shared.hasBuildErrors(theTestProject)) { fail("Failed to compile the project:" + projectName + " build errors"); } } catch (CoreException e) { e.printStackTrace(); fail("Failed to compile the project:" + boardid.getBoardName() + " exception"); } }
/* * In new new installations (of the Sloeber development environment) the * installer job will trigger downloads These mmust have finished before we * can start testing */ @BeforeClass public static void WaitForInstallerToFinish() { installAdditionalBoards(); Shared.waitForAllJobsToFinish(); }