[1.22] tests: Show the actual output from tests if VERBOSE is set
(Includes and depends on !10 (merged), so please review that first.)
Writing tests' output to a log file makes them difficult to debug when the test might be running on an autobuilder or CI system where only stdout/stderr are recorded. This is particularly troublesome if a failure is only reproducible on a particular autobuilder.
Recent Automake versions have the convention that detailed output from failing tests is written to stdout/stderr, not just to log files, when the VERBOSE environment variable is set; borrow that convention as a trigger for producing detailed test output.
Edited by Simon McVittie