Test result extraction scripts now accept file lists from stdin/file.
GCC and GDB test suite scripts `dg-extract-results` now support reading file lists from stdin or a file to overcome command-line length limits.
The dg-extract-results.sh and dg-extract-results.py scripts, used for combining test summary and log files, have been enhanced to accept input file lists via a new -f option. This option allows reading file paths from a specified file or from standard input, which is crucial for environments like Windows where passing a large number of files as command-line arguments can exceed length limits and cause failures. This change ensures the test suite can complete successfully even with thousands of test output files.
In Details
The dg-extract-results scripts (both shell wrapper and Python implementation) in GCC's contrib directory have been updated to accept a new -f option. This option allows processing a list of input files (e.g., .sum, .log files) provided via a named file or standard input, mitigating command-line length limitations encountered on systems like Windows when dealing with a large number of test outputs generated by parallel test harnesses, as seen in GDB's testsuite.
- dg-extract-results.sh
- A shell script in GCC's contrib directory that acts as a wrapper for
dg-extract-results.pyto process test result files. - dg-extract-results.py
- A Python script in GCC's contrib directory used to combine and process test summary and log files.
- command-line length limit
- A restriction on the maximum number of characters or arguments that can be passed to a command or program via the command line.
- stdin
- Standard input, a default source of data for a program, typically the keyboard.
- parallel harness
- A testing framework that runs multiple tests concurrently to speed up the testing process.