public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* Re: How to generate test reports?
@ 1998-05-13 10:04 Kaveh R. Ghazi
  0 siblings, 0 replies; 21+ messages in thread
From: Kaveh R. Ghazi @ 1998-05-13 10:04 UTC (permalink / raw)
  To: Matthias.Klose, law; +Cc: egcs

 > From: Jeffrey A Law <law@cygnus.com>
 >
 > Seems to me we should check both of them into the sources somewhere
 > and add a faq item which mentions them.
 >
 > Any objections?
 > jeff
 
        It would be nice to have a "make report" target which runs some
scripts and produces a file suitable for mailing.  Having a consistent
format is useful, IMHO. 
 
        This report might include info like the gcc version string, the
host/target configuration, as well as BOOT_CFLAGS, native vs gnu as/ld,
and which stage1 compiler was used, finally the summary output from
"make check" should be appended. 
 
        I guess this is somewhat/slightly similar to the "bashbug"
target in bash-2.x, although I wouldn't recommend exactly what bash
does.  Just dump to a file all the relevant info and ask the user to
mail it to egcs@cygnus.com. 
 
	I'll work on a starting point in configure.in and Makefile.in.
Stay tuned.

                --Kaveh
--
Kaveh R. Ghazi			Project Manager / Custom Development
ghazi@caip.rutgers.edu		Icon CMT Corp.

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: How to generate test reports?
  1998-05-21 20:15               ` Alexandre Oliva
@ 1998-05-23 22:47                 ` Jeffrey A Law
  0 siblings, 0 replies; 21+ messages in thread
From: Jeffrey A Law @ 1998-05-23 22:47 UTC (permalink / raw)
  To: Alexandre Oliva; +Cc: Joe Buck, Matthias.Klose, egcs

  In message < or1ztn6s7l.fsf@zecarneiro.lsd.dcc.unicamp.br >you write:
  > Shouldn't it rather be in egcs/contrib, or in the egcs top-level
  > directory?  It is not supposed to take care of the gcc testsuite
  > only.  In fact, it should include results for libstdc++ and libg++
  > too, IMO.
Yea.  Call it a stupidity leak on my part.  The same could be said
for the warning script.

I'll move them into the contrib directory.

jeff

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: How to generate test reports?
  1998-05-13 16:02 Michael Meissner
@ 1998-05-22 16:41 ` Gerald Pfeifer
  1998-05-22 12:21   ` Jeffrey A Law
  0 siblings, 1 reply; 21+ messages in thread
From: Gerald Pfeifer @ 1998-05-22 16:41 UTC (permalink / raw)
  To: Michael Meissner; +Cc: ghazi, law, Matthias.Klose, egcs

On Wed, 13 May 1998, Michael Meissner wrote:
> One of the things I've been thinking about is capturing some of the
> Makefile variables in a .c file (like CFLAGS, BOOT_CFLAGS, etc.) that
> would be printed when -v was used. 

Something else that could prove quite useful is having the exact date
of the CVS snapshot in `egcs -v`.

I submitted some small script for updating version.c to Jeff and
egcs@cygnus.com back in April.

What happend to that one? Should I re-submit?

Gerald
-- 
Gerald Pfeifer (Jerry)      Vienna University of Technology
pfeifer@dbai.tuwien.ac.at   http://www.dbai.tuwien.ac.at/~pfeifer/




^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: How to generate test reports?
  1998-05-22 16:41 ` Gerald Pfeifer
@ 1998-05-22 12:21   ` Jeffrey A Law
  0 siblings, 0 replies; 21+ messages in thread
From: Jeffrey A Law @ 1998-05-22 12:21 UTC (permalink / raw)
  To: Gerald Pfeifer; +Cc: Michael Meissner, ghazi, Matthias.Klose, egcs

  In message < Pine.GSO.3.96.980522182315.16797E-100000@markab.dbai.tuwien.ac.at >you write:
  > What happend to that one? Should I re-submit?
I'm still working through the backlog.  Believe it or not I expect
to get to that patch today/tomorrow. 

jeff

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: How to generate test reports?
  1998-05-15  1:48           ` Alexandre Oliva
  1998-05-20 22:55             ` Jeffrey A Law
