Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CI: Fix patchcheck #31708

Merged
merged 2 commits into from
Mar 14, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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