aboutsummaryrefslogtreecommitdiff
path: root/contrib/dg-extract-results.py
diff options
context:
space:
mode:
authorChristophe Lyon <christophe.lyon@linaro.org>2019-02-04 08:55:00 +0000
committerChristophe Lyon <clyon@gcc.gnu.org>2019-02-04 09:55:00 +0100
commitf874089d310d9d3996a56b577245cb97d1430266 (patch)
treeacf9d79b8c3cbc4708a383d246225ef15e765ef2 /contrib/dg-extract-results.py
parentc8df72c446639286815357b723f257264e6b6162 (diff)
downloadgcc-f874089d310d9d3996a56b577245cb97d1430266.zip
gcc-f874089d310d9d3996a56b577245cb97d1430266.tar.gz
gcc-f874089d310d9d3996a56b577245cb97d1430266.tar.bz2
contrib/dg-extract-results: Handle timeout warnings
2019-02-04 Christophe Lyon <christophe.lyon@linaro.org> contrib/ * dg-extract-results.py: Keep timeout warnings next to their matching test. * dg-extract-results.sh: Likewise. From-SVN: r268511
Diffstat (limited to 'contrib/dg-extract-results.py')
-rw-r--r--contrib/dg-extract-results.py17
1 files changed, 15 insertions, 2 deletions
diff --git a/contrib/dg-extract-results.py b/contrib/dg-extract-results.py
index 4b02a5b..ed62f73 100644
--- a/contrib/dg-extract-results.py
+++ b/contrib/dg-extract-results.py
@@ -239,6 +239,7 @@ class Prog:
harness = None
segment = None
final_using = 0
+ has_warning = 0
# If this is the first run for this variation, add any text before
# the first harness to the header.
@@ -292,8 +293,20 @@ class Prog:
# Ugly hack to get the right order for gfortran.
if name.startswith ('gfortran.dg/g77/'):
name = 'h' + name
- key = (name, len (harness.results))
- harness.results.append ((key, line))
+ # If we have a time out warning, make sure it appears
+ # before the following testcase diagnostic: we insert
+ # the testname before 'program' so that sort faces a
+ # list of testhanes.
+ if line.startswith ('WARNING: program timed out'):
+ has_warning = 1
+ else:
+ if has_warning == 1:
+ key = (name, len (harness.results))
+ myline = 'WARNING: %s program timed out.\n' % name
+ harness.results.append ((key, myline))
+ has_warning = 0
+ key = (name, len (harness.results))
+ harness.results.append ((key, line))
if not first_key and sort_logs:
first_key = key
if line.startswith ('ERROR: (DejaGnu)'):