Skip to content
Snippets Groups Projects
Commit d0a0164a authored by Pierre Dontenville's avatar Pierre Dontenville Committed by Guillaume Blanc
Browse files

check added for pragmas completeness

parent f00f7ef0
No related branches found
No related tags found
1 merge request!485Avatar security tests
......@@ -5,6 +5,7 @@ import avatartranslator.toproverif.AVATAR2ProVerif;
import myutil.FileUtils;
import myutil.TraceManager;
import org.jgrapht.alg.util.Pair;
import org.junit.Assert;
import org.junit.Before;
import org.junit.BeforeClass;
import org.junit.Test;
......@@ -26,6 +27,8 @@ import java.util.regex.Matcher;
import java.util.regex.Pattern;
import static org.junit.Assert.*;
import static org.junit.Assert.assertTrue;
@RunWith(Parameterized.class)
public class DiplodocusSecurityTest extends AbstractTest {
final static String DIR_GEN = "tmltranslator/DiplodocusSecurityTest/";
......@@ -163,11 +166,14 @@ public class DiplodocusSecurityTest extends AbstractTest {
try {
proc = Runtime.getRuntime().exec(cmd);
proc_in = new BufferedReader(new InputStreamReader(proc.getInputStream()));
int nbLines =0;
while ((str = proc_in.readLine()) != null) {
// TraceManager.addDev( "Sending " + str + " from " + port + " to client..." );
System.out.println("Output from ProVerif: " + str);
if (summaryFound && (str.contains(PROVERIF_QUERY))) {
nbLines++;
str = changeCommId(str);
assertTrue(contains(tab, str));
}
......@@ -176,6 +182,7 @@ public class DiplodocusSecurityTest extends AbstractTest {
summaryFound = true;
}
}
assertEquals(nbLines, goldenMap.get(tab).length);
} catch (Exception e) {
// probably make is not installed
System.out.println("FAILED: executing: " + cmd + ": " + e.getMessage());
......
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