C: don't run compiled tests simultaneously

This commit is contained in:
Alexey Andreev 2021-03-24 17:31:16 +03:00
parent 00fba54d7b
commit 7726d47795

View File

@ -67,12 +67,14 @@ class CRunStrategy implements TestRunStrategy {
List<String> runtimeOutput = new ArrayList<>(); List<String> runtimeOutput = new ArrayList<>();
List<String> stdout = new ArrayList<>(); List<String> stdout = new ArrayList<>();
outputFile.setExecutable(true); outputFile.setExecutable(true);
synchronized (this) {
List<String> runCommand = new ArrayList<>(); List<String> runCommand = new ArrayList<>();
runCommand.add(outputFile.getPath()); runCommand.add(outputFile.getPath());
if (run.getArgument() != null) { if (run.getArgument() != null) {
runCommand.add(run.getArgument()); runCommand.add(run.getArgument());
} }
runProcess(new ProcessBuilder(runCommand.toArray(new String[0])).start(), runtimeOutput, stdout); runProcess(new ProcessBuilder(runCommand.toArray(new String[0])).start(), runtimeOutput, stdout);
}
if (!stdout.isEmpty() && stdout.get(stdout.size() - 1).equals("SUCCESS")) { if (!stdout.isEmpty() && stdout.get(stdout.size() - 1).equals("SUCCESS")) {
writeLines(runtimeOutput); writeLines(runtimeOutput);
run.getCallback().complete(); run.getCallback().complete();