File tree Expand file tree Collapse file tree 1 file changed +6
-5
lines changed
Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -142,7 +142,8 @@ MYPY_PROTOBUF_VENV=venv_$PY_VER_MYPY_PROTOBUF
142142 fi
143143)
144144
145- ERRORS=()
145+ ERROR_FILE=$( mktemp)
146+ trap ' rm -f "$ERROR_FILE"' EXIT
146147
147148for PY_VER in $PY_VER_UNIT_TESTS ; do
148149 UNIT_TESTS_VENV=venv_$PY_VER
@@ -202,7 +203,7 @@ for PY_VER in $PY_VER_UNIT_TESTS; do
202203 cp " $MYPY_OUTPUT /mypy_output.omit_linenos" " test_negative/output.expected.$PY_VER_MYPY_TARGET .omit_linenos"
203204
204205 # Record error instead of echoing and exiting
205- ERRORS+=( " test_negative/output.expected.$PY_VER_MYPY_TARGET didnt match. Copying over for you." )
206+ echo " test_negative/output.expected.$PY_VER_MYPY_TARGET didnt match. Copying over for you." >> " $ERROR_FILE "
206207 fi
207208 )
208209
@@ -214,11 +215,11 @@ for PY_VER in $PY_VER_UNIT_TESTS; do
214215done
215216
216217# Report all errors at the end
217- if [ ${ # ERRORS[@]} -gt 0 ]; then
218+ if [ -s " $ERROR_FILE " ]; then
218219 echo -e " \n${RED} ===============================================${NC} "
219- for error in " ${ERRORS[@]} " ; do
220+ while IFS= read -r error ; do
220221 echo -e " ${RED} $error ${NC} "
221- done
222+ done < " $ERROR_FILE "
222223 echo -e " ${RED} Now rerun${NC} "
223224 exit 1
224225fi
You can’t perform that action at this time.
0 commit comments