[rtems-tools commit] tester: Change the mail subject so it list by BSP in the archives.
Chris Johns
chrisj at rtems.org
Sat Nov 4 00:25:12 UTC 2017
Module: rtems-tools
Branch: master
Commit: 24d51f7e4b0328bd53c32cfe994276e0d848400a
Changeset: http://git.rtems.org/rtems-tools/commit/?id=24d51f7e4b0328bd53c32cfe994276e0d848400a
Author: Chris Johns <chrisj at rtems.org>
Date: Sat Nov 4 11:22:08 2017 +1100
tester: Change the mail subject so it list by BSP in the archives.
Change the subject to place the arch/bsp first and then a short
score card for the tests so the archive can be listed by subject and
you can see regressions.
---
tester/rt/report.py | 33 ++++++++++++++++++++-------------
tester/rt/test.py | 6 +++++-
2 files changed, 25 insertions(+), 14 deletions(-)
diff --git a/tester/rt/report.py b/tester/rt/report.py
index 8f266d1..7c906de 100644
--- a/tester/rt/report.py
+++ b/tester/rt/report.py
@@ -208,19 +208,26 @@ class report(object):
log.output(result)
log.output(output)
- def score_card(self):
- l = []
- l += ['Passed: %*d' % (self.total_len, self.passed)]
- l += ['Failed: %*d' % (self.total_len, self.failed)]
- l += ['User Input: %*d' % (self.total_len, self.user_input)]
- l += ['Expected Fail: %*d' % (self.total_len, self.expected_fail)]
- l += ['Indeterminate: %*d' % (self.total_len, self.indeterminate)]
- l += ['Benchmark: %*d' % (self.total_len, self.benchmark)]
- l += ['Timeout: %*d' % (self.total_len, self.timeouts)]
- l += ['Invalid: %*d' % (self.total_len, self.invalids)]
- l += ['---------------%s' % ('-' * self.total_len)]
- l += ['Total: %*d' % (self.total_len, self.total)]
- return os.linesep.join(l)
+ def score_card(self, mode = 'full'):
+ if mode == 'short':
+ return 'Passed:%d Failed:%d Timeout:%d Invalid:%d' % (self.passed,
+ self.failed,
+ self.timeouts,
+ self.invalids)
+ elif mode == 'full':
+ l = []
+ l += ['Passed: %*d' % (self.total_len, self.passed)]
+ l += ['Failed: %*d' % (self.total_len, self.failed)]
+ l += ['User Input: %*d' % (self.total_len, self.user_input)]
+ l += ['Expected Fail: %*d' % (self.total_len, self.expected_fail)]
+ l += ['Indeterminate: %*d' % (self.total_len, self.indeterminate)]
+ l += ['Benchmark: %*d' % (self.total_len, self.benchmark)]
+ l += ['Timeout: %*d' % (self.total_len, self.timeouts)]
+ l += ['Invalid: %*d' % (self.total_len, self.invalids)]
+ l += ['---------------%s' % ('-' * self.total_len)]
+ l += ['Total: %*d' % (self.total_len, self.total)]
+ return os.linesep.join(l)
+ raise error.general('invalid socre card mode: %s' % (mode))
def failures(self):
def show_state(results, state, max_len):
diff --git a/tester/rt/test.py b/tester/rt/test.py
index c8b8834..32ff56f 100644
--- a/tester/rt/test.py
+++ b/tester/rt/test.py
@@ -349,7 +349,11 @@ def run(command_path = None):
log.notice(average_time)
log.notice(total_time)
if mail is not None and output is not None:
- subject = '[rtems-test] %s: %s' % (str(start_time).split('.')[0], bsp)
+ m_arch = opts.defaults.expand('%{arch}')
+ m_bsp = opts.defaults.expand('%{bsp}')
+ subject = '[rtems-test] %s/%s: %s' % (m_arch,
+ m_bsp,
+ reports.score_card('short'))
body = [total_time, average_time,
'', 'Host', '====', host.label(mode = 'all'),
'', 'Summary', '=======', '',
More information about the vc
mailing list