]> rtime.felk.cvut.cz Git - frescor/frsh.git/commitdiff
wvtest/sh: Introduce cleanup function and exit on the first error
authorMichal Sojka <sojkam1@fel.cvut.cz>
Thu, 24 Feb 2011 16:28:31 +0000 (17:28 +0100)
committerMichal Sojka <sojkam1@fel.cvut.cz>
Thu, 24 Feb 2011 16:28:31 +0000 (17:28 +0100)
frsh_api/tests/dummy_spare_capacity.sh
frsh_api/tests/negotiation.sh
frsh_api/tests/trans_nego.sh

index 8bc45a04552a853022750f3181fd3d5d66c869a5..615b7acd861c2c9656e4adb006982276789177fe 100755 (executable)
@@ -2,14 +2,16 @@
 
 . $(dirname $0)/wvtest.sh
 
+wvtest_cleanup() {
+    WVPASS kill `cat fcb.pid`
+    WVPASS rm fcb.pid
+    WVPASS kill `cat frm.pid`
+    WVPASS rm frm.pid
+}
+
 WVSTART Setup
 WVPASS fcb -dfcb.pid
 WVPASS frm_dummy -dfrm.pid
 
 WVPASS dummy_spare_capacity
 
-WVSTART Kill
-WVPASS kill `cat fcb.pid`
-WVPASS rm fcb.pid
-WVPASS kill `cat frm.pid`
-WVPASS rm frm.pid
index a788859a7a76a89d557920be02ed91dfb725eede..1962317fc19b7d5c7483469ef2725415a29bcd1b 100755 (executable)
@@ -2,7 +2,12 @@
 
 . $(dirname $0)/wvtest.sh
 
-trap '' SIGINT
+wvtest_cleanup() {
+    WVPASS kill `cat fcb.pid`
+    WVPASS rm fcb.pid
+    WVPASS kill `cat frm.pid`
+    WVPASS rm frm.pid
+}
 
 WVSTART Setup
 WVPASS fcb -dfcb.pid
@@ -11,8 +16,3 @@ WVPASS frm_dummy -dfrm.pid
 
 WVPASS negotiation
 
-WVSTART Kill
-WVPASS kill `cat fcb.pid`
-WVPASS rm fcb.pid
-WVPASS kill `cat frm.pid`
-WVPASS rm frm.pid
index fc5d50b7b5660eebdb613143e30a8a6c80f6d735..72af1e32f771c88ccbfd08ea152d395236a37ca8 100755 (executable)
@@ -2,6 +2,18 @@
 
 . $(dirname $0)/wvtest.sh
 
+wvtest_cleanup() {
+    WVPASS kill `cat fcb.pid`
+    WVPASS rm fcb.pid
+    WVPASS kill `cat frm0.pid`
+    WVPASS rm frm0.pid
+    WVPASS kill `cat frm1.pid`
+    WVPASS rm frm1.pid
+    WVPASS kill `cat frm2.pid`
+    WVPASS rm frm2.pid
+}
+
+
 WVSTART Setup
 WVPASS fcb -dfcb.pid
 WVPASS frm_dummy -dfrm0.pid -i0
@@ -11,12 +23,3 @@ WVPASS frm_dummy -dfrm2.pid -i2
 WVPASS trans_nego
 WVPASS trans_nego2
 
-WVSTART Kill
-WVPASS kill `cat fcb.pid`
-WVPASS rm fcb.pid
-WVPASS kill `cat frm0.pid`
-WVPASS rm frm0.pid
-WVPASS kill `cat frm1.pid`
-WVPASS rm frm1.pid
-WVPASS kill `cat frm2.pid`
-WVPASS rm frm2.pid