diff options
Diffstat (limited to 'contrib/dg-extract-results.py')
-rw-r--r-- | contrib/dg-extract-results.py | 23 |
1 files changed, 18 insertions, 5 deletions
diff --git a/contrib/dg-extract-results.py b/contrib/dg-extract-results.py index 4b02a5bea92..7100794d42a 100644 --- a/contrib/dg-extract-results.py +++ b/contrib/dg-extract-results.py @@ -117,7 +117,7 @@ class Prog: self.tool_re = re.compile (r'^\t\t=== (.*) tests ===$') self.result_re = re.compile (r'^(PASS|XPASS|FAIL|XFAIL|UNRESOLVED' r'|WARNING|ERROR|UNSUPPORTED|UNTESTED' - r'|KFAIL):\s*(.+)') + r'|KFAIL|KPASS):\s*(.+)') self.completed_re = re.compile (r'.* completed at (.*)') # Pieces of text to write at the head of the output. # start_line is a pair in which the first element is a datetime @@ -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,10 +293,22 @@ 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 not first_key and sort_logs: - first_key = key + # 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 testnames. + 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)'): for i in range (len (self.count_names)): if 'DejaGnu errors' in self.count_names[i]: |