[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: dealing with verbose programs
From: |
Jim Meyering |
Subject: |
Re: dealing with verbose programs |
Date: |
Wed, 05 Sep 2007 07:50:33 +0200 |
Bruno Haible <address@hidden> wrote:
> Karl Berry wrote:
>> A wild thought: what if gnulib-tool saved its output during a run, and
>> then presented a *diff* of the new output and the old output? I at
>> least would find that considerably more readable.
>>
>> (Along with a mention of the file where the full output can be found, of
>> course.)
>
> I'd love to have the same feature for "configure" and "make" runs.
> It could be a general-purpose utility, taking a command line as argument,
> like 'time' and 'nice' are.
Ha! I wrote the following a few weeks ago, thinking some day
I'd write something more involved. I'm not very happy with it,
because, at least with coreutils, it runs for too long without
giving any progress indicator.
If you only run make with -j1, then you can run make that way, too.
But with parallel builds, there's too much nondeterminism
and hence noise in the resulting diffs, even if you sort.
# Run specified command, recording its output and comparing (when done)
# with previous output.
# FIXME: add a progress bar, and allow options to specify:
# - output file, if not stdout
# - expected size of output in bytes
# - expected length of output in lines
# - expected run time
# and to record them (actual/expected) in a DB
monitor()
{
sort=no
case "$1" in --sort) sort=yes; shift;; esac
case $# in
2) local log=$1 cmd=$2;;
*) echo "Usage: $FUNCNAME LOGFILE CMD" 1>&2; return 1;;
esac
echo "running $cmd..."
eval "$cmd" > $log.new 2>&1
test -f $log && {
test $sort = yes \
&& sort $log | diff -u - <(sort $log.new) \
|| diff -u $log $log.new
}
command mv -f $log.new $log
}
bs()
{
monitor .m-bs './bootstrap --gnulib-srcdir=/gnulib'
monitor .m-conf ./configure
monitor --sort .m-make make
monitor .m-make-check make check
}
- new module 'calloc-posix' (was: Re: getline() behaviour change), Bruno Haible, 2007/09/02
- Re: new module 'calloc-posix', Jim Meyering, 2007/09/04
- Re: new module 'calloc-posix', Karl Berry, 2007/09/04
- Re: dealing with verbose programs (was: Re: new module 'calloc-posix'), Bruno Haible, 2007/09/04
- Re: dealing with verbose programs,
Jim Meyering <=
- Re: dealing with verbose programs, Ben Pfaff, 2007/09/05
- Re: dealing with verbose programs, Jim Meyering, 2007/09/05
- Re: dealing with verbose programs, Ben Pfaff, 2007/09/05
- Re: dealing with verbose programs, Jim Meyering, 2007/09/05
- Re: dealing with verbose programs, Bruno Haible, 2007/09/05
gnulib-tool: new options --verbose, --quiet, Bruno Haible, 2007/09/09
gnulib-tool: new option --extract-notice, Bruno Haible, 2007/09/09
new modules 'malloc-posix', 'realloc-posix', 'calloc-posix', Bruno Haible, 2007/09/09