Sometimes the output of a command is not important, in these cases
`doctest` complains nonetheless. This commit introduces a
`IGNORE_OUTPUT` option which still allows checking that the command
executes correctly but skips the checking of the output with the
expected one. In addition to this the `test_docs` command now can parse
a `ignoreoutput` option in the python block which will:
* if numbers are specified (e.g. `ignoreoutput=1,2`): the specified
line numbers will have `# doctest: +IGNORE_OUTPUT` added at the end
of the specified line numbers.
* Without numbers (e.g. `{python ignoreoutput}`) then all lines will
have a `# doctest: +IGNORE_OUTPUT` appended.
The logic of the `revng ptml` command was too tightly coupled with the
parsing of the xml. Overhaul the structure of the ptml code and split it
in two locations:
* `revng.ptml`: this module contains functions that allow easy
manipulation of PTML, both for printing it and for obtaining the split
metadata/text version.
* `revng.internal.cli._commands.ptml`: this implements the actual `revng
ptml` command. This leverages the new logic in the `revng.ptml` module
while maintaining the same functionality.
Python 3.14 will deprecate `argparse.FileType` [1]. This is due to a
variety of factors, one of which is that the class leaks file
descriptors when used. Remove all usages in the codebase and instead
use a wrapper function for `open`.
[1] https://docs.python.org/3.14/library/argparse.html#argparse.FileType
Add retries when fetching debugging symbols via the `revng model
fetch-debuginfo` command. Retries only apply when the status code
returned by the server is within the expected ones.
Drop support of uncompressing zstd-compressed modules in `revng opt` as
this functionality has been moved within `llvm`.
(This is a revert of commit dd8d158e47)
When stopping an internal daemon, first try to use SIGINT and then
resort to SIGKILL. This is to avoid the signal handler exiting with a
non-zero return code during shutdown.
Fix a possible race condition that could arise if multiple instances of
`fetch-debuginfo` are run in parallel. This avoids the same file being
written by multiple processes and being moved early. This avoids a
`FileNotFoundError` and possibly data corruption due to the concurrent
situation.
Implement override mechanisms via command-line and/or env for the
following aspects:
* The maximum memory set by `test-harness`
* The timeout handled by `test-harness`
* The number of concurrent jobs to spawn while running `revng mass-testing run`
Drop using the `revng-` prefix from all executables under
`libexec/revng/`. Now any executable found under there that is
executable and without extension will be considered a `revng`
subcommand, following the usual command-line rules.
The `_run_common` function assumed that the `command` argument was
mutable. Change the logic so that it works with immutable collections
(e.g. `tuple`) as well.
Instead of directly writing the destination file, use the combination of
a `.tmp` suffix and `os.replace` to guarantee that the destination file
is written whole and not partially.
Make the cache directory logic uniform in Python and C++, move the
respective implementations under support since it's project-wide logic
and not exclusive to debug-info.