From 616c02510b178076c7fa9c7268893896cf50f72b Mon Sep 17 00:00:00 2001 From: Michal Sojka Date: Thu, 24 Feb 2011 12:31:54 +0100 Subject: [PATCH 1/1] frsh: Do not include test functions The output of test is easier to read when the name of the test script is displayed in the test output. Therefore, we copy the setup/exit code that is common to the all tests to the tests themselves. --- frsh_api/tests/dummy_spare_capacity.sh | 11 ++++++++++- frsh_api/tests/negotiation.sh | 14 +++++++++++++- frsh_api/tests/trans_nego.sh | 8 +++----- frsh_api/tests/wvtest.sh | 15 +-------------- 4 files changed, 27 insertions(+), 21 deletions(-) mode change 100644 => 120000 frsh_api/tests/wvtest.sh diff --git a/frsh_api/tests/dummy_spare_capacity.sh b/frsh_api/tests/dummy_spare_capacity.sh index 0da7df4..8bc45a0 100755 --- a/frsh_api/tests/dummy_spare_capacity.sh +++ b/frsh_api/tests/dummy_spare_capacity.sh @@ -2,5 +2,14 @@ . $(dirname $0)/wvtest.sh -setup_dummy +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 diff --git a/frsh_api/tests/negotiation.sh b/frsh_api/tests/negotiation.sh index 2fbd0c7..a788859 100755 --- a/frsh_api/tests/negotiation.sh +++ b/frsh_api/tests/negotiation.sh @@ -2,5 +2,17 @@ . $(dirname $0)/wvtest.sh -setup_dummy +trap '' SIGINT + +WVSTART Setup +WVPASS fcb -dfcb.pid +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 diff --git a/frsh_api/tests/trans_nego.sh b/frsh_api/tests/trans_nego.sh index b20d0bb..fc5d50b 100755 --- a/frsh_api/tests/trans_nego.sh +++ b/frsh_api/tests/trans_nego.sh @@ -8,7 +8,9 @@ WVPASS frm_dummy -dfrm0.pid -i0 WVPASS frm_dummy -dfrm1.pid -i1 WVPASS frm_dummy -dfrm2.pid -i2 -trap ' +WVPASS trans_nego +WVPASS trans_nego2 + WVSTART Kill WVPASS kill `cat fcb.pid` WVPASS rm fcb.pid @@ -18,7 +20,3 @@ WVPASS kill `cat frm1.pid` WVPASS rm frm1.pid WVPASS kill `cat frm2.pid` WVPASS rm frm2.pid -' 0 - -WVPASS trans_nego -WVPASS trans_nego2 diff --git a/frsh_api/tests/wvtest.sh b/frsh_api/tests/wvtest.sh deleted file mode 100644 index e04d48c..0000000 --- a/frsh_api/tests/wvtest.sh +++ /dev/null @@ -1,14 +0,0 @@ -. $(dirname $0)/../../../wvtest.sh - -setup_dummy() { - WVSTART Setup - WVPASS fcb -dfcb.pid - WVPASS frm_dummy -dfrm.pid - trap ' -WVSTART Kill -WVPASS kill `cat fcb.pid` -WVPASS rm fcb.pid -WVPASS kill `cat frm.pid` -WVPASS rm frm.pid -' 0 -} diff --git a/frsh_api/tests/wvtest.sh b/frsh_api/tests/wvtest.sh new file mode 120000 index 0000000..1982069 --- /dev/null +++ b/frsh_api/tests/wvtest.sh @@ -0,0 +1 @@ +../../../wvtest.sh \ No newline at end of file -- 2.39.2