Skip to content

Commit

Permalink
updating infra utils to upload special test raw output when possible …
Browse files Browse the repository at this point in the history
…exceptions detected.
  • Loading branch information
speediedan committed Sep 2, 2024
1 parent 20f1f60 commit 1aff16b
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions tests/infra_utils.sh
Original file line number Diff line number Diff line change
Expand Up @@ -152,15 +152,13 @@ show_test_results(){
if [ -f ${tmp_out} ]; then
if grep_errors=($(grep --ignore-case --extended-regexp 'error|exception|traceback|failed' ${tmp_out})); then
echo `printf "%0.s-" {1..120} && printf "\n"` | tee -a $test_log
printf "Potential errors detected. See ${tmp_out} for details. Exception/error lines to follow. \n" | tee -a $test_log
echo `printf "%0.s-" {1..120} && printf "\n"` | tee -a $test_log
printf "\n" | tee -a $test_log
show_final_summary "$test_log"
echo `printf "%0.s-" {1..120} && printf "\n"` | tee -a $test_log
printf "Grepped exception/error lines: \n" | tee -a $test_log
printf "Potential errors detected. Uploading ${tmp_out} and grepping exception/error lines below: \n" | tee -a $test_log
echo `printf "%0.s-" {1..120} && printf "\n"` | tee -a $test_log
printf ": \n" | tee -a $test_log
echo "##vso[task.uploadfile]${tmp_out}"
grep --ignore-case --extended-regexp 'error|exception' ${tmp_out} | tee -a $test_log
printf "\n" | tee -a $test_log
show_final_summary "$test_log"
else
printf "No detected errors. \n" | tee -a $test_log
printf "\n" | tee -a $test_log
Expand Down

0 comments on commit 1aff16b

Please sign in to comment.