Skip to content

Commit

Permalink
contrib/intel/jenkins: Print return code in run_command.
Browse files Browse the repository at this point in the history
Return code always needs to be printed so that the exact reason it fails is known.
This will allow us to correctly fix silent failures in a stage.

Signed-off-by: Zach Dworkin <[email protected]>
  • Loading branch information
zachdworkin committed Sep 19, 2023
1 parent 43c2288 commit 123339c
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions contrib/intel/jenkins/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ def run_command(command):
if (out != ''):
sys.stdout.write(out)
sys.stdout.flush()

print(f"Return code is {p.returncode}")
if (p.returncode != 0):
print("exiting with " + str(p.poll()))
sys.exit(p.returncode)
Expand All @@ -38,6 +40,8 @@ def run_logging_command(command, log_file):
if (out != ''):
sys.stdout.write(out)
sys.stdout.flush()

print(f"Return code is {p.returncode}")
if (p.returncode != 0):
print("exiting with " + str(p.poll()))
f.close()
Expand Down

0 comments on commit 123339c

Please sign in to comment.