@ 1998-05-21 20:15             ` Matthias Klose
  1 sibling, 0 replies; 21+ messages in thread
From: Matthias Klose @ 1998-05-21 20:15 UTC (permalink / raw)
  To: Alexandre Oliva; +Cc: egcs

Alexandre Oliva writes:
> I've attached a new version of this script, that is expected to comply 
> with these requirements.

gawk is not available on all systems.

Fri May 22 00:33:52 1998  Matthias Klose  <doko@cs.tu-berlin.de>

	* test_summary: find good awk (copied from warn_summary).

*** gcc/test_summary~	Thu May 21 00:44:58 1998
--- gcc/test_summary	Fri May 22 00:32:26 1998
***************
*** 31,36 ****
--- 31,48 ----
  # -t: prevents logs from being renamed
  # -m: specify the e-mail address to send notes to.  An appropriate default should be selected from the log files.
  # -f: force reports to be mailed; if omitted, only reports that differ from the sent.* version are sent
+ 
+ # Find a good awk.
+ if test -z "$AWK" ; then
+   for AWK in gawk nawk awk ; do
+     if type $AWK 2>&1 | grep 'not found' > /dev/null 2>&1 ; then
+       :
+     else
+       break
+     fi
+   done
+ fi
+ 
  : ${filesuffix=}; export fileprefix
  : ${move=true}; export move
  : ${forcemail=false}; export forcemail
***************
*** 63,69 ****
  done &&
  $anyfile &&
  if $forcemail || $anychange; then :; else mailto=nobody; fi &&
! gawk '
  BEGIN {
    lang="";
    print "cat <<EOF |";
--- 75,81 ----
  done &&
  $anyfile &&
  if $forcemail || $anychange; then :; else mailto=nobody; fi &&
! $AWK '
  BEGIN {
    lang="";
    print "cat <<EOF |";

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: How to generate test reports?
  1998-05-20 22:55             ` Jeffrey A Law
@ 1998-05-21 20:15               ` Alexandre Oliva
  1998-05-23 22:47                 ` Jeffrey A Law
  0 siblings, 1 reply; 21+ messages in thread
From: Alexandre Oliva @ 1998-05-21 20:15 UTC (permalink / raw)
  To: law; +Cc: Joe Buck, Matthias.Klose, egcs

Jeffrey A Law <law@hurl.cygnus.com> writes:

>   In message < or7m3ot6h3.fsf@zecarneiro.lsd.dcc.unicamp.br >you write:
>> I've attached a new version of this script, that is expected to comply 
>> with these requirements.

> I've added the scripts to summarize warnings and testresults to the
> egcs/gcc directory.

Shouldn't it rather be in egcs/contrib, or in the egcs top-level
directory?  It is not supposed to take care of the gcc testsuite
only.  In fact, it should include results for libstdc++ and libg++
too, IMO.

> Next step, tie them into the Makefile :-)

IMO, only the top-level Makefile should be modified so as to provide a
rule that calls this script, but then, since you have installed the
script in the gcc/ subdirectory, your opinion may be different.  I'd
personally prefer to have it moved to egcs/contrib, and called by the
top-level Makefile.

Please tell me whether you agree or disagree with these changes, so I
can implement the Makefile glue (or someone else can :-)

-- 
Alexandre Oliva
mailto:oliva@dcc.unicamp.br mailto:aoliva@acm.org
http://www.dcc.unicamp.br/~oliva
Universidade Estadual de Campinas, SP, Brasil


^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: How to generate test reports?
  1998-05-15  1:48           ` Alexandre Oliva
@ 1998-05-20 22:55             ` Jeffrey A Law
  1998-05-21 20:15               ` Alexandre Oliva
  1998-05-21 20:15             ` Matthias Klose
  1 sibling, 1 reply; 21+ messages in thread
From: Jeffrey A Law @ 1998-05-20 22:55 UTC (permalink / raw)
  To: Alexandre Oliva; +Cc: Joe Buck, Matthias.Klose, egcs

  In message < or7m3ot6h3.fsf@zecarneiro.lsd.dcc.unicamp.br >you write:
  > I've attached a new version of this script, that is expected to comply 
  > with these requirements.
I've added the scripts to summarize warnings and testresults to the
egcs/gcc directory.

Next step, tie them into the Makefile :-)

jeff

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: How to generate test reports?
  1998-05-13 20:23         ` Joe Buck
@ 1998-05-15  1:48           ` Alexandre Oliva
  1998-05-20 22:55             ` Jeffrey A Law
  1998-05-21 20:15             ` Matthias Klose
  0 siblings, 2 replies; 21+ messages in thread
