Please modify COQ_TEST in Makefile.coq.local to use `coqc` instead of coqtop.
coqtop
is gueared towards interactive use, please use coqc
in place of coqtop -batch -load-vernac-source
in your test suite.
Also, I am not sure you want to keep using the -test-mode
flag. Are you aware of what it does? It is supposed to be for internal use and may be removed in the future. If you have a specific need please open an issue in the Coq tracker.