[all-commits] [llvm/llvm-project] b7c14b: [Debugify] Add 'acceptance-test' mode for the debu...
Stephen Tozer via All-commits
all-commits at lists.llvm.org
Thu Jul 17 03:41:04 PDT 2025
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: b7c14b6ded300b9190fe0b65881d04c54b2a9fbd
https://github.com/llvm/llvm-project/commit/b7c14b6ded300b9190fe0b65881d04c54b2a9fbd
Author: Stephen Tozer <stephen.tozer at sony.com>
Date: 2025-07-17 (Thu, 17 Jul 2025)
Changed paths:
M llvm/docs/HowToUpdateDebugInfo.rst
A llvm/test/tools/llvm-original-di-preservation/acceptance-test.test
M llvm/test/tools/llvm-original-di-preservation/basic.test
M llvm/utils/llvm-original-di-preservation.py
Log Message:
-----------
[Debugify] Add 'acceptance-test' mode for the debugify report script (#147574)
For the purposes of setting up CI that makes use of debugify, this patch
adds an alternative mode for the llvm-original-di-preservation.py
script, which produces terminal-friendly(-ish) YAML output instead of an
HTML report, and sets the return code to 1 if the input file contains
errors, or 0 if the input file contains no errors or does not exist,
making it simple to use it in CI.
This introduces a small change in existing usage, in that the path for
the HTML report file is now passed with `--report-file <path>` rather
than as a positional argument; I could make the argparse logic work
without this change, but I believe that is simpler to understand this
way, and to my knowledge debugify isn't currently being used in
automated environments where changing this might cause issues. As a
small change while passing by, I also changed `-compress` to
`--compress`, for consistency.
As a note for reviewers, the reason that we treat a non-existent input
file as a pass is that this is actually the expected state: we use clang
to compile numerous files, passing a filepath for debugify errors. Any
errors found by debugify will be written to this file; if none are
found, the file is untouched. This is also mentioned in a code comment,
but I think it useful to state upfront.
Finally, the justification for adding a new mode to this script instead
of adding a separate script for the separate functionality is that this
script understands debugify's output, and performs some deduplication
that is useful for clarifying the resulting output. Writing a new script
would require duplicating logic unnecessarily, and risks the scripts
falling out-of-sync if changes are made to debugify's output.
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list