From 710c96afc5323f24f35bfc8fe99209434fe4d012 Mon Sep 17 00:00:00 2001 From: fros4943 Date: Tue, 3 Mar 2009 15:55:39 +0000 Subject: [PATCH] immediately aborting script execution when test reports success or failure --- .../cooja/java/se/sics/cooja/plugins/LogScriptEngine.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/tools/cooja/java/se/sics/cooja/plugins/LogScriptEngine.java b/tools/cooja/java/se/sics/cooja/plugins/LogScriptEngine.java index 5d63e98ba..9e8cac8e9 100644 --- a/tools/cooja/java/se/sics/cooja/plugins/LogScriptEngine.java +++ b/tools/cooja/java/se/sics/cooja/plugins/LogScriptEngine.java @@ -26,7 +26,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: LogScriptEngine.java,v 1.8 2009/01/12 10:45:40 fros4943 Exp $ + * $Id: LogScriptEngine.java,v 1.9 2009/03/03 15:55:39 fros4943 Exp $ */ package se.sics.cooja.plugins; @@ -380,6 +380,9 @@ public class LogScriptEngine { if (timeoutEvent != null) { timeoutEvent.remove(); } + + semaphoreSim.release(100); + throw new RuntimeException("test script killed"); } public void testFailed() { log("TEST FAILED\n"); @@ -408,6 +411,9 @@ public class LogScriptEngine { if (timeoutEvent != null) { timeoutEvent.remove(); } + + semaphoreSim.release(100); + throw new RuntimeException("test script killed"); } public void generateMessage(long delay, final String msg) {