Skip to content

Commit

Permalink
CI: Fix patchcheck (GH-31708)
Browse files Browse the repository at this point in the history
  • Loading branch information
hugovk authored Mar 14, 2022
1 parent bb1c543 commit 23abae6
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 3 additions & 1 deletion .azure-pipelines/posix-steps.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,9 @@ steps:
COMMAND: make

- ${{ if eq(parameters.patchcheck, 'true') }}:
- script: ./python Tools/scripts/patchcheck.py --ci true
- script: |
git fetch origin
./python Tools/scripts/patchcheck.py --ci true
displayName: 'Run patchcheck.py'
condition: and(succeeded(), eq(variables['Build.Reason'], 'PullRequest'))
Expand Down
2 changes: 2 additions & 0 deletions Tools/scripts/patchcheck.py
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,8 @@ def changed_files(base_branch=None):
with subprocess.Popen(cmd.split(),
stdout=subprocess.PIPE,
cwd=SRCDIR) as st:
if st.wait() != 0:
sys.exit(f'error running {cmd}')
for line in st.stdout:
line = line.decode().rstrip()
status_text, filename = line.split(maxsplit=1)
Expand Down

0 comments on commit 23abae6

Please sign in to comment.