mirror of
git://gcc.gnu.org/git/gcc.git
synced 2025-03-07 22:17:19 +08:00
* warn_summary, test_summary: Moved into the contrib directory.
From-SVN: r19991
This commit is contained in:
parent
d258564a1d
commit
57fec042aa
@ -1,3 +1,7 @@
|
||||
Sat May 23 23:35:14 1998 Jeffrey A Law (law@cygnus.com)
|
||||
|
||||
* warn_summary, test_summary: Moved into the contrib directory.
|
||||
|
||||
1998-05-23 Manfred Hollstein <manfred@s-direktnet.de>
|
||||
|
||||
* toplev.h (tree_node): Provide global declaration to avoid
|
||||
|
113
gcc/test_summary
113
gcc/test_summary
@ -1,113 +0,0 @@
|
||||
#! /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 }
|
||||
/^Running target / { print ""; print; }
|
||||
/^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
|
@ -1,52 +0,0 @@
|
||||
#!/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
|
Loading…
Reference in New Issue
Block a user