mirror of https://github.com/python/cpython
CI: Fix patchcheck (GH-31708)
This commit is contained in:
parent
bb1c543f4a
commit
23abae621f
|
@ -66,7 +66,9 @@ steps:
|
||||||
COMMAND: make
|
COMMAND: make
|
||||||
|
|
||||||
- ${{ if eq(parameters.patchcheck, 'true') }}:
|
- ${{ 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'
|
displayName: 'Run patchcheck.py'
|
||||||
condition: and(succeeded(), eq(variables['Build.Reason'], 'PullRequest'))
|
condition: and(succeeded(), eq(variables['Build.Reason'], 'PullRequest'))
|
||||||
|
|
||||||
|
|
|
@ -130,6 +130,8 @@ def changed_files(base_branch=None):
|
||||||
with subprocess.Popen(cmd.split(),
|
with subprocess.Popen(cmd.split(),
|
||||||
stdout=subprocess.PIPE,
|
stdout=subprocess.PIPE,
|
||||||
cwd=SRCDIR) as st:
|
cwd=SRCDIR) as st:
|
||||||
|
if st.wait() != 0:
|
||||||
|
sys.exit(f'error running {cmd}')
|
||||||
for line in st.stdout:
|
for line in st.stdout:
|
||||||
line = line.decode().rstrip()
|
line = line.decode().rstrip()
|
||||||
status_text, filename = line.split(maxsplit=1)
|
status_text, filename = line.split(maxsplit=1)
|
||||||
|
|
Loading…
Reference in New Issue