Bug 1222603 - talos --print-tests and --print-suites are broken. r=wlach, a=test-only
authorJulien Pagès <j.parkouss@gmail.com>
Fri, 06 Nov 2015 22:50:24 +0100
changeset 305760 87aa3bcf4e4c9906985f6bcf1e23c307b8400bd3
parent 305759 1336d8c3418f5d0158ed7badbbf3318fa8767a5d
child 305761 c08c0b504debc7d219d9ff70dc45902f29fbe7d0
push id1001
push userraliiev@mozilla.com
push dateMon, 18 Jan 2016 19:06:03 +0000
treeherdermozilla-release@8b89261f3ac4 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerswlach, test-only
bugs1222603
milestone44.0a2
Bug 1222603 - talos --print-tests and --print-suites are broken. r=wlach, a=test-only
testing/talos/talos/cmdline.py
--- a/testing/talos/talos/cmdline.py
+++ b/testing/talos/talos/cmdline.py
@@ -1,28 +1,30 @@
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this file,
 # You can obtain one at http://mozilla.org/MPL/2.0/.
 
 import argparse
 import os
 
+
 class _StopAction(argparse.Action):
     def __init__(self, option_strings, dest=argparse.SUPPRESS,
                  default=argparse.SUPPRESS, help=None):
         super(_StopAction, self).__init__(
             option_strings=option_strings,
             dest=dest,
             default=default,
             nargs=0,
             help=help)
 
 
 class _ListTests(_StopAction):
     def __call__(self, parser, namespace, values, option_string=None):
+        from talos import test
         print 'Available tests:'
         print '================\n'
         test_class_names = [
             (test_class.name(), test_class.description())
             for test_class in test.test_dict().itervalues()
         ]
         test_class_names.sort()
         for name, description in test_class_names:
@@ -30,16 +32,17 @@ class _ListTests(_StopAction):
             print '-'*len(name)
             print description
             print  # Appends a single blank line to the end
         parser.exit()
 
 
 class _ListSuite(_StopAction):
     def __call__(self, parser, namespace, values, option_string=None):
+        from talos.config import suites_conf
         print 'Available suites:'
         for name in suites_conf():
             print ' ', name
         print
         parser.exit()
 
 
 def create_parser(mach_interface=False):