diff options
Diffstat (limited to 'test/scenario_test/run_all_tests.sh')
-rwxr-xr-x | test/scenario_test/run_all_tests.sh | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/test/scenario_test/run_all_tests.sh b/test/scenario_test/run_all_tests.sh index c702367c..ea5585cf 100755 --- a/test/scenario_test/run_all_tests.sh +++ b/test/scenario_test/run_all_tests.sh @@ -107,5 +107,31 @@ do done +# route server policy grpc test +NUM=$(sudo -E python route_server_policy_grpc_test.py -s 2> /dev/null | awk '/invalid/{print $NF}') +PARALLEL_NUM=25 +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 -E python route_server_policy_grpc_test.py --gobgp-image $GOBGP_IMAGE --test-prefix pg$j --test-index $j -s -x --gobgp-log-level debug --with-xunit --xunit-file=${WS}/nosetest_policy_grpc${j}.xml & + 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 + echo 'all tests passed successfully' exit 0 |