exit test on fail with correct code