Skip to content

Commit 1cac090

Browse files
authored
gh-112301: Add argument aliases and tee compiler output for check warnings (GH-122465)
Also remove superfluous shebang from the warning check script
1 parent c68cb8e commit 1cac090

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

.github/workflows/reusable-ubuntu.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ jobs:
7575
${{ fromJSON(inputs.free-threading) && '--disable-gil' || '' }}
7676
- name: Build CPython out-of-tree
7777
working-directory: ${{ env.CPYTHON_BUILDDIR }}
78-
run: make -j4 &> compiler_output.txt
78+
run: set -o pipefail; make -j4 2>&1 | tee compiler_output.txt
7979
- name: Display build info
8080
working-directory: ${{ env.CPYTHON_BUILDDIR }}
8181
run: make pythoninfo

Tools/build/check_warnings.py

+4-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
#!/usr/bin/env python3
21
"""
32
Parses compiler output with -fdiagnostics-format=json and checks that warnings
43
exist only in files that are expected to have warnings.
@@ -114,24 +113,28 @@ def get_unexpected_improvements(
114113
def main(argv: list[str] | None = None) -> int:
115114
parser = argparse.ArgumentParser()
116115
parser.add_argument(
116+
"-c",
117117
"--compiler-output-file-path",
118118
type=str,
119119
required=True,
120120
help="Path to the compiler output file",
121121
)
122122
parser.add_argument(
123+
"-i",
123124
"--warning-ignore-file-path",
124125
type=str,
125126
required=True,
126127
help="Path to the warning ignore file",
127128
)
128129
parser.add_argument(
130+
"-x",
129131
"--fail-on-regression",
130132
action="store_true",
131133
default=False,
132134
help="Flag to fail if new warnings are found",
133135
)
134136
parser.add_argument(
137+
"-X",
135138
"--fail-on-improvement",
136139
action="store_true",
137140
default=False,

0 commit comments

Comments
 (0)