Skip to content
Snippets Groups Projects
Commit 1a99e00d authored by jawher-j's avatar jawher-j
Browse files

Update timeout for running proverif in tests

parent ec78b9b9
No related branches found
No related tags found
1 merge request!500Auto security diplodocus
...@@ -145,14 +145,6 @@ public class SecurityGenerationForTMAP implements Runnable { ...@@ -145,14 +145,6 @@ public class SecurityGenerationForTMAP implements Runnable {
final Reader[] data = new Reader[1]; final Reader[] data = new Reader[1];
final ExecutorService executor = Executors.newSingleThreadExecutor(); final ExecutorService executor = Executors.newSingleThreadExecutor();
if (timeOutInSeconds > 0) { if (timeOutInSeconds > 0) {
try {
process[0] = Runtime.getRuntime().exec(cmd);
data[0] = new BufferedReader(new InputStreamReader(process[0].getInputStream()));
} catch (Exception e) {
TraceManager.addDev("FAILED: executing: " + cmd + ": " + e.getMessage());
throw new RuntimeException(e);
}
} else {
final Future<?> future = executor.submit(() -> { final Future<?> future = executor.submit(() -> {
try { try {
process[0] = Runtime.getRuntime().exec(cmd); process[0] = Runtime.getRuntime().exec(cmd);
...@@ -170,6 +162,14 @@ public class SecurityGenerationForTMAP implements Runnable { ...@@ -170,6 +162,14 @@ public class SecurityGenerationForTMAP implements Runnable {
} finally { } finally {
executor.shutdown(); executor.shutdown();
} }
} else {
try {
process[0] = Runtime.getRuntime().exec(cmd);
data[0] = new BufferedReader(new InputStreamReader(process[0].getInputStream()));
} catch (Exception e) {
TraceManager.addDev("FAILED: executing: " + cmd + ": " + e.getMessage());
throw new RuntimeException(e);
}
} }
ProVerifOutputAnalyzer pvoa = avatar2proverif.getOutputAnalyzer(); ProVerifOutputAnalyzer pvoa = avatar2proverif.getOutputAnalyzer();
pvoa.analyzeOutput(data[0], true); pvoa.analyzeOutput(data[0], true);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment