X-Git-Url: http://git.sourceforge.jp/view?a=blobdiff_plain;f=contrib%2Ftest_summary;h=98664359bc2e5b93a0ff9c8b126d8f416d8335c4;hb=709cdea68ac169ec69d645e21fc6cdf262f79eb8;hp=7a621b7b55a8a01aa02e35d0075f47ac68757e19;hpb=961221fa53be12c7f5836ff9005fd539324595fb;p=pf3gnuchains%2Fgcc-fork.git diff --git a/contrib/test_summary b/contrib/test_summary index 7a621b7b55a..98664359bc2 100755 --- a/contrib/test_summary +++ b/contrib/test_summary @@ -1,6 +1,6 @@ #! /bin/sh -# (C) 1998-1999 Free Software Foundation +# (C) 1998, 1999, 2000, 2002 Free Software Foundation # Originally by Alexandre Oliva # This script is Free Software, and it can be copied, distributed and @@ -28,14 +28,19 @@ # test_summary | 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 -# -p: prepend specified file (or list of files: -p "a b") to the report -# -i: append specified file (or list of files: -i "a b") to the report -# -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. +if test x"$1" = "x-h"; then + cat <<_EOF + -o: re-reads logs that have been mailed already (.sum.sent) + -t: prevents logs from being renamed + -p: prepend specified file (or list of files: -p "a b") to the report + -i: append specified file (or list of files: -i "a b") to the report + -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. +_EOF + exit 0 +fi # Find a good awk. if test -z "$AWK" ; then @@ -48,7 +53,7 @@ if test -z "$AWK" ; then done fi -: ${filesuffix=}; export fileprefix +: ${filesuffix=}; export filesuffix : ${move=true}; export move : ${forcemail=false}; export forcemail while true; do @@ -63,7 +68,7 @@ while true; do esac done : ${mailto="\" address \""}; export mailto -files=`find . -name \*.sum$filesuffix -print` +files=`find . -name \*.sum$filesuffix -print | sort` anyfile=false anychange=$forcemail && for file in $files; do [ -f $file ] && @@ -82,15 +87,37 @@ for file in $files; do done && $anyfile && if $forcemail || $anychange; then :; else mailto=nobody; fi && +# We use cat instead of listing the files as arguments to AWK because +# GNU awk 3.0.0 would break if any of the filenames contained `=' and +# was preceded by an invalid ``variable'' name. +cat ./config.status $files | $AWK ' BEGIN { - lang=""; + lang=""; configflags = ""; address="gcc-testresults@gcc.gnu.org"; version="gcc"; - print "cat <<\EOF |"; + print "cat <<'"'"'EOF'"'"' |"; '${prepend_logs+" system(\"cat $prepend_logs\"); "}' } -$1 ~ /\/configure$/ { $1 = "configure flags:"; configflags = $0 } +($0 ~ /^[^ ]*\/configure / || $0 ~ /^# [^ ]*\/configure /) && +configflags == "" { + configflags = $0 " "; + sub(/^# /, "", configflags); + sub(/^s,@TOPLEVEL_CONFIGURE_ARGUMENTS@,/, "", configflags); + srcdir = configflags; + sub(/\/configure .*/, "", srcdir); + printf "LAST_UPDATED: "; + system("tail -1 " srcdir "/LAST_UPDATED"); + print ""; + + sub(/^[^ ]*\/configure */, " ", configflags); + sub(/,;t t $/, " ", configflags); + sub(/ --with-gcc-version-trigger=[^ ]* /, " ", configflags); + sub(/ --norecursion /, " ", configflags); + sub(/ $/, "", configflags); + sub(/^ *$/, " none", configflags); + configflags = "configure flags:" configflags; +} /^Running target / { print ""; print; } /^Target / { if (host != "") next; else host = $3; } /^Host / && host ~ /^unix\{.*\}$/ { host = $3 " " substr(host, 5); } @@ -98,12 +125,11 @@ $1 ~ /\/configure$/ { $1 = "configure flags:"; configflags = $0 } /^[ ]*=== [^ ]+ tests ===/ { if (lang == "") lang = " "$2" "; else lang = " "; } -/--disable-haifa/ { prefix="haifa-disabled "; } -/--enable-haifa/ { prefix="haifa-enabled "; } $2 == "version" { save = $0; $1 = ""; $2 = ""; version = $0; gsub(/^ */, "", version); gsub(/\r$/, "", version); $0 = save; } /\===.*Summary/ { print ""; print; blanks=1; } /tests ===/ || /^(Target|Host|Native)/ || $2 == "version" { print; blanks=1; } -/^(XPASS|FAIL|# of )/ { print; } +/^(XPASS|FAIL|UNRESOLVED|WARNING|ERROR|# of )/ { print; } +/^using:/ { print ""; print; print ""; } # dumpall != 0 && /^X?(PASS|FAIL|UNTESTED)|^testcase/ { dumpall=0; } # dumpall != 0 { print; } # /^FAIL/ { dumpall=1; } @@ -120,10 +146,10 @@ END { if (lang != "") { print "Mail -s \"Results for " prefix version lang "testsuite on " host "\" '"${mailto}"' &&"; }} { next; } -' ./config.status $files | sed "s/\([\`\$\\\\]\)/\\\\\\1/g" && +' | 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 &&" + [ -f $file ] && echo "mv `${PWDCMD-pwd}`/$file `${PWDCMD-pwd}`/$file.sent &&" done fi && echo true