We currently echo that we exit 1, but not why. Current code has no list of failing containers, just a count.
We cluld use our current docker ps filter with an added exited=0 to get all non-failing containers, and the failing ones would be test_containers that are not in that list.
Or to get failing directly we could use inspect with some template magic like docker inspect -f '{{if ne 0.0 .State.ExitCode }}{{.Name}} {{.State.ExitCode}}{{ end }}' $(docker ps -aq)