Missed to catch exceptions for compiler version print.

This commit is contained in:
Mike Lischke 2016-11-09 10:42:48 +01:00
parent 5bcbea82e3
commit 5d783bf82e
1 changed files with 14 additions and 9 deletions

View File

@ -614,14 +614,19 @@ public abstract class BaseCppTest {
// Build runtime using cmake once.
if (!runtimeBuiltOnce) {
System.out.println("Located compiler at: " + compilerPath);
ArrayList<String> args = new ArrayList<String>();
args.add(compilerPath);
args.add("--version");
ProcessBuilder builder = new ProcessBuilder(args.toArray(new String[0]));
builder.directory(new File(tmpdir));
String output = runProcess(builder, "printing compiler version");
System.out.println("Compiler version is: " + output);
try {
System.out.println("Located compiler at: " + compilerPath);
ArrayList<String> args = new ArrayList<String>();
args.add(compilerPath);
args.add("--version");
ProcessBuilder builder = new ProcessBuilder(args.toArray(new String[0]));
builder.directory(new File(tmpdir));
String output = runProcess(builder, "printing compiler version");
System.out.println("Compiler version is: " + output);
}
catch (Exception e) {
System.err.println("Can't get compiler version");
}
runtimeBuiltOnce = true;
if (!buildRuntime()) {