Browse Source

Added -testall switch (does not exit on -test failure).

git-svn-id: https://www.prismmodelchecker.org/svn/prism/prism/trunk@3203 bbc10eb1-c90d-0410-af57-cb519fbb1720
master
Dave Parker 15 years ago
parent
commit
8266e5a1df
  1. 14
      prism/src/prism/PrismCL.java

14
prism/src/prism/PrismCL.java

@ -74,6 +74,7 @@ public class PrismCL
private boolean explicitbuildtest = false;
private boolean nobuild = false;
private boolean test = false;
private boolean testExitsOnFail = true;
// property info
private int propertyToCheck = -1;
@ -437,7 +438,8 @@ public class PrismCL
}
} catch (PrismException e) {
mainLog.println("Testing result: FAIL: " + e.getMessage());
errorAndExit("Testing failed");
if (testExitsOnFail)
errorAndExit("Testing failed");
}
}
@ -1111,6 +1113,12 @@ public class PrismCL
else if (sw.equals("test")) {
test = true;
}
// enable "test all" mode (don't stop on errors)
// (overrides -test switch)
else if (sw.equals("testall")) {
test = true;
testExitsOnFail = false;
}
// IMPORT OPTIONS:
@ -1874,8 +1882,8 @@ public class PrismCL
private void error(String s)
{
// If (and only if) we are in "test" mode, treat any error as fatal
if (test) {
// If (and only if) we are in "test" (and not "testall") mode, treat any error as fatal
if (test && testExitsOnFail) {
errorAndExit(s);
}
// Normal case: just display error message, but don't exit

Loading…
Cancel
Save