aboutsummaryrefslogtreecommitdiffstats
path: root/meta-networking/recipes-daemons/ippool/ippool/runtest.sh
diff options
context:
space:
mode:
Diffstat (limited to 'meta-networking/recipes-daemons/ippool/ippool/runtest.sh')
-rw-r--r--meta-networking/recipes-daemons/ippool/ippool/runtest.sh26
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 @@
+#!/bin/sh
+BANNER="----------------------------------------------------------------------------"
+TCLSH="tclsh all.tcl -preservecore 3 -verbose bps -tmpdir ./results -outfile test-ippool.result"
+
+test_setup() {
+ if [ -d ./results ]; then rm -fr ./results; fi
+ mkdir ./results
+}
+
+test_ippool() {
+ echo "${BANNER}"
+ eval $TCLSH -constraints "ipPool"
+}
+test_postprocess() {
+ echo "${BANNER}"
+ (failed=`grep FAILED results/*.result | wc -l`; \
+ let failed2=failed/2 ;\
+ passed=`grep PASSED results/*.result | wc -l`; \
+ echo "TEST SUMMARY: $passed tests PASSED, $failed2 tests FAILED" ;\
+ exit $failed2)
+}
+
+test_setup
+test_ippool
+test_postprocess
+