Commit aa9baacf by Christophe Lyon Committed by Christophe Lyon

Report DejaGnu ERROR messages in dg-extract-results.

2016-09-20  Christophe Lyon  <christophe.lyon@linaro.org>

	* dg-extract-results.py: Report DejaGnu error in the final
	summary.
	* dg-extract-results.sh: Likewise.

From-SVN: r240289
parent b0a5704b
2016-09-20 Christophe Lyon <christophe.lyon@linaro.org> 2016-09-20 Christophe Lyon <christophe.lyon@linaro.org>
* dg-extract-results.py: Report DejaGnu error in the final
summary.
* dg-extract-results.sh: Likewise.
2016-09-20 Christophe Lyon <christophe.lyon@linaro.org>
* compare_tests: Take ERROR messages into account when * compare_tests: Take ERROR messages into account when
comparing. comparing.
......
...@@ -134,6 +134,7 @@ class Prog: ...@@ -134,6 +134,7 @@ class Prog:
self.end_line = None self.end_line = None
# Known summary types. # Known summary types.
self.count_names = [ self.count_names = [
'# of DejaGnu errors\t\t',
'# of expected passes\t\t', '# of expected passes\t\t',
'# of unexpected failures\t', '# of unexpected failures\t',
'# of unexpected successes\t', '# of unexpected successes\t',
...@@ -245,6 +246,10 @@ class Prog: ...@@ -245,6 +246,10 @@ class Prog:
segment = Segment (filename, file.tell()) segment = Segment (filename, file.tell())
variation.header = segment variation.header = segment
# Parse the rest of the summary (the '# of ' lines).
if len (variation.counts) == 0:
variation.counts = self.zero_counts()
# Parse up until the first line of the summary. # Parse up until the first line of the summary.
if num_variations == 1: if num_variations == 1:
end = '\t\t=== ' + tool.name + ' Summary ===\n' end = '\t\t=== ' + tool.name + ' Summary ===\n'
...@@ -291,6 +296,11 @@ class Prog: ...@@ -291,6 +296,11 @@ class Prog:
harness.results.append ((key, line)) harness.results.append ((key, line))
if not first_key and sort_logs: if not first_key and sort_logs:
first_key = key first_key = key
if line.startswith ('ERROR: (DejaGnu)'):
for i in range (len (self.count_names)):
if 'DejaGnu errors' in self.count_names[i]:
variation.counts[i] += 1
break
# 'Using ...' lines are only interesting in a header. Splitting # 'Using ...' lines are only interesting in a header. Splitting
# the test up into parallel runs leads to more 'Using ...' lines # the test up into parallel runs leads to more 'Using ...' lines
...@@ -309,9 +319,6 @@ class Prog: ...@@ -309,9 +319,6 @@ class Prog:
segment.lines -= final_using segment.lines -= final_using
harness.add_segment (first_key, segment) harness.add_segment (first_key, segment)
# Parse the rest of the summary (the '# of ' lines).
if len (variation.counts) == 0:
variation.counts = self.zero_counts()
while True: while True:
before = file.tell() before = file.tell()
line = file.readline() line = file.readline()
......
...@@ -369,10 +369,11 @@ EOF ...@@ -369,10 +369,11 @@ EOF
BEGIN { BEGIN {
variant="$VAR" variant="$VAR"
tool="$TOOL" tool="$TOOL"
passcnt=0; failcnt=0; untstcnt=0; xpasscnt=0; xfailcnt=0; kpasscnt=0; kfailcnt=0; unsupcnt=0; unrescnt=0; passcnt=0; failcnt=0; untstcnt=0; xpasscnt=0; xfailcnt=0; kpasscnt=0; kfailcnt=0; unsupcnt=0; unrescnt=0; dgerrorcnt=0;
curvar=""; insummary=0 curvar=""; insummary=0
} }
/^Running target / { curvar = \$3; next } /^Running target / { curvar = \$3; next }
/^ERROR: \(DejaGnu\)/ { if (variant == curvar) dgerrorcnt += 1 }
/^# of / { if (variant == curvar) insummary = 1 } /^# of / { if (variant == curvar) insummary = 1 }
/^# of expected passes/ { if (insummary == 1) passcnt += \$5; next; } /^# of expected passes/ { if (insummary == 1) passcnt += \$5; next; }
/^# of unexpected successes/ { if (insummary == 1) xpasscnt += \$5; next; } /^# of unexpected successes/ { if (insummary == 1) xpasscnt += \$5; next; }
...@@ -390,6 +391,7 @@ BEGIN { ...@@ -390,6 +391,7 @@ BEGIN {
{ next } { next }
END { END {
printf ("\t\t=== %s Summary for %s ===\n\n", tool, variant) printf ("\t\t=== %s Summary for %s ===\n\n", tool, variant)
if (dgerrorcnt != 0) printf ("# of DejaGnu errors\t\t%d\n", dgerrorcnt)
if (passcnt != 0) printf ("# of expected passes\t\t%d\n", passcnt) if (passcnt != 0) printf ("# of expected passes\t\t%d\n", passcnt)
if (failcnt != 0) printf ("# of unexpected failures\t%d\n", failcnt) if (failcnt != 0) printf ("# of unexpected failures\t%d\n", failcnt)
if (xpasscnt != 0) printf ("# of unexpected successes\t%d\n", xpasscnt) if (xpasscnt != 0) printf ("# of unexpected successes\t%d\n", xpasscnt)
...@@ -419,8 +421,9 @@ TOTAL_AWK=${TMP}/total.awk ...@@ -419,8 +421,9 @@ TOTAL_AWK=${TMP}/total.awk
cat << EOF > $TOTAL_AWK cat << EOF > $TOTAL_AWK
BEGIN { BEGIN {
tool="$TOOL" tool="$TOOL"
passcnt=0; failcnt=0; untstcnt=0; xpasscnt=0; xfailcnt=0; kfailcnt=0; unsupcnt=0; unrescnt=0 passcnt=0; failcnt=0; untstcnt=0; xpasscnt=0; xfailcnt=0; kfailcnt=0; unsupcnt=0; unrescnt=0; dgerrorcnt=0
} }
/^# of DejaGnu errors/ { dgerrorcnt += \$5 }
/^# of expected passes/ { passcnt += \$5 } /^# of expected passes/ { passcnt += \$5 }
/^# of unexpected failures/ { failcnt += \$5 } /^# of unexpected failures/ { failcnt += \$5 }
/^# of unexpected successes/ { xpasscnt += \$5 } /^# of unexpected successes/ { xpasscnt += \$5 }
...@@ -431,7 +434,8 @@ BEGIN { ...@@ -431,7 +434,8 @@ BEGIN {
/^# of unresolved testcases/ { unrescnt += \$5 } /^# of unresolved testcases/ { unrescnt += \$5 }
/^# of unsupported tests/ { unsupcnt += \$5 } /^# of unsupported tests/ { unsupcnt += \$5 }
END { END {
printf ("\n\t\t=== %s Summary ===\n\n", tool) printf ("\n\t\t=== %s MySummary ===\n\n", tool)
if (dgerrorcnt != 0) printf ("# of DejaGnu errors\t\t%d\n", dgerrorcnt)
if (passcnt != 0) printf ("# of expected passes\t\t%d\n", passcnt) if (passcnt != 0) printf ("# of expected passes\t\t%d\n", passcnt)
if (failcnt != 0) printf ("# of unexpected failures\t%d\n", failcnt) if (failcnt != 0) printf ("# of unexpected failures\t%d\n", failcnt)
if (xpasscnt != 0) printf ("# of unexpected successes\t%d\n", xpasscnt) if (xpasscnt != 0) printf ("# of unexpected successes\t%d\n", xpasscnt)
......
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