Commit 060717fc by Jakub Jelinek Committed by Jakub Jelinek

re PR testsuite/39807 (Reporting of testsuite failures are messed up when using -j)

	PR testsuite/39807
	* dg-extract-results.sh: Close open files and use >> instead of >
	to decrease number of concurrently open files from awk.  Avoid
	= at the beginning of a regexp and redirect to a file determined
	by curfile variable rather than concatenated strings to workaround
	Solaris nawk bug.

From-SVN: r146850
parent 5345cf68
2009-04-27 Jakub Jelinek <jakub@redhat.com>
PR testsuite/39807
* dg-extract-results.sh: Close open files and use >> instead of >
to decrease number of concurrently open files from awk. Avoid
= at the beginning of a regexp and redirect to a file determined
by curfile variable rather than concatenated strings to workaround
Solaris nawk bug.
2009-04-25 Gerald Pfeifer <gerald@pfeifer.com> 2009-04-25 Gerald Pfeifer <gerald@pfeifer.com>
* test_summary: Only include LAST_UPDATED if it exists. * test_summary: Only include LAST_UPDATED if it exists.
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
# The resulting file can be used with test result comparison scripts for # The resulting file can be used with test result comparison scripts for
# results from tests that were run in parallel. See usage() below. # results from tests that were run in parallel. See usage() below.
# Copyright (C) 2008 Free Software Foundation # Copyright (C) 2008, 2009 Free Software Foundation
# Contributed by Janis Johnson <janis187@us.ibm.com> # Contributed by Janis Johnson <janis187@us.ibm.com>
# #
# This file is part of GCC. # This file is part of GCC.
...@@ -148,26 +148,28 @@ if [ "$TOOL" = acats ]; then ...@@ -148,26 +148,28 @@ if [ "$TOOL" = acats ]; then
ACATS_AWK=${TMP}/acats.awk ACATS_AWK=${TMP}/acats.awk
cat <<EOF > $ACATS_AWK cat <<EOF > $ACATS_AWK
BEGIN { BEGIN {
print_prologue=1; chapter=""; insummary=0 print_prologue=1; curfile=""; insummary=0
passcnt=0; failcnt=0; unsupcnt=0; failures="" passcnt=0; failcnt=0; unsupcnt=0; failures=""
} }
/=== acats configuration ===/ { /^[ \t]*=== acats configuration ===/ {
insummary=0 insummary=0
if (print_prologue) print if (print_prologue) print
next next
} }
/=== acats tests ===/ { /^[ \t]*=== acats tests ===/ {
if (print_prologue) print if (print_prologue) print
print_prologue=0 print_prologue=0
next next
} }
/^Running chapter / { /^Running chapter / {
chapter=\$3 if (curfile) close (curfile)
print > "${TMP}/chapter-"chapter curfile="${TMP}/chapter-"\$3
print >> curfile
next next
} }
/=== acats Summary ===/ { /^[ \t]*=== acats Summary ===/ {
chapter="" if (curfile) close (curfile)
curfile=""
insummary=1 insummary=1
next next
} }
...@@ -182,7 +184,7 @@ BEGIN { ...@@ -182,7 +184,7 @@ BEGIN {
} }
{ {
if (print_prologue) { print; next } if (print_prologue) { print; next }
if (chapter) print > "${TMP}/chapter-"chapter if (curfile) print >> curfile
} }
END { END {
system ("cat ${TMP}/chapter-*") system ("cat ${TMP}/chapter-*")
...@@ -194,6 +196,7 @@ END { ...@@ -194,6 +196,7 @@ END {
} }
EOF EOF
rm -f ${TMP}/chapter-*
$AWK -f $ACATS_AWK $SUM_FILES $AWK -f $ACATS_AWK $SUM_FILES
exit 0 exit 0
fi fi
...@@ -270,6 +273,7 @@ BEGIN { ...@@ -270,6 +273,7 @@ BEGIN {
expfileno=1 expfileno=1
cnt=0 cnt=0
print_using=0 print_using=0
need_close=0
} }
/^EXPFILE: / { /^EXPFILE: / {
expfiles[expfileno] = \$2 expfiles[expfileno] = \$2
...@@ -287,8 +291,10 @@ BEGIN { ...@@ -287,8 +291,10 @@ BEGIN {
/^Running / { /^Running / {
print_using=0 print_using=0
if (variant == curvar) { if (variant == curvar) {
if (need_close) close(curfile)
curfile="${TMP}/list"expfilesr[\$2] curfile="${TMP}/list"expfilesr[\$2]
expfileseen[\$2]=expfileseen[\$2] + 1 expfileseen[\$2]=expfileseen[\$2] + 1
need_close=0
testname="00" testname="00"
next next
} }
...@@ -303,11 +309,12 @@ BEGIN { ...@@ -303,11 +309,12 @@ BEGIN {
/^$/ { if ("$MODE" == "sum") next } /^$/ { if ("$MODE" == "sum") next }
{ if (variant == curvar && curfile) { { if (variant == curvar && curfile) {
if ("$MODE" == "sum") { if ("$MODE" == "sum") {
printf "%s %08d|", testname, cnt > curfile printf "%s %08d|", testname, cnt >> curfile
cnt = cnt + 1 cnt = cnt + 1
} }
filewritten[curfile]=1 filewritten[curfile]=1
print > curfile need_close=1
print >> curfile
} else } else
next next
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment