Fix shell syntax for exit code
Extract test targets