gh-112301: Add argument aliases and tee compiler output for check warnings (GH-122465)
Also remove superfluous shebang from the warning check script
This commit is contained in:
parent
c68cb8e0c9
commit
1cac0908fb
2
.github/workflows/reusable-ubuntu.yml
vendored
2
.github/workflows/reusable-ubuntu.yml
vendored
@ -75,7 +75,7 @@ jobs:
|
|||||||
${{ fromJSON(inputs.free-threading) && '--disable-gil' || '' }}
|
${{ fromJSON(inputs.free-threading) && '--disable-gil' || '' }}
|
||||||
- name: Build CPython out-of-tree
|
- name: Build CPython out-of-tree
|
||||||
working-directory: ${{ env.CPYTHON_BUILDDIR }}
|
working-directory: ${{ env.CPYTHON_BUILDDIR }}
|
||||||
run: make -j4 &> compiler_output.txt
|
run: set -o pipefail; make -j4 2>&1 | tee compiler_output.txt
|
||||||
- name: Display build info
|
- name: Display build info
|
||||||
working-directory: ${{ env.CPYTHON_BUILDDIR }}
|
working-directory: ${{ env.CPYTHON_BUILDDIR }}
|
||||||
run: make pythoninfo
|
run: make pythoninfo
|
||||||
|
@ -1,4 +1,3 @@
|
|||||||
#!/usr/bin/env python3
|
|
||||||
"""
|
"""
|
||||||
Parses compiler output with -fdiagnostics-format=json and checks that warnings
|
Parses compiler output with -fdiagnostics-format=json and checks that warnings
|
||||||
exist only in files that are expected to have warnings.
|
exist only in files that are expected to have warnings.
|
||||||
@ -114,24 +113,28 @@ def get_unexpected_improvements(
|
|||||||
def main(argv: list[str] | None = None) -> int:
|
def main(argv: list[str] | None = None) -> int:
|
||||||
parser = argparse.ArgumentParser()
|
parser = argparse.ArgumentParser()
|
||||||
parser.add_argument(
|
parser.add_argument(
|
||||||
|
"-c",
|
||||||
"--compiler-output-file-path",
|
"--compiler-output-file-path",
|
||||||
type=str,
|
type=str,
|
||||||
required=True,
|
required=True,
|
||||||
help="Path to the compiler output file",
|
help="Path to the compiler output file",
|
||||||
)
|
)
|
||||||
parser.add_argument(
|
parser.add_argument(
|
||||||
|
"-i",
|
||||||
"--warning-ignore-file-path",
|
"--warning-ignore-file-path",
|
||||||
type=str,
|
type=str,
|
||||||
required=True,
|
required=True,
|
||||||
help="Path to the warning ignore file",
|
help="Path to the warning ignore file",
|
||||||
)
|
)
|
||||||
parser.add_argument(
|
parser.add_argument(
|
||||||
|
"-x",
|
||||||
"--fail-on-regression",
|
"--fail-on-regression",
|
||||||
action="store_true",
|
action="store_true",
|
||||||
default=False,
|
default=False,
|
||||||
help="Flag to fail if new warnings are found",
|
help="Flag to fail if new warnings are found",
|
||||||
)
|
)
|
||||||
parser.add_argument(
|
parser.add_argument(
|
||||||
|
"-X",
|
||||||
"--fail-on-improvement",
|
"--fail-on-improvement",
|
||||||
action="store_true",
|
action="store_true",
|
||||||
default=False,
|
default=False,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user