summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/spack/spack/reporters/cdash.py21
1 files changed, 12 insertions, 9 deletions
diff --git a/lib/spack/spack/reporters/cdash.py b/lib/spack/spack/reporters/cdash.py
index 638cc7a889..5ba2c0c6cc 100644
--- a/lib/spack/spack/reporters/cdash.py
+++ b/lib/spack/spack/reporters/cdash.py
@@ -78,7 +78,7 @@ class CDash(Reporter):
for phase in cdash_phases:
report_data[phase] = {}
- report_data[phase]['log'] = ""
+ report_data[phase]['loglines'] = []
report_data[phase]['status'] = 0
report_data[phase]['endtime'] = self.endtime
@@ -97,7 +97,9 @@ class CDash(Reporter):
current_phase = ''
cdash_phase = ''
for line in package['stdout'].splitlines():
- match = phase_regexp.search(line)
+ match = None
+ if line.find("Executing phase: '") != -1:
+ match = phase_regexp.search(line)
if match:
current_phase = match.group(1)
if current_phase not in map_phases_to_cdash:
@@ -107,12 +109,12 @@ class CDash(Reporter):
map_phases_to_cdash[current_phase]
if cdash_phase not in phases_encountered:
phases_encountered.append(cdash_phase)
- report_data[cdash_phase]['log'] += \
- text_type("{0} output for {1}:\n".format(
- cdash_phase, package['name']))
+ report_data[cdash_phase]['loglines'].append(
+ text_type("{0} output for {1}:".format(
+ cdash_phase, package['name'])))
elif cdash_phase:
- report_data[cdash_phase]['log'] += \
- xml.sax.saxutils.escape(line) + "\n"
+ report_data[cdash_phase]['loglines'].append(
+ xml.sax.saxutils.escape(line))
phases_encountered.append('update')
@@ -126,8 +128,9 @@ class CDash(Reporter):
self.starttime = self.endtime - total_duration
for phase in phases_encountered:
report_data[phase]['starttime'] = self.starttime
- errors, warnings = parse_log_events(
- report_data[phase]['log'].splitlines())
+ report_data[phase]['log'] = \
+ '\n'.join(report_data[phase]['loglines'])
+ errors, warnings = parse_log_events(report_data[phase]['loglines'])
nerrors = len(errors)
if phase == 'configure' and nerrors > 0: