Fixed its use of removed `--list-test-names-only` switch, and also updated the return code check to reflect changes in v3. Closes #1933