From 0930984ef0f7920353aa5465322e42a17706aa3d Mon Sep 17 00:00:00 2001
From: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
Date: Thu, 27 Aug 2009 18:59:32 +0000
Subject: [PATCH] Let test_summary invoke, not parse config.status contents.

contrib/*
	PR testsuite/41166
	* test_summary: Invoke config.status, rather than trying to
	parse it.  Adjust awk script.

From-SVN: r151145
---
 contrib/ChangeLog    | 6 ++++++
 contrib/test_summary | 7 ++-----
 2 files changed, 8 insertions(+), 5 deletions(-)

diff --git a/contrib/ChangeLog b/contrib/ChangeLog
index 778f380eddc4..56941fef94f7 100644
--- a/contrib/ChangeLog
+++ b/contrib/ChangeLog
@@ -1,3 +1,9 @@
+2009-08-27  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
+
+	PR testsuite/41166
+	* test_summary: Invoke config.status, rather than trying to
+	parse it.  Adjust awk script.
+
 2009-08-18  Alexandre Oliva  <aoliva@redhat.com>
 
 	* compare-debug: Drop .eh_frame relocations too.
diff --git a/contrib/test_summary b/contrib/test_summary
index f7cddf4af786..c4b3c2c9369b 100755
--- a/contrib/test_summary
+++ b/contrib/test_summary
@@ -91,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 = "";
@@ -100,11 +100,8 @@ 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);
     if ( system("test -f " srcdir "/LAST_UPDATED") == 0 ) {
-- 
GitLab