From: Alexandre Oliva @ 1998-05-15  1:48 UTC (permalink / raw)
  To: Joe Buck; +Cc: law, Matthias.Klose, egcs

[-- Attachment #1: Type: text/plain, Size: 1285 bytes --]

Joe Buck <jbuck@synopsys.com> writes:

> It would be nice if it had an option that would just take the root of
> a build tree (the directory in which configure is run), and it then
> used, say

> find $build_tree -type f -name '*.sum' -print

> to find the summary files.

This should be quite easy to do.  It might even keep on renaming (or
just copying) summary and log files, so that e-mail would not be sent
if no new failure or unexpected success was introduced.

> It could read config.status to get the configure arguments

good idea!  But the problem of finding out the make arguments, such as
CFLAGS and BOOT_CFLAGS remain.  Perhaps we could pass FLAGS_TO_PASS to
the script, or some subset of it, and assume `make mail_report' will
be invoked with the same arguments as `make bootstrap'.

I'd still like this script to produce a script, instead of mailing the
results directly, because I've got some hosts that are not able to
properly send e-mail, but I can always get the script produced by them 
and run it on another host.

I've attached a new version of this script, that is expected to comply 
with these requirements.

-- 
Alexandre Oliva
mailto:oliva@dcc.unicamp.br mailto:aoliva@acm.org
http://www.dcc.unicamp.br/~oliva
Universidade Estadual de Campinas, SP, Brasil

[-- Attachment #2: summarize --]
[-- Type: text/x-shellscript, Size: 3847 bytes --]

#! /bin/sh

# (C) 1998 Alexandre Oliva <oliva@dcc.unicamp.br>

# This script is Free Software, and it can be copied, distributed and
# modified as defined in the GNU General Public License.  A copy of
# its license can be downloaded from http://www.gnu.org/copyleft/gpl.html

# This script processes *.{sum,log} files, producing a shell-script
# that sends e-mail to the appropriate lists and renames files to
# *.sent.  It currently handles gcc and egcs, but it should be quite
# easy to modify it to handle other packages and its mailing lists.

# The scripts assumes it is run in the root directory of the build
# tree, and it will include all .sum files it finds in the mail
# report.

# configure flags are extracted from ./config.status

# if the BOOT_CFLAGS environment variable is set, it will be included
# in the mail report too.

# The usage pattern of this script is as follows:

# summarize | more   # so as to observe what should be done

# summarize | sh     # so as to actually send e-mail and move log files

# It accepts a few command line arguments.  For example:
# -o: re-reads logs that have been mailed already (.sum.sent)
# -t: prevents logs from being renamed
# -m: specify the e-mail address to send notes to.  An appropriate default should be selected from the log files.
# -f: force reports to be mailed; if omitted, only reports that differ from the sent.* version are sent
: ${filesuffix=}; export fileprefix
: ${move=true}; export move
: ${forcemail=false}; export forcemail
while true; do
    case "$1" in 
      -o) filesuffix=.sent; move=false; : ${mailto=nobody}; shift;;
      -t) move=false; shift;;
      -m) mailto=$2; forcemail=true; shift 2;;
      -f) unset mailto; forcemail=true; shift;;
      *) break;;
    esac
done
: ${mailto="\" address \""}; export mailto
files=`find . -name \*.sum$filesuffix -print`
anyfile=false anychange=$forcemail &&
for file in $files; do
    [ -f $file ] &&
    anyfile=true &&
    { $anychange ||
      anychange=`diff -u $file.sent $file 2>/dev/null |
	if test ! -f $file.sent ||
	   egrep '^[-+](XPASS|FAIL)' >/dev/null; then
	    echo true
	else
	    echo false
	fi
      `
    }
    true
