Skip to content

Commit

Permalink
ci: devtest: abort execution if uhd_find_devices failed
Browse files Browse the repository at this point in the history
  • Loading branch information
joergho committed Oct 28, 2024
1 parent 19d7dd6 commit 8208bad
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions .ci/utils/mutex_hardware.py
Original file line number Diff line number Diff line change
Expand Up @@ -328,18 +328,25 @@ def main(args):
)
else:
result = subprocess.run(shlex.split(command.format(fpga=fpga)))
if return_code == 0:
if result.returncode != 0:
print("Command exited with return code {}".format(result.returncode), flush=True)
print("Aborting execution (fpga={})".format(fpga), flush=True)
return_code = result.returncode
break
sys.exit(return_code)
else:
return_code = 0
for command in args.test_commands:
if args.working_dir:
result = subprocess.run(shlex.split(command), cwd=args.working_dir)
else:
result = subprocess.run(shlex.split(command))
if result.returncode != 0:
sys.exit(result.returncode)
sys.exit(0)
print("Command exited with return code {}".format(result.returncode), flush=True)
print("Aborting execution", flush=True)
return_code = result.returncode
break
sys.exit(return_code)


if __name__ == "__main__":
Expand Down

0 comments on commit 8208bad

Please sign in to comment.