Make script quit when error happens in child processes.

This commit is contained in:
Cheng Zhao 2014-08-08 23:23:56 +08:00
parent 54b8a62920
commit b93564894c
2 changed files with 12 additions and 7 deletions

View file

@ -20,7 +20,9 @@ def main():
args = parse_args()
for config in args.configuration:
build_path = os.path.join('out', config)
subprocess.call([ninja, '-C', build_path, args.target])
ret = subprocess.call([ninja, '-C', build_path, args.target])
if ret != 0:
sys.exit(ret)
def parse_args():