exit when tests fail only

This commit is contained in:
fros4943 2008-09-18 14:55:21 +00:00
parent 8acef2acf1
commit b9372090db

View File

@ -26,7 +26,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* $Id: ScriptRunnerNoGUI.java,v 1.2 2008/09/18 14:24:46 fros4943 Exp $
* $Id: ScriptRunnerNoGUI.java,v 1.3 2008/09/18 14:55:21 fros4943 Exp $
*/
package se.sics.cooja.plugins;
@ -122,6 +122,7 @@ public class ScriptRunnerNoGUI implements Plugin {
/* Load simulation */
final Simulation sim = gui.loadSimulationConfig(config, true);
if (sim == null) {
System.exit(1);
return false;
}
gui.setSimulation(sim);
@ -171,11 +172,14 @@ public class ScriptRunnerNoGUI implements Plugin {
sim.startSimulation();
} catch (IOException e) {
logger.fatal("Error when running script: " + e);
System.exit(1);
return false;
} catch (UnsatisfiedLinkError e) {
logger.fatal("Error when running script: " + e);
System.exit(1);
return false;
} catch (SimulationCreationException e) {
System.exit(1);
logger.fatal("Error when running script: " + e);
return false;
}