(boolean output, boolean success, File wd, String[] extraArgs)
| 83 | } |
| 84 | |
| 85 | public Process runArduino(boolean output, boolean success, File wd, String[] extraArgs) throws IOException, InterruptedException { |
| 86 | Runtime rt = Runtime.getRuntime(); |
| 87 | |
| 88 | List<String> args = new ArrayList<String>(); |
| 89 | args.add(arduinoPath.getAbsolutePath()); |
| 90 | args.addAll(Arrays.asList(getBaseArgs())); |
| 91 | args.addAll(Arrays.asList(extraArgs)); |
| 92 | |
| 93 | System.out.println("Running: " + String.join(" ", args)); |
| 94 | |
| 95 | Process pr = rt.exec(args.toArray(new String[0]), null, wd); |
| 96 | if (output) { |
| 97 | IOUtils.copy(pr.getInputStream(), System.out); |
| 98 | IOUtils.copy(pr.getErrorStream(), System.out); |
| 99 | } |
| 100 | pr.waitFor(); |
| 101 | if (success) |
| 102 | assertEquals(0, pr.exitValue()); |
| 103 | return pr; |
| 104 | } |
| 105 | |
| 106 | @Test |
| 107 | public void testCommandLineBuildWithRelativePath() throws Exception { |
no test coverage detected