OSDN Git Service

* doc/invoke.texi: Fix name of sched1 dump.
[pf3gnuchains/gcc-fork.git] / contrib / test_summary
index 9866435..c4b3c2c 100755 (executable)
@@ -1,6 +1,7 @@
 #! /bin/sh
 
-# (C) 1998, 1999, 2000, 2002 Free Software Foundation
+# (C) 1998, 1999, 2000, 2002, 2003, 2004, 2007, 2009
+# Free Software Foundation
 # Originally by Alexandre Oliva <oliva@dcc.unicamp.br>
 
 # This script is Free Software, and it can be copied, distributed and
@@ -90,7 +91,7 @@ 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 |
+( echo @TOPLEVEL_CONFIGURE_ARGUMENTS@ | ./config.status --file=-; cat $files ) |
 $AWK '
 BEGIN {
   lang=""; configflags = "";
@@ -99,16 +100,15 @@ BEGIN {
   print "cat <<'"'"'EOF'"'"' |";
 '${prepend_logs+"  system(\"cat $prepend_logs\"); "}'
 }
-($0 ~ /^[^ ]*\/configure / || $0 ~ /^# [^ ]*\/configure /) &&
-configflags == "" {
+NR == 1 {
     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 "";
+    if ( system("test -f " srcdir "/LAST_UPDATED") == 0 ) {
+        printf "LAST_UPDATED: ";
+        system("tail -1 " srcdir "/LAST_UPDATED");
+        print "";
+    }
 
     sub(/^[^ ]*\/configure */, " ", configflags);
     sub(/,;t t $/, " ", configflags);
@@ -128,7 +128,7 @@ configflags == "" {
 $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|UNRESOLVED|WARNING|ERROR|# of )/ { print; }
+/^(XPASS|FAIL|UNRESOLVED|WARNING|ERROR|# of )/ { sub ("\r", ""); print; }
 /^using:/ { print ""; print; print ""; }
 # dumpall != 0 && /^X?(PASS|FAIL|UNTESTED)|^testcase/ { dumpall=0; }
 # dumpall != 0 { print; }