exit when tests fail only
This commit is contained in:
parent
8acef2acf1
commit
b9372090db
1 changed files with 5 additions and 1 deletions
|
@ -26,7 +26,7 @@
|
||||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||||
* SUCH DAMAGE.
|
* 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;
|
package se.sics.cooja.plugins;
|
||||||
|
@ -122,6 +122,7 @@ public class ScriptRunnerNoGUI implements Plugin {
|
||||||
/* Load simulation */
|
/* Load simulation */
|
||||||
final Simulation sim = gui.loadSimulationConfig(config, true);
|
final Simulation sim = gui.loadSimulationConfig(config, true);
|
||||||
if (sim == null) {
|
if (sim == null) {
|
||||||
|
System.exit(1);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
gui.setSimulation(sim);
|
gui.setSimulation(sim);
|
||||||
|
@ -171,11 +172,14 @@ public class ScriptRunnerNoGUI implements Plugin {
|
||||||
sim.startSimulation();
|
sim.startSimulation();
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
logger.fatal("Error when running script: " + e);
|
logger.fatal("Error when running script: " + e);
|
||||||
|
System.exit(1);
|
||||||
return false;
|
return false;
|
||||||
} catch (UnsatisfiedLinkError e) {
|
} catch (UnsatisfiedLinkError e) {
|
||||||
logger.fatal("Error when running script: " + e);
|
logger.fatal("Error when running script: " + e);
|
||||||
|
System.exit(1);
|
||||||
return false;
|
return false;
|
||||||
} catch (SimulationCreationException e) {
|
} catch (SimulationCreationException e) {
|
||||||
|
System.exit(1);
|
||||||
logger.fatal("Error when running script: " + e);
|
logger.fatal("Error when running script: " + e);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue