Skip to content

gh-112301: Add argument aliases and tee compiler output for check warnings #122465

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

Merged
merged 2 commits into from
Jul 30, 2024
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
2 changes: 1 addition & 1 deletion .github/workflows/reusable-ubuntu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ jobs:
${{ fromJSON(inputs.free-threading) && '--disable-gil' || '' }}
- name: Build CPython out-of-tree
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
working-directory: ${{ env.CPYTHON_BUILDDIR }}
run: make pythoninfo
Expand Down
5 changes: 4 additions & 1 deletion Tools/build/check_warnings.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#!/usr/bin/env python3
"""
Parses compiler output with -fdiagnostics-format=json and checks that warnings
exist only in files that are expected to have warnings.
Expand Down Expand Up @@ -114,24 +113,28 @@ def get_unexpected_improvements(
def main(argv: list[str] | None = None) -> int:
parser = argparse.ArgumentParser()
parser.add_argument(
"-c",
"--compiler-output-file-path",
type=str,
required=True,
help="Path to the compiler output file",
)
parser.add_argument(
"-i",
"--warning-ignore-file-path",
type=str,
required=True,
help="Path to the warning ignore file",
)
parser.add_argument(
"-x",
"--fail-on-regression",
action="store_true",
default=False,
help="Flag to fail if new warnings are found",
)
parser.add_argument(
"-X",
"--fail-on-improvement",
action="store_true",
default=False,
Expand Down
Loading