1 package org.opendaylight.controller.distribution;
3 import java.io.IOException;
4 import java.io.InputStream;
5 import java.io.OutputStream;
9 static void copy(InputStream in, OutputStream out) throws IOException {
17 public static void main(String[] args) throws IOException, InterruptedException {
18 String cwd = System.getProperty("user.dir");
20 System.out.println("Current working directory = " + cwd);
22 String os = System.getProperty("os.name").toLowerCase();
23 String script = "./run.sh";
25 if(os.contains("windows")){
26 System.out.println("Sorry no sanity testing on Windows yet");
31 ProcessBuilder processBuilder = new ProcessBuilder();
32 processBuilder.command(script);
33 Process p = processBuilder.start();
35 copy(p.getInputStream(), System.out);
39 System.out.println("Test exited with exitValue = " + p.exitValue());
41 System.exit(p.exitValue());