Commit ca5186a8 authored by Jonathan Shahen's avatar Jonathan Shahen
Browse files

Fixed small errors that have to do with not closing when running an immediate...

Fixed small errors that have to do with not closing when running an immediate command (ex: -help) and failing the build if the regression fails
parent 45b28658
......@@ -5,6 +5,11 @@
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.xtext.ui.shared.xtextBuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
......@@ -13,5 +18,6 @@
</buildSpec>
<natures>
<nature>org.eclipse.jdt.core.javanature</nature>
<nature>org.eclipse.xtext.ui.shared.xtextNature</nature>
</natures>
</projectDescription>
......@@ -18,6 +18,9 @@ Primary Authors
* Mahesh Tripunitara
University of Waterloo
* Jonathan Shahen
University of Waterloo
Other Significant Author
------------------------
......
......@@ -70,12 +70,12 @@
<target name="qtest" depends="dist" 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 -->
<copy file="${dist}/${ant.project.name}.jar" tofile=""/>
<copy file="${dist}/${ant.project.name}.jar" tofile="${qtest}"/>
</target>
<target name="regression" depends="dist" description="Performs a regression test">
<!-- @author Jonathan Shahen -->
<exec executable="cmd" dir="${dist}">
<exec executable="cmd" dir="${dist}" failonerror="true">
<arg value="/c" />
<arg value="java -jar mohawk.jar -mode bmc -run all -rbacspec ../../data/regressiontests/positive1.spec" />
</exec>
......
......@@ -66,7 +66,7 @@ public class MohawkInstance {
setupLoggerOptions(cmd, options, args);
setupReturnImmediatelyOptions(cmd, options, args);
if (setupReturnImmediatelyOptions(cmd, options, args)) { return 0; }
setupUserPreferenceOptions(cmd, options, args);
......@@ -391,7 +391,7 @@ public class MohawkInstance {
}
}
private void setupReturnImmediatelyOptions(CommandLine cmd, Options options, String[] args) {
private Boolean setupReturnImmediatelyOptions(CommandLine cmd, Options options, String[] args) {
if (cmd.hasOption("help") == true || args.length < 1) {
HelpFormatter f = new HelpFormatter();
if (cmd.hasOption("maxw")) {
......@@ -406,13 +406,13 @@ public class MohawkInstance {
} else {
f.printHelp(80, "mohawk", StringUtils.repeat("-", 80), options, StringUtils.repeat("-", 80), true);
}
return;
return true;
}
if (cmd.hasOption("version")) {
// keep it as simple as possible for the version
System.out.println(VERSION);
return;
return true;
}
if (cmd.hasOption("numsmv")) {
......@@ -445,9 +445,11 @@ public class MohawkInstance {
}
} catch (IOException e) {
logger.severe("No Version of NuSMV was found, " + "please check that NuSMV is on the PATH.");
return;
return true;
}
}
return false;
}
private void setupResultOptions(CommandLine cmd, Options options, String[] args) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment