xref: /OK3568_Linux_fs/yocto/meta-openembedded/meta-networking/recipes-daemons/ippool/ippool/runtest.sh (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1*4882a593Smuzhiyun#!/bin/sh
2*4882a593SmuzhiyunBANNER="----------------------------------------------------------------------------"
3*4882a593SmuzhiyunTCLSH="tclsh all.tcl -preservecore 3 -verbose bps -tmpdir ./results -outfile test-ippool.result"
4*4882a593Smuzhiyun
5*4882a593Smuzhiyuntest_setup() {
6*4882a593Smuzhiyun        if [ -d ./results ]; then rm -fr ./results; fi
7*4882a593Smuzhiyun        mkdir ./results
8*4882a593Smuzhiyun}
9*4882a593Smuzhiyun
10*4882a593Smuzhiyuntest_ippool() {
11*4882a593Smuzhiyun        echo "${BANNER}"
12*4882a593Smuzhiyun        eval $TCLSH -constraints "ipPool"
13*4882a593Smuzhiyun}
14*4882a593Smuzhiyuntest_postprocess() {
15*4882a593Smuzhiyun        echo "${BANNER}"
16*4882a593Smuzhiyun        (failed=`grep FAILED results/*.result | wc -l`; \
17*4882a593Smuzhiyun        let failed2=failed/2 ;\
18*4882a593Smuzhiyun        passed=`grep PASSED results/*.result | wc -l`; \
19*4882a593Smuzhiyun        echo "TEST SUMMARY: $passed tests PASSED, $failed2 tests FAILED" ;\
20*4882a593Smuzhiyun        exit $failed2)
21*4882a593Smuzhiyun}
22*4882a593Smuzhiyun
23*4882a593Smuzhiyuntest_setup
24*4882a593Smuzhiyuntest_ippool
25*4882a593Smuzhiyuntest_postprocess
26*4882a593Smuzhiyun
27