diff options
author | Wataru Ishida <ishida.wataru@lab.ntt.co.jp> | 2016-09-11 11:05:44 +0000 |
---|---|---|
committer | FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> | 2016-09-12 23:08:14 -0700 |
commit | 585acb58883e8eb89a0f49d85961a81dd5a43c68 (patch) | |
tree | e688a97296424dc85281917462ac8cc8e3512f7b /test | |
parent | 2c265380d78ba69ab95a79226f0ad6132f0e6970 (diff) |
test: run policy test sequencially
for stable test on travis-ci
Signed-off-by: Wataru Ishida <ishida.wataru@lab.ntt.co.jp>
Diffstat (limited to 'test')
-rw-r--r-- | test/scenario_test/ci-scripts/travis-build-script.sh | 56 |
1 files changed, 4 insertions, 52 deletions
diff --git a/test/scenario_test/ci-scripts/travis-build-script.sh b/test/scenario_test/ci-scripts/travis-build-script.sh index 820a3e47..283716c0 100644 --- a/test/scenario_test/ci-scripts/travis-build-script.sh +++ b/test/scenario_test/ci-scripts/travis-build-script.sh @@ -81,10 +81,10 @@ PIDS=("${PIDS[@]}" $!) sudo PYTHONPATH=$GOBGP/test python graceful_restart_test.py --gobgp-image $GOBGP_IMAGE --test-prefix gr -x & PIDS=("${PIDS[@]}" $!) -sudo PYTHONPATH=$GOBGP/test python bgp_zebra_test.py --gobgp-image $GOBGP_IMAGE --test-prefix z -x -s & +sudo PYTHONPATH=$GOBGP/test python bgp_zebra_test.py --gobgp-image $GOBGP_IMAGE --test-prefix z -x & PIDS=("${PIDS[@]}" $!) -sudo PYTHONPATH=$GOBGP/test python monitor_test.py --gobgp-image $GOBGP_IMAGE --test-prefix mon -x -s & +sudo PYTHONPATH=$GOBGP/test python monitor_test.py --gobgp-image $GOBGP_IMAGE --test-prefix mon -x & PIDS=("${PIDS[@]}" $!) @@ -116,57 +116,9 @@ do fi done -# route server policy test -NUM=$(sudo PYTHONPATH=$GOBGP/test python route_server_policy_test.py --test-index -1 -s 2> /dev/null | awk '/invalid/{print $NF}') -PARALLEL_NUM=10 -for (( i = 0; i < $(( NUM / PARALLEL_NUM + 1)); ++i )) -do - PIDS=() - for (( j = $((PARALLEL_NUM * $i + 1)); j < $((PARALLEL_NUM * ($i+1) + 1)); ++j)) - do - sudo PYTHONPATH=$GOBGP/test python route_server_policy_test.py --gobgp-image $GOBGP_IMAGE --test-prefix p$j --test-index $j -x --gobgp-log-level debug & - PIDS=("${PIDS[@]}" $!) - if [ $j -eq $NUM ]; then - break - fi - sleep 3 - done - - for (( j = 0; j < ${#PIDS[@]}; ++j )) - do - wait ${PIDS[$j]} - if [ $? != 0 ]; then - exit 1 - fi - done - -done +sudo PYTHONPATH=$GOBGP/test python route_server_policy_test.py --gobgp-image $GOBGP_IMAGE --test-prefix p -x --gobgp-log-level debug -# route server policy grpc test -NUM=$(sudo PYTHONPATH=$GOBGP/test python route_server_policy_grpc_test.py --test-index -1 -s 2> /dev/null | awk '/invalid/{print $NF}') -PARALLEL_NUM=10 -for (( i = 0; i < $(( NUM / PARALLEL_NUM + 1)); ++i )) -do - PIDS=() - for (( j = $((PARALLEL_NUM * $i + 1)); j < $((PARALLEL_NUM * ($i+1) + 1)); ++j)) - do - sudo PYTHONPATH=$GOBGP/test python route_server_policy_grpc_test.py --gobgp-image $GOBGP_IMAGE --test-prefix pg$j --test-index $j -x --gobgp-log-level debug & - PIDS=("${PIDS[@]}" $!) - if [ $j -eq $NUM ]; then - break - fi - sleep 3 - done - - for (( j = 0; j < ${#PIDS[@]}; ++j )) - do - wait ${PIDS[$j]} - if [ $? != 0 ]; then - exit 1 - fi - done - -done +sudo PYTHONPATH=$GOBGP/test python route_server_policy_grpc_test.py --gobgp-image $GOBGP_IMAGE --test-prefix pg -x --gobgp-log-level debug echo 'all tests passed successfully' exit 0 |