summaryrefslogtreecommitdiffhomepage
path: root/test/scenario_test/run_all_tests.sh
diff options
context:
space:
mode:
authorISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>2015-08-26 11:12:10 +0900
committerISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>2015-08-26 19:18:02 +0900
commitaa252a18b95db8731a2abff03b03b57943c72f3d (patch)
treee29f8dfe335b55fcefaeb53cb39379a6b65f0ec9 /test/scenario_test/run_all_tests.sh
parent93b6ec9355b119727b499caaed63c8ff5816cf26 (diff)
test: increse the number of concurrent test execution
Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
Diffstat (limited to 'test/scenario_test/run_all_tests.sh')
-rwxr-xr-xtest/scenario_test/run_all_tests.sh92
1 files changed, 36 insertions, 56 deletions
diff --git a/test/scenario_test/run_all_tests.sh b/test/scenario_test/run_all_tests.sh
index 2ff55e6f..87999c91 100755
--- a/test/scenario_test/run_all_tests.sh
+++ b/test/scenario_test/run_all_tests.sh
@@ -29,62 +29,6 @@ fi
cd $GOBGP/test/scenario_test
-# route server malformed message test
-NUM=$(sudo -E python route_server_malformed_test.py -s 2> /dev/null | awk '/invalid/{print $NF}')
-PARALLEL_NUM=4
-for (( i = 0; i < $(( $NUM / $PARALLEL_NUM + 1)); ++i ))
-do
- sudo docker rm -f $(sudo docker ps -a -q)
-
- PIDS=()
- for (( j = $((PARALLEL_NUM * $i + 1)); j < $((PARALLEL_NUM * ($i+1) + 1)); ++j))
- do
- sudo -E python route_server_malformed_test.py --gobgp-image $GOBGP_IMAGE --test-prefix mal$j --test-index $j -s -x --gobgp-log-level debug --with-xunit --xunit-file=${WS}/nosetest_malform${j}.xml &
- PIDS=("${PIDS[@]}" $!)
- if [ $j -eq $NUM ]; then
- break
- fi
- sleep 4
- done
-
- for (( j = 0; j < ${#PIDS[@]}; ++j ))
- do
- wait ${PIDS[$j]}
- if [ $? != 0 ]; then
- exit 1
- fi
- done
-
-done
-
-# route server policy test
-NUM=$(sudo -E python route_server_policy_test.py -s 2> /dev/null | awk '/invalid/{print $NF}')
-PARALLEL_NUM=4
-for (( i = 0; i < $(( NUM / PARALLEL_NUM + 1)); ++i ))
-do
- sudo docker rm -f $(sudo docker ps -a -q)
-
- PIDS=()
- for (( j = $((PARALLEL_NUM * $i + 1)); j < $((PARALLEL_NUM * ($i+1) + 1)); ++j))
- do
- sudo -E python route_server_policy_test.py --gobgp-image $GOBGP_IMAGE --test-prefix p$j --test-index $j -s -x --gobgp-log-level debug --with-xunit --xunit-file=${WS}/nosetest_policy${j}.xml &
- PIDS=("${PIDS[@]}" $!)
- if [ $j -eq $NUM ]; then
- break
- fi
- sleep 4
- done
-
- for (( j = 0; j < ${#PIDS[@]}; ++j ))
- do
- wait ${PIDS[$j]}
- if [ $? != 0 ]; then
- exit 1
- fi
- done
-
-done
-
PIDS=()
# route server test
@@ -111,6 +55,16 @@ PIDS=("${PIDS[@]}" $!)
sudo -E python flow_spec_test.py --gobgp-image $GOBGP_IMAGE --test-prefix flow -s -x --with-xunit --xunit-file=${WS}/nosetest_flow.xml &
PIDS=("${PIDS[@]}" $!)
+# route server malformed message test
+NUM=$(sudo -E python route_server_malformed_test.py -s 2> /dev/null | awk '/invalid/{print $NF}')
+PARALLEL_NUM=10
+for (( i = 1; i < $(( $NUM + 1)); ++i ))
+do
+ sudo -E python route_server_malformed_test.py --gobgp-image $GOBGP_IMAGE --test-prefix mal$i --test-index $i -s -x --gobgp-log-level debug --with-xunit --xunit-file=${WS}/nosetest_malform${i}.xml &
+ PIDS=("${PIDS[@]}" $!)
+ sleep 3
+done
+
for (( i = 0; i < ${#PIDS[@]}; ++i ))
do
wait ${PIDS[$i]}
@@ -119,5 +73,31 @@ do
fi
done
+# route server policy test
+NUM=$(sudo -E python route_server_policy_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_test.py --gobgp-image $GOBGP_IMAGE --test-prefix p$j --test-index $j -s -x --gobgp-log-level debug --with-xunit --xunit-file=${WS}/nosetest_policy${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