done &&
$anyfile &&
if $forcemail || $anychange; then :; else mailto=nobody; fi &&
gawk '
BEGIN {
  lang="";
  print "cat <<EOF |";
}
$1 ~ /\/configure$/ { $1 = "configure flags:"; configflags = $0 }
/^Target / { if (host != "") next; else host = $3; }
/^Native / { if (host != "") next; else host = $4; }
/^[ 	]*=== [^ 	]+ tests ===/ {
  if (lang == "") lang = " "$2" "; else lang = " ";
}
/\/ss(\/|c? )/ {
  program="ss"; comment="";
  if (lang == " ") address="nobody";
  else if (lang == " gcc ") address="gcc2@cygnus.com";
  else address="g++@cygnus.com";
}
/\/egcsh?((-[^ ]*)?\/|c?[ -])/ {
  address="egcs@cygnus.com";
  if (version == 0) version="egcs";
}
/--disable-haifa/ { prefix="haifa-disabled "; }
/--enable-haifa/ { prefix="haifa-enabled "; }
$2 == "version" { save = $0; $1 = ""; $2 = ""; version = $0; gsub(/^ */, "", version); $0 = save; }
/Summary ===/ { print ""; print; blanks=1; }
/tests ===/ || /^(Target|Host|Native)/ || $2 == "version" { print; blanks=1; }
/^(XPASS|FAIL|# of )/ { print; }
# dumpall != 0 && /^X?(PASS|FAIL|UNTESTED)|^testcase/ { dumpall=0; }
# dumpall != 0 { print; }
# /^FAIL/ { dumpall=1; }
/^$/ && blanks>0 { print; --blanks; }
END { if (lang != "") {
  print configflags;
  '${BOOT_CFLAGS+'print "BOOT_CFLAGS='"${BOOT_CFLAGS}"'";'}'
  if (boot_cflags != 0) print boot_cflags;
  print "EOF";
  print "Mail -s \"Results for " prefix version lang "testsuite on " host "\" '"${mailto}"' &&";
}}
{ next; }
' ./config.status $files | sed "s/\([\`\$\\\\]\)/\\\\\\1/g" &&
if $move; then
    for file in $files `ls -1 $files | sed s/sum$/log/`; do
      [ -f $file ] && echo "mv `pwd`/$file `pwd`/$file.sent &&"
    done
fi &&
echo true
exit 0

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: How to generate test reports?
  1998-05-13  1:47     ` Jeffrey A Law
                         ` (2 preceding siblings ...)
  1998-05-13 10:04       ` Joe Buck
@ 1998-05-14 11:50       ` Joe Buck
  3 siblings, 0 replies; 21+ messages in thread
From: Joe Buck @ 1998-05-14 11:50 UTC (permalink / raw)
  To: law; +Cc: Matthias.Klose, egcs

>   > sorry, the question wasn't very clear. Anyway the script, which
>   > Alexandre Oliva posted, was the answer I was looking for. Is the
>   > script, which generates the warning summaries when building egcs,
>   > available as well?
> Seems to me we should check both of them into the sources somewhere
> and add a faq item which mentions them.

> Any objections?

I think that Alexandre's script should be changed, or have an option
added, that looks for the files where "make check" generates them.
Otherwise it isn't directly usable and we'd waste a lot of time telling
people how to use it.


^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: How to generate test reports?
  1998-05-13 10:04       ` Joe Buck
@ 1998-05-13 20:23         ` Joe Buck
  1998-05-15  1:48           ` Alexandre Oliva
  0 siblings, 1 reply; 21+ messages in thread
From: Joe Buck @ 1998-05-13 20:23 UTC (permalink / raw)
  To: Joe Buck; +Cc: law, Matthias.Klose, egcs

I wrote:

> If this script were in the source and documented as the standard way
> of reporting test results, we could then automate the processing of
> test reports (since they all would have the same format).

Looking at Alexandre's script, it requires that the .sum and .log files
be copied and rearranged (alternatively a set of symbolic links can be
used).  Other than that problem it is very nice.

It would be nice if it had an option that would just take the root of
a build tree (the directory in which configure is run), and it then
used, say

find $build_tree -type f -name '*.sum' -print

to find the summary files.  It could read config.status to get the
configure arguments, rather than requiring the user to make a separate
file (though a separate file to allow extra information might be nice).

The idea is to make the process as simple as

./configure [options]
make bootstrap-lean
make -k check
make mail_report

No muss, no fuss.  However, if this is done, we'd want a different address
besides egcs to send the report to.




^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: How to generate test reports?
@ 1998-05-13 16:02 Michael Meissner
  1998-05-22 16:41 ` Gerald Pfeifer
  0 siblings, 1 reply; 21+ messages in thread
From: Michael Meissner @ 1998-05-13 16:02 UTC (permalink / raw)
  To: ghazi, law, Matthias.Klose; +Cc: egcs

One of the things I've been thinking about is capturing some of the Makefile
variables in a .c file (like CFLAGS, BOOT_CFLAGS, etc.) that would be printed
when -v was used.

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: How to generate test reports?
  1998-05-13  1:47     ` Jeffrey A Law
  1998-05-13  7:22       ` Robert Lipe
  1998-05-13  7:22       ` Alexandre Oliva
@ 1998-05-13 10:04       ` Joe Buck
  1998-05-13 20:23         ` Joe Buck
  1998-05-14 11:50       ` Joe Buck
  3 siblings, 1 reply; 21+ messages in thread
From: Joe Buck @ 1998-05-13 10:04 UTC (permalink / raw)
  To: law; +Cc: Matthias.Klose, egcs

>   > sorry, the question wasn't very clear. Anyway the script, which
>   > Alexandre Oliva posted, was the answer I was looking for. Is the
>   > script, which generates the warning summaries when building egcs,
>   > available as well?
> Seems to me we should check both of them into the sources somewhere
> and add a faq item which mentions them.

If this script were in the source and documented as the standard way
of reporting test results, we could then automate the processing of
test reports (since they all would have the same format).

If we do that, we might want to have "make check" begin with "sanity"
tests, so we know immediately that, for example, we have 500 g++ test
failures because runtest couldn't locate libstdc++.so.  That way any
automatic processing can reject the report if the sanity tests fail.



^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: How to generate test reports?
  1998-05-13  1:47     ` Jeffrey A Law
  1998-05-13  7:22       ` Robert Lipe
@ 1998-05-13  7:22       ` Alexandre Oliva
  1998-05-13 10:04       ` Joe Buck
  1998-05-14 11:50       ` Joe Buck
  3 siblings, 0 replies; 21+ messages in thread
From: Alexandre Oliva @ 1998-05-13  7:22 UTC (permalink / raw)
  To: law; +Cc: Matthias Klose, egcs

>> sorry, the question wasn't very clear. Anyway the script, which
>> Alexandre Oliva posted, was the answer I was looking for. Is the
>> script, which generates the warning summaries when building egcs,
>> available as well?

Jeffrey A Law <law@cygnus.com> writes:

> Seems to me we should check both of them into the sources somewhere
> and add a faq item which mentions them.

Perhaps in a separate module?

> Any objections?

Not of my part.  I could post some more scripts I use to automate my
builds, but they may need some documentation, which I won't be able to 
write in the next few weeks. :-(

-- 
Alexandre Oliva
mailto:oliva@dcc.unicamp.br mailto:aoliva@acm.org
http://www.dcc.unicamp.br/~oliva
Universidade Estadual de Campinas, SP, Brasil


^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: How to generate test reports?
  1998-05-13  1:47     ` Jeffrey A Law
@ 1998-05-13  7:22       ` Robert Lipe
  1998-05-13  7:22       ` Alexandre Oliva
                         ` (2 subsequent siblings)
  3 siblings, 0 replies; 21+ messages in thread
From: Robert Lipe @ 1998-05-13  7:22 UTC (permalink / raw)
  To: egcs

>   > Alexandre Oliva posted, was the answer I was looking for. Is the
>   > script, which generates the warning summaries when building egcs,
>   > available as well?
> Seems to me we should check both of them into the sources somewhere
> and add a faq item which mentions them.

Perhaps in the "contrib/" area?



^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: How to generate test reports?
  1998-05-13  0:56   ` Matthias Klose
  1998-05-13  1:47     ` Jeffrey A Law
@ 1998-05-13  1:58     ` Alexandre Oliva
  1 sibling, 0 replies; 21+ messages in thread
From: Alexandre Oliva @ 1998-05-13  1:58 UTC (permalink / raw)
  To: Matthias Klose; +Cc: law, egcs

[-- Attachment #1: Type: text/plain, Size: 318 bytes --]

Matthias Klose <Matthias.Klose@cs.tu-berlin.de> writes:

> Is the script, which generates the warning summaries when building
> egcs, available as well?

Yup, attached

-- 
Alexandre Oliva
mailto:oliva@dcc.unicamp.br mailto:aoliva@acm.org
http://www.dcc.unicamp.br/~oliva
Universidade Estadual de Campinas, SP, Brasil

[-- Attachment #2: warnsum --]
[-- Type: text/x-shellscript, Size: 1354 bytes --]

#!/bin/sh
# This script parses the output of a gcc bootstrap when using warning
# flags and determines various statistics.
#
# By Kaveh Ghazi  (ghazi@caip.rutgers.edu)  12/13/97.

# This function displays all warnings from stage3 of the bootstrap.
stage3warns()
{
# Some awks choke on long lines so grep them out.
  grep -v libf2c.a $1 | \
	$AWK '/ warning: /{if(t==1)print} ; /stage2/{if(t==0)t=1}'
}

# Find a good awk.
if test -z "$AWK" ; then
  for AWK in gawk nawk awk ; do
    if type $AWK 2>&1 | grep 'not found' > /dev/null 2>&1 ; then
      :
    else
      break
    fi
  done
fi

for file in "$@" ; do

  count=`stage3warns $file | wc -l`
  echo There are $count warnings in stage3 of this bootstrap.

  echo
  echo Number of warnings per file:
  stage3warns $file | $AWK -F: '{print$1}' | sort | uniq -c | sort -nr

  echo
  echo Number of warning types:
  stage3warns $file | sed 's/.*warning: //; 
		s/`\(int\)'"'"'/"\1"/g;
		s/`\(char\)'"'"'/"\1"/g;
		s/`\(inline\)'"'"'/"\1"/g;
		s/`\(else\)'"'"'/"\1"/g;
		s/`\(return\)'"'"'/"\1"/g;
		s/`\(static\)'"'"'/"\1"/g;
		s/`\(extern\)'"'"'/"\1"/g;
		s/`\(longjmp\)'"'"' or `\(vfork\)'"'"'/"\1" or "\2"/g;
		s/`'"[^']*'/"'`???'"'/g;"'
		s/.*format, .* arg (arg [0-9]*)/??? format, ??? arg (arg ???)/;
		s/(arg [0-9]*)/(arg ???)/;
		s/"\([^"]*\)"/`\1'"'"'/g' | \
	sort | uniq -c | sort -nr

done

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: How to generate test reports?
  1998-05-13  0:56   ` Matthias Klose
@ 1998-05-13  1:47     ` Jeffrey A Law
  1998-05-13  7:22       ` Robert Lipe
                         ` (3 more replies)
  1998-05-13  1:58     ` Alexandre Oliva
  1 sibling, 4 replies; 21+ messages in thread
From: Jeffrey A Law @ 1998-05-13  1:47 UTC (permalink / raw)
  To: Matthias Klose; +Cc: egcs

  In message < 13657.19678.441558.402603@gargleblaster >you write:
  > Jeffrey A Law writes:
  > > 
  > >   In message < 199805121511.RAA04137@bolero.cs.tu-berlin.de >you write:
  > >   > How do I generate the test reports sent to the egcs list? I couldn't 
  > find
  > >   > any hints ...
  > > "make check" per the build/install instructions.
  > 
  > sorry, the question wasn't very clear. Anyway the script, which
  > Alexandre Oliva posted, was the answer I was looking for. Is the
  > script, which generates the warning summaries when building egcs,
  > available as well?
Seems to me we should check both of them into the sources somewhere
and add a faq item which mentions them.

Any objections?

jeff

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: How to generate test reports?
  1998-05-12 12:36 ` Jeffrey A Law
@ 1998-05-13  0:56   ` Matthias Klose
  1998-05-13  1:47     ` Jeffrey A Law
  1998-05-13  1:58     ` Alexandre Oliva
  0 siblings, 2 replies; 21+ messages in thread
From: Matthias Klose @ 1998-05-13  0:56 UTC (permalink / raw)
  To: law, egcs

Jeffrey A Law writes:
> 
>   In message < 199805121511.RAA04137@bolero.cs.tu-berlin.de >you write:
>   > How do I generate the test reports sent to the egcs list? I couldn't find
>   > any hints ...
> "make check" per the build/install instructions.

sorry, the question wasn't very clear. Anyway the script, which
Alexandre Oliva posted, was the answer I was looking for. Is the
script, which generates the warning summaries when building egcs,
available as well?

Thanks for all the answers.

	Matthias

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: How to generate test reports?
  1998-05-12  8:13 Matthias Klose
  1998-05-12 12:36 ` Jeffrey A Law
@ 1998-05-12 18:04 ` Alexandre Oliva
  1 sibling, 0 replies; 21+ messages in thread
From: Alexandre Oliva @ 1998-05-12 18:04 UTC (permalink / raw)
  To: Matthias Klose; +Cc: egcs

[-- Attachment #1: Type: text/plain, Size: 316 bytes --]

Matthias Klose <doko@cs.tu-berlin.de> writes:

> How do I generate the test reports sent to the egcs list? I couldn't find
> any hints ...

I use the attached script

-- 
Alexandre Oliva
mailto:oliva@dcc.unicamp.br mailto:aoliva@acm.org
http://www.dcc.unicamp.br/~oliva
Universidade Estadual de Campinas, SP, Brasil

[-- Attachment #2: errsum --]
[-- Type: text/x-shellscript, Size: 4467 bytes --]

#! /bin/sh

# (C) 1998 Alexandre Oliva <oliva@dcc.unicamp.br>

# This script is Free Software, and it can be copied, distributed and
# modified as defined in the GNU General Public License.  A copy of
# its license can be downloaded from http://www.gnu.org/copyleft/gpl.html

# This script processes $variant.*.{sum,log} files, producing a
# shell-script that sends e-mail to the appropriate lists and renames
# files to sent.*

# The scripts assumes it lives in a directory that has a sibling named
# src, whose subdirectories, in my tree, correspond to hostnames.
# These subdirectories must contain files such as
# {ss,egcs,egcsh}.*.{sum,log}.  A sample directory tree follows:

# bin/summarize
# src/mars/ss.compflags
# src/mars/ss.gcc.sum
# src/mars/ss.gcc.log
# src/earth/egcs.compflags
# src/earth/egcs.g++.sum
# src/earth/egcs.g++.log
# src/earth/egcs.gcc.sum
# src/earth/egcs.gcc.log

# The $variant.compflags file should contain information such as:
# configure flags: --enable-shared --with-gnu-as --with-gnu-ld
# BOOT_CFLAGS: -O3 -g -Wall

# Usually, summarize will be invoked as:
#   summarize mars earth | more
# or
#   summarize | sh

# When no argument is given, `uname -n` is assumed.

# It accepts a few command line arguments.  For example:
# -o: re-reads logs that have been mailed already
# -t: prevents logs from being renamed
# -m: specify the e-mail address to send notes to.  An appropriate default is selected from the log files.
# -f: force reports to be mailed; if omitted, only reports that differ from the sent.* version are sent
# -v: specify a variant name, such as ss, egcs or egcsh
: ${variantname=$variant}; export variantname
: ${fileprefix=}; export fileprefix
: ${move=true}; export move
: ${forcemail=false}; export forcemail
while true; do
    case "$1" in 
      -o) fileprefix=sent.; move=false; : ${mailto=nobody}; shift;;
      -t) move=false; shift;;
      -m) mailto=$2; forcemail=true; shift 2;;
      -f) unset mailto; forcemail=true; shift;;
      -v) variantname=$2; shift 2;;
      *) break;;
    esac
done
: ${mailto="\" address \""}; export mailto
case "$variantname" in
*" "*) for v in $variantname; do $0 -v $v ${1+"$@"}; done; exec true;;
*.*) files=${fileprefix}${variantname}.sum
     variantname=`echo $variantname | cut -f1 -d.`;;
"") for v in ss.gcc ss.g++ egcs egcsh; do $0 -v $v ${1+"$@"}; done;
    exec true;;
*) files=${fileprefix}${variantname}.*.sum;;
esac
[ $# -eq 0 ] && set -- `uname -n`
for d in "$@"; do
  cd `dirname $0`/../src/$d &&
  anyfile=false anychange=$forcemail &&
  for file in $files; do
    [ -f $file ] &&
    anyfile=true &&
    { $anychange ||
      anychange=`diff -u sent.$file $file 2>/dev/null |
	if test ! -f sent.$file ||
	   egrep '^[-+](XPASS|FAIL)' >/dev/null; then
	    echo true
	else
	    echo false
	fi
      `
    }
    true
  done &&
  $anyfile &&
  if $forcemail || $anychange; then :; else mailto=nobody; fi &&
  gawk '
BEGIN {
  lang="";
  print "cat <<EOF |";
}
/^configure flags: / { configflags = $0 }
/^BOOT_CFLAGS: / { boot_cflags = $0 }
/^Target / { if (host != "") next; else host = $3; }
/^Native / { if (host != "") next; else host = $4; }
/^[ 	]*=== [^ 	]+ tests ===/ {
  if (lang == "") lang = " "$2" "; else lang = " ";
}
/\/ss(\/|c? )/ {
  program="ss"; comment="";
  if (lang == " ") address="nobody";
  else if (lang == " gcc ") address="gcc2@cygnus.com";
  else address="g++@cygnus.com";
}
/\/egcsh?((-[^ ]*)?\/|c?[ -])/ {
  address="egcs@cygnus.com";
  if (version == 0) version="egcs";
}
/--disable-haifa/ { prefix="haifa-disabled "; }
/--enable-haifa/ { prefix="haifa-enabled "; }
$2 == "version" { save = $0; $1 = ""; $2 = ""; version = $0; gsub(/^ */, "", version); $0 = save; }
/Summary ===/ { print ""; print; blanks=1; }
/tests ===/ || /^(Target|Host|Native)/ || $2 == "version" { print; blanks=1; }
/^(XPASS|FAIL|# of )/ { print; }
# dumpall != 0 && /^X?(PASS|FAIL|UNTESTED)|^testcase/ { dumpall=0; }
# dumpall != 0 { print; }
# /^FAIL/ { dumpall=1; }
/^$/ && blanks>0 { print; --blanks; }
END { if (lang != "") {
  print configflags;
  print boot_cflags;
  print "EOF";
  print "Mail -s \"Results for " prefix version lang "testsuite on " host "\" '"${mailto}"' &&";
}}
{ next; }
' ${variantname}.compflags $files | sed "s/\([\`\$\\\\]\)/\\\\\\1/g" &&
  if $move; then
    for file in $files `ls -1 $files | sed s/sum$/log/`; do
      [ -f $file ] && echo "mv `pwd`/$file `pwd`/sent.$file &&"
    done
  fi &&
  echo true
done
exit 0

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: How to generate test reports?
@ 1998-05-12 12:36 Mike Stump
  0 siblings, 0 replies; 21+ messages in thread
From: Mike Stump @ 1998-05-12 12:36 UTC (permalink / raw)
  To: doko, egcs

> From: Matthias Klose <doko@cs.tu-berlin.de>
> Date: Tue, 12 May 1998 17:11:54 +0200 (MET DST)
> To: egcs@cygnus.com

> How do I generate the test reports sent to the egcs list? I couldn't find
> any hints ...

make check, then look for the .sum files...

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: How to generate test reports?
  1998-05-12  8:13 Matthias Klose
@ 1998-05-12 12:36 ` Jeffrey A Law
  1998-05-13  0:56   ` Matthias Klose
  1998-05-12 18:04 ` Alexandre Oliva
  1 sibling, 1 reply; 21+ messages in thread
From: Jeffrey A Law @ 1998-05-12 12:36 UTC (permalink / raw)
  To: Matthias Klose; +Cc: egcs

  In message < 199805121511.RAA04137@bolero.cs.tu-berlin.de >you write:
  > How do I generate the test reports sent to the egcs list? I couldn't find
  > any hints ...
"make check" per the build/install instructions.

jeff

^ permalink raw reply	[flat|nested] 21+ messages in thread

* How to generate test reports?
@ 1998-05-12  8:13 Matthias Klose
  1998-05-12 12:36 ` Jeffrey A Law
  1998-05-12 18:04 ` Alexandre Oliva
  0 siblings, 2 replies; 21+ messages in thread
From: Matthias Klose @ 1998-05-12  8:13 UTC (permalink / raw)
  To: egcs

How do I generate the test reports sent to the egcs list? I couldn't find
any hints ...

Thanks, Matthias

^ permalink raw reply	[flat|nested] 21+ messages in thread

end of thread, other threads:[~1998-05-23 22:47 UTC | newest]

Thread overview: 21+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1998-05-13 10:04 How to generate test reports? Kaveh R. Ghazi
  -- strict thread matches above, loose matches on Subject: below --
1998-05-13 16:02 Michael Meissner
1998-05-22 16:41 ` Gerald Pfeifer
1998-05-22 12:21   ` Jeffrey A Law
1998-05-12 12:36 Mike Stump
1998-05-12  8:13 Matthias Klose
1998-05-12 12:36 ` Jeffrey A Law
1998-05-13  0:56   ` Matthias Klose
1998-05-13  1:47     ` Jeffrey A Law
1998-05-13  7:22       ` Robert Lipe
1998-05-13  7:22       ` Alexandre Oliva
1998-05-13 10:04       ` Joe Buck
1998-05-13 20:23         ` Joe Buck
1998-05-15  1:48           ` Alexandre Oliva
1998-05-20 22:55             ` Jeffrey A Law
1998-05-21 20:15               ` Alexandre Oliva
1998-05-23 22:47                 ` Jeffrey A Law
1998-05-21 20:15             ` Matthias Klose
1998-05-14 11:50       ` Joe Buck
1998-05-13  1:58     ` Alexandre Oliva
1998-05-12 18:04 ` Alexandre Oliva

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).