File tree Expand file tree Collapse file tree 2 files changed +9
-7
lines changed
hadoop-ozone/dist/src/main/compose Expand file tree Collapse file tree 2 files changed +9
-7
lines changed Original file line number Diff line number Diff line change @@ -29,7 +29,7 @@ rm "$ALL_RESULT_DIR/*"
2929RESULT=0
3030IFS=$' \n '
3131# shellcheck disable=SC2044
32- for test in $( find " $SCRIPT_DIR " -name test.sh) ; do
32+ for test in $( find " $SCRIPT_DIR " -name test.sh | sort ) ; do
3333 echo " Executing test in $( dirname " $test " ) "
3434
3535 # required to read the .env file from the right location
@@ -41,7 +41,7 @@ for test in $(find "$SCRIPT_DIR" -name test.sh); do
4141 echo " ERROR: Test execution of $( dirname " $test " ) is FAILED!!!!"
4242 fi
4343 RESULT_DIR=" $( dirname " $test " ) /result"
44- cp " $RESULT_DIR " /robot-* .xml " $ALL_RESULT_DIR "
44+ cp " $RESULT_DIR " /robot-* .xml " $RESULT_DIR " /docker- * .log " $ ALL_RESULT_DIR" /
4545done
4646
4747rebot -N " smoketests" -d " $SCRIPT_DIR /result" " $SCRIPT_DIR /result/robot-*.xml"
Original file line number Diff line number Diff line change @@ -77,6 +77,7 @@ wait_for_datanodes(){
7777 sleep 2
7878 done
7979 echo " WARNING! Datanodes are not started successfully. Please check the docker-compose files"
80+ return 1
8081}
8182
8283# # @description Starts a docker-compose based test environment
@@ -86,13 +87,14 @@ start_docker_env(){
8687
8788 create_results_dir
8889
89- docker-compose -f " $COMPOSE_FILE " down
90- docker-compose -f " $COMPOSE_FILE " up -d --scale datanode=" ${datanode_count} " \
90+ docker-compose -f " $COMPOSE_FILE " --no-ansi down
91+ docker-compose -f " $COMPOSE_FILE " --no-ansi up -d --scale datanode=" ${datanode_count} " \
9192 && wait_for_datanodes " $COMPOSE_FILE " " ${datanode_count} " \
9293 && sleep 10
9394
9495 if [[ $? -gt 0 ]]; then
95- docker-compose -f " $COMPOSE_FILE " down
96+ OUTPUT_NAME=" $COMPOSE_ENV_NAME "
97+ stop_docker_env
9698 return 1
9799 fi
98100}
@@ -136,9 +138,9 @@ execute_command_in_container(){
136138
137139# # @description Stops a docker-compose based test environment (with saving the logs)
138140stop_docker_env (){
139- docker-compose -f " $COMPOSE_FILE " logs > " $RESULT_DIR /docker-$OUTPUT_NAME .log"
141+ docker-compose -f " $COMPOSE_FILE " --no-ansi logs > " $RESULT_DIR /docker-$OUTPUT_NAME .log"
140142 if [ " ${KEEP_RUNNING:- false} " = false ]; then
141- docker-compose -f " $COMPOSE_FILE " down
143+ docker-compose -f " $COMPOSE_FILE " --no-ansi down
142144 fi
143145}
144146
You can’t perform that action at this time.
0 commit comments