Change the tests to only generate tests for all repositories when passed `--test-repositories`

(Also improve a debug message)