diff options
Diffstat (limited to 'meta-networking/recipes-daemons/ippool/ippool/runtest.sh')
-rw-r--r-- | meta-networking/recipes-daemons/ippool/ippool/runtest.sh | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/meta-networking/recipes-daemons/ippool/ippool/runtest.sh b/meta-networking/recipes-daemons/ippool/ippool/runtest.sh new file mode 100644 index 000000000..f91f58237 --- /dev/null +++ b/meta-networking/recipes-daemons/ippool/ippool/runtest.sh | |||
@@ -0,0 +1,26 @@ | |||
1 | #!/bin/sh | ||
2 | BANNER="----------------------------------------------------------------------------" | ||
3 | TCLSH="tclsh all.tcl -preservecore 3 -verbose bps -tmpdir ./results -outfile test-ippool.result" | ||
4 | |||
5 | test_setup() { | ||
6 | if [ -d ./results ]; then rm -fr ./results; fi | ||
7 | mkdir ./results | ||
8 | } | ||
9 | |||
10 | test_ippool() { | ||
11 | echo "${BANNER}" | ||
12 | eval $TCLSH -constraints "ipPool" | ||
13 | } | ||
14 | test_postprocess() { | ||
15 | echo "${BANNER}" | ||
16 | (failed=`grep FAILED results/*.result | wc -l`; \ | ||
17 | let failed2=failed/2 ;\ | ||
18 | passed=`grep PASSED results/*.result | wc -l`; \ | ||
19 | echo "TEST SUMMARY: $passed tests PASSED, $failed2 tests FAILED" ;\ | ||
20 | exit $failed2) | ||
21 | } | ||
22 | |||
23 | test_setup | ||
24 | test_ippool | ||
25 | test_postprocess | ||
26 | |||