Skip to content
Snippets Groups Projects
Commit 305ec7cc authored by Jonathan Shahen's avatar Jonathan Shahen
Browse files

Fixed error for printing out timing; tested and can run and convert to smv...

Fixed error for printing out timing; tested and can run and convert to smv closing branch and merging to master
parent 60fd5eb2
No related branches found
No related tags found
No related merge requests found
Pipeline #7932 skipped
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
org.eclipse.jdt.core.compiler.compliance=1.8
......
eclipse.preferences.version=1
org.eclipse.ltk.core.refactoring.enable.project.refactoring.history=false
File added
......@@ -8,8 +8,10 @@
<property name="src" location="src"/>
<property name="lib" location="lib"/>
<property name="bin" location="bin" />
<property name="data" location="data"/>
<property name="build" location="${bin}/build"/>
<property name="dist" location="${bin}/dist"/>
<property name="qtest" location="${data}/testcases"/>
<target name="init">
<!-- create the build directory structure used by compile -->
......@@ -54,6 +56,21 @@
<zipfileset src="${lib}/antlr-3.2.jar" />
</jar>
</target>
<target name="qtest" depends="compile" description="generate a JAR file that will be placed close to the data for quick testing" >
<!-- @author Jonathan Shahen -->
<!-- put everything in ${build} into the jar file -->
<jar destfile="${qtest}/${ant.project.name}.jar" basedir="${build}">
<manifest>
<attribute name="Built-By" value="${user.name}"/>
<attribute name="Main-Class" value="mohawk.MohawkMain" />
<attribute name="Class-Path" value="."/>
</manifest>
<fileset dir="${build}" />
<zipfileset src="${lib}/stringtemplate.jar" />
<zipfileset src="${lib}/antlr-3.2.jar" />
</jar>
</target>
<target name="clean" description="clean up">
<!-- delete the ${build} and ${dist} directory trees -->
......
......@@ -96,6 +96,9 @@ public class MohawkMain {
+ "' has not been implemented. "
+ "Please see use 'mohawk -help' to see which Run Options have been implemented");
}
tests.done();
logger.info("[TIMING] " + tests.timing);
}
} catch (ParseException e) {
if (logger.getLevel() == Level.FINEST) {
......
This diff is collapsed.
......@@ -32,4 +32,22 @@ public class MohawkTiming {
}
timings.put(key, time);
}
@Override
public String toString() {
StringBuilder t = new StringBuilder();
int i = 0;
for (Map.Entry<String, Long> entry : timings.entrySet()) {
t.append(entry.getKey() + ": ");
t.append(entry.getValue());
t.append("ms");
i++;
if (i != timings.size()) {
t.append(" - ");
}
}
return t.toString();
}
}
......@@ -34,6 +34,10 @@ public class TestingSuite {
this.timing.startTimer("totalTime");
}
public void done() {
this.timing.stopTimer("totalTime");
}
/**
* This will take care of fully running the test, if it needs to convert
* SPEC files it will and while it runs it will write out results after each
......@@ -44,14 +48,14 @@ public class TestingSuite {
public void runTests() throws IOException {
ArrayList<NuSMVMode> modes = new ArrayList<NuSMVMode>();
switch (smvHelper.mode) {
case 3:
case 3: // Both
modes.add(NuSMVMode.SMC);
modes.add(NuSMVMode.BMC);
break;
case 1:
case 1: // BMC
modes.add(NuSMVMode.BMC);
break;
case 2:
case 2: // SMC
modes.add(NuSMVMode.SMC);
break;
default:
......
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