Add proper exit codes to tests.