Skip to content
Snippets Groups Projects
Commit dbf134f5 authored by Sylvester Joosten's avatar Sylvester Joosten
Browse files

Fix return code check

parent 8added84
No related branches found
No related tags found
1 merge request!183Resolve "tracking/scripts/tracking_performance.py fails (but gitlab doesn't catch it)"
This commit is part of merge request !183. Comments created here will be created in the context of that merge request.
...@@ -67,7 +67,7 @@ if 'sim' in procs: ...@@ -67,7 +67,7 @@ if 'sim' in procs:
if args.seed > 0: if args.seed > 0:
sim_cmd += ['--random.seed', args.seed] sim_cmd += ['--random.seed', args.seed]
return_code = subprocess.run(sim_cmd).returncode return_code = subprocess.run(sim_cmd).returncode
if return_code is not None and return_code < 0: if return_code is not None and return_code != 0:
print("ERROR running simulation!") print("ERROR running simulation!")
exit(1) exit(1)
subprocess.run(['rootls', '-t', sim_file]) subprocess.run(['rootls', '-t', sim_file])
...@@ -84,7 +84,7 @@ if 'rec' in procs: ...@@ -84,7 +84,7 @@ if 'rec' in procs:
rec_cmd = ['xenv', '-x', juggler_xenv, 'gaudirun.py', os.path.join(sdir, 'options', option_script)] rec_cmd = ['xenv', '-x', juggler_xenv, 'gaudirun.py', os.path.join(sdir, 'options', option_script)]
return_code = subprocess.run(rec_cmd).returncode return_code = subprocess.run(rec_cmd).returncode
if return_code is not None and return_code < 0: if return_code is not None and return_code != 0:
print('ERROR running juggler ({})!'.format(opt)) print('ERROR running juggler ({})!'.format(opt))
exit(1) exit(1)
process = subprocess.run(['rootls', '-t', rec_file]) process = subprocess.run(['rootls', '-t', rec_file])
...@@ -97,7 +97,7 @@ if 'ana' in procs: ...@@ -97,7 +97,7 @@ if 'ana' in procs:
'--tracking-collection', 'outputTrackParameters', '--tracking-collection', 'outputTrackParameters',
'-o', 'results', '-t', args.nametag] '-o', 'results', '-t', args.nametag]
return_code = subprocess.run(ana_cmd).returncode return_code = subprocess.run(ana_cmd).returncode
if return_code is not None and return_code < 0: if return_code is not None and return_code != 0:
print('ERROR running analysis ({})!'.format(ana)) print('ERROR running analysis ({})!'.format(ana))
exit(1) exit(1)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment