libstdc++: Improve output verbosity options and default
authorMatthias Kretz <m.kretz@gsi.de>
Wed, 23 Jun 2021 15:34:30 +0000 (16:34 +0100)
committerJonathan Wakely <jwakely@redhat.com>
Wed, 23 Jun 2021 17:29:06 +0000 (18:29 +0100)
commit848bc05a98b6ea416340bfd9cec9a9584fe182fe
tree9b5e0da734b1b633ca65ae572bbad7b449a59b13
parent15f2669c9d0cbeee9f1df198088492d1bb5c4489
libstdc++: Improve output verbosity options and default

For most uses --quiet was too quiet while the default was too noisy. Now
the default output, if stdout is a tty, shows the last successful test
on the same line. With --percentage it adds a percentage at the start of
the line. --percentage is not default because it requires more resources
and might not be 100% compatible to all environments.
If stdout is not a tty the default is quiet output like for dejagnu.

Additionally, argument parsing now recognizes contracted short options
which is easier to use with e.g. DRIVEROPTS=-pxk.

Signed-off-by: Matthias Kretz <m.kretz@gsi.de>
libstdc++-v3/ChangeLog:

* testsuite/experimental/simd/driver.sh: Rewrite output
verbosity logic. Add -p/--percentage option. Allow -v/--verbose
to be used twice. Add -x and -o short options. Parse long
options with = instead of separating space generically. Parce
contracted short options. Make unrecognized options an error.
If same-line output is active, trap on EXIT to increment the
progress (only with --percentage), erase the line and print the
current status.
* testsuite/experimental/simd/generate_makefile.sh: Initialize
helper files for progress account keeping. Update help target
for changes to DRIVEROPTS.
libstdc++-v3/testsuite/experimental/simd/driver.sh
libstdc++-v3/testsuite/experimental/simd/generate_makefile.sh