autoconf-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[RFC] Overhaul Autotest's logging


From: Paolo Bonzini
Subject: [RFC] Overhaul Autotest's logging
Date: Thu, 22 May 2003 10:00:44 +0200

This should do Akim's assigned homework.  I don't know what mark it might
get :-) so I'm RFCing.  Anyway this new design (i.e. having
testsuite.dir/NNN/testsuite.log) seems quite useful because I was often
running the debug scripts redirected to such a file.

What I am doing is to run with the output descriptors redirected to the
standard output; then based on the requested verbosity I either 'tee' to the
logfile or simply append to it.  I did not experience problem in the mixing
of the contents of the file descriptors, but maybe I was simply not looking
at the right place (I compared the -v -x output of the old and new
testsuites for the Fortran test 66, which skips on my machines).

As an added bonus, since tests are always run in verbose mode (but the
verbosity is kept hidden in the group log file), I got rid of file
descriptor 5 which was for messages to be output in verbose mode only.

Paolo

2003-05-22  Paolo Bonzini  <address@hidden>

        Overhaul Autotest's logging: generate separate log files
        in testsuite.dir/NNN/testsuite.log, and append them to
        testsuite.log instead of re-running the test verbosely.

        * lib/autotest/general.m4 (AT_INIT): Use a single redirected
        file descriptor, write 0 to at_status_file instead of setting
        at_status=0, initialize some new variables (at_status_file,
        at_group_log, at_suite_log, at_tee_pipe).  Remove the cruft
        to rerun the tests, instead append the at_group_log to the
        at_suite_log when a test fails.
        (AT_SETUP): pipe the test case's output into at_tee_pipe,
        with the AS_MESSAGE_LOG_FD redirected to stdout.
        (AT_CLEANUP): save the output status in $at_status_file
        and load it in the testsuite's main shell context.
        (AT_CHECK): since tests are run with a redirected stdout,
        and used to be re-run in verbose mode, turn some $at_verbose
        into echo, and don't redirect the output of testing stdout
        and stderr.

        * lib/autotest/autoconf.texi (testsuite Scripts): Update
        the name of the debugging directory and information about
        its contents.



Attachment: at-overhaul-logging.patch
Description: Binary data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]