dejagnu
[Top][All Lists]
Advanced

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

[PATCH 0/1] New option for runtest to log_user to stdout


From: Filipe Brandenburger
Subject: [PATCH 0/1] New option for runtest to log_user to stdout
Date: Wed, 6 May 2015 15:04:09 -0700

Hi,

The background is that I have an automated build/test system, but when a
test fails, all that is saved is the test stdout/stderr, the build tree
is destroyed regardless of the results.

When debugging test failures on systems that use dejagnu for tests, it
is often useful to have the expect logs available to figure out what was
the "spawn" output and why the "expect_pass" regexp did not match it.

Usually, that information gets saved in the *.log files but is not
usually printed to stdout (which can be done by using the "log_user 1"
expect command.)

While the *.log files are useful to troubleshoot the issue, to use them
I need to have the build/test tree around. While I can include commands
in my test script to look for *.log files (but all of them? no, I just
want the runtest ones) and then use a glob, cat the files, etc. But then
do I still keep the original test output? If I do, I get duplicated
sessions, if I don't, I might be losing some information that is only
printed there... So, being able to include the log_user output with the
runtest stdout would be very interesting.

There is, actually, a way to include the log_user output in stdout, and
that is to increate verbosity to at least 3, since there is already a
check for $verbose > 2 that does log_user 1. The main problem with that
approach is that I find increasing verbosity is actually useful to debug
*runtest* itself, while log_user output is useful to troubleshoot the
tests being run by runtest. (Assuming I'm using a stable version of
"runtest", I don't think I'll need to debug it that often, while I find
myself debugging tests quite often.)

So, I'm proposing adding a new option (--log_user is my suggestion, but
feel free to pick something else) to allow enabling "log_user" expect
output to stdout without the need to increase verbosity.

Let me know if you have any comments about the patch.

Cheers,
Filipe


Filipe Brandenburger (1):
  Introduce new --log_user option to also send expect logs to stdout

 runtest.exp | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)

-- 
2.2.0.rc0.207.ga3a616c




reply via email to

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