[rtems-tools commit] tester: Check mail parameters early so users can fix.

Chris Johns chrisj at rtems.org
Tue Oct 24 23:21:53 UTC 2017


Module:    rtems-tools
Branch:    master
Commit:    c73e03040f8d17cd7d39eff8856b349353dce60a
Changeset: http://git.rtems.org/rtems-tools/commit/?id=c73e03040f8d17cd7d39eff8856b349353dce60a

Author:    Chris Johns <chrisj at rtems.org>
Date:      Wed Oct 25 10:13:28 2017 +1100

tester: Check mail parameters early so users can fix.

---

 tester/rt/test.py | 13 ++++++++-----
 1 file changed, 8 insertions(+), 5 deletions(-)

diff --git a/tester/rt/test.py b/tester/rt/test.py
index e036561..3bbd34b 100644
--- a/tester/rt/test.py
+++ b/tester/rt/test.py
@@ -288,6 +288,14 @@ def run(command_path = None):
         output = None
         if opts.find_arg('--mail'):
             mail = mailer.mail(opts)
+            # Request these now to generate any errors.
+            from_addr = mail.from_address()
+            smtp_host = mail.smtp_host()
+            to_addr = opts.find_arg('--mail-to')
+            if to_addr:
+                to_addr = to_addr[1]
+            else:
+                to_addr = 'build at rtems.org'
             output = log_capture()
         log.notice('RTEMS Testing - Tester, %s' % (version.str()))
         if opts.find_arg('--list-bsps'):
@@ -384,11 +392,6 @@ def run(command_path = None):
         log.notice(average_time)
         log.notice(total_time)
         if mail is not None and output is not None:
-            to_addr = opts.find_arg('--mail-to')
-            if to_addr:
-                to_addr = to_addr[1]
-            else:
-                to_addr = 'build at rtems.org'
             subject = '[rtems-test] %s: %s' % (str(start_time).split('.')[0], bsp)
             body = [total_time, average_time,
                     '', 'Summary', '=======', '',




More information about the vc mailing list