File tree Expand file tree Collapse file tree 6 files changed +33
-15
lines changed Expand file tree Collapse file tree 6 files changed +33
-15
lines changed Original file line number Diff line number Diff line change @@ -7,7 +7,7 @@ timeout_mins: 180
77action {
88 define_artifacts {
99 regex: " artifacts/**/*sponge_log.xml" 
10-  regex: " artifacts/**/*sponge_log .log" 
10+  regex: " artifacts/**/*.log" 
1111 strip_prefix: " artifacts" 
1212 }
1313}
Original file line number Diff line number Diff line change @@ -119,16 +119,20 @@ run_test() {
119119 #  Test driver usage:
120120 #  https://github.com/grpc/grpc/tree/master/tools/run_tests/xds_k8s_test_driver#basic-usage
121121 local  test_name=" ${1:? Usage:  run_test test_name} " 
122+  local  out_dir=" ${TEST_XML_OUTPUT_DIR} /${test_name} " 
123+  mkdir -pv " ${out_dir} " 
122124 set  -x
123125 python -m " tests.${test_name} "   \
124126 --flagfile=" ${TEST_DRIVER_FLAGFILE} "   \
125127 --kube_context=" ${KUBE_CONTEXT} "   \
126128 --server_image=" ${SERVER_IMAGE_NAME} :${GIT_COMMIT} "   \
127129 --client_image=" ${CLIENT_IMAGE_NAME} :${GIT_COMMIT} "   \
128130 --testing_version=" ${TESTING_VERSION} "   \
129-  --xml_output_file=" ${TEST_XML_OUTPUT_DIR} /${test_name} /sponge_log.xml"   \
130-  --force_cleanup
131-  set  +x
131+  --force_cleanup \
132+  --collect_app_logs \
133+  --log_dir=" ${out_dir} "   \
134+  --xml_output_file=" ${out_dir} /sponge_log.xml"   \
135+  | &  tee " ${out_dir} /sponge_log.log" 
132136}
133137
134138# ######################################
@@ -170,9 +174,15 @@ main() {
170174 build_docker_images_if_needed
171175 #  Run tests
172176 cd  " ${TEST_DRIVER_FULL_DIR} " 
173-  run_test baseline_test
174-  run_test security_test
175-  run_test authz_test
177+  local  failed_tests=0
178+  test_suites=(" baseline_test"   " security_test"   " authz_test"  )
179+  for  test  in  " ${test_suites[@]} " ;  do 
180+  run_test $test  ||  ((  failed_tests++  )) 
181+  done 
182+  echo  " Failed test suites: ${failed_tests} " 
183+  if  ((  failed_tests >  0  )) ;  then 
184+  exit  1
185+  fi 
176186}
177187
178188main " $@ " 
Original file line number Diff line number Diff line change @@ -7,7 +7,7 @@ timeout_mins: 180
77action {
88 define_artifacts {
99 regex: " artifacts/**/*sponge_log.xml" 
10-  regex: " artifacts/**/*sponge_log .log" 
10+  regex: " artifacts/**/*.log" 
1111 strip_prefix: " artifacts" 
1212 }
1313}
Original file line number Diff line number Diff line change @@ -118,6 +118,8 @@ run_test() {
118118 #  Test driver usage:
119119 #  https://github.com/grpc/grpc/tree/master/tools/run_tests/xds_k8s_test_driver#basic-usage
120120 local  test_name=" ${1:? Usage:  run_test test_name} " 
121+  local  out_dir=" ${TEST_XML_OUTPUT_DIR} /${test_name} " 
122+  mkdir -pv " ${out_dir} " 
121123 set  -x
122124 python -m " tests.${test_name} "   \
123125 --flagfile=" ${TEST_DRIVER_FLAGFILE} "   \
@@ -126,9 +128,11 @@ run_test() {
126128 --server_image=" ${SERVER_IMAGE_NAME} :${GIT_COMMIT} "   \
127129 --client_image=" ${CLIENT_IMAGE_NAME} :${GIT_COMMIT} "   \
128130 --testing_version=" ${TESTING_VERSION} "   \
129-  --xml_output_file=" ${TEST_XML_OUTPUT_DIR} /${test_name} /sponge_log.xml"   \
130-  --force_cleanup
131-  set  +x
131+  --force_cleanup \
132+  --collect_app_logs \
133+  --log_dir=" ${out_dir} "   \
134+  --xml_output_file=" ${out_dir} /sponge_log.xml"   \
135+  | &  tee " ${out_dir} /sponge_log.log" 
132136}
133137
134138# ######################################
Original file line number Diff line number Diff line change @@ -7,7 +7,7 @@ timeout_mins: 90
77action {
88 define_artifacts {
99 regex: " artifacts/**/*sponge_log.xml" 
10-  regex: " artifacts/**/*sponge_log .log" 
10+  regex: " artifacts/**/*.log" 
1111 strip_prefix: " artifacts" 
1212 }
1313}
Original file line number Diff line number Diff line change @@ -118,15 +118,19 @@ run_test() {
118118 #  Test driver usage:
119119 #  https://github.com/grpc/grpc/tree/master/tools/run_tests/xds_k8s_test_driver#basic-usage
120120 local  test_name=" ${1:? Usage:  run_test test_name} " 
121+  local  out_dir=" ${TEST_XML_OUTPUT_DIR} /${test_name} " 
122+  mkdir -pv " ${out_dir} " 
121123 set  -x
122124 python -m " tests.${test_name} "   \
123125 --flagfile=" ${TEST_DRIVER_FLAGFILE} "   \
126+  --flagfile=" config/url-map.cfg"   \
124127 --kube_context=" ${KUBE_CONTEXT} "   \
125128 --client_image=" ${CLIENT_IMAGE_NAME} :${GIT_COMMIT} "   \
126129 --testing_version=" ${TESTING_VERSION} "   \
127-  --xml_output_file=" ${TEST_XML_OUTPUT_DIR} /${test_name} /sponge_log.xml"   \
128-  --flagfile=" config/url-map.cfg" 
129-  set  +x
130+  --collect_app_logs \
131+  --log_dir=" ${out_dir} "   \
132+  --xml_output_file=" ${out_dir} /sponge_log.xml"   \
133+  | &  tee " ${out_dir} /sponge_log.log" 
130134}
131135
132136# ######################################
                                 You can’t perform that action at this time. 
               
                  
0 commit comments