Bug 1262158 - Fix default tests being overwritten in mach firefox-ui-_; r=sydpolk
authorMaja Frydrychowicz <mjzffr@gmail.com>
Thu, 14 Apr 2016 18:17:40 -0400
changeset 331543 865e124224cd54ec70adbefbcb8a750f5e1d985c
parent 331542 e9500cac731dcc7456eee99ea16c9163a9c40b34
child 331544 f5f9a967030d8104686224579294d5aeafff8b5a
push id6048
push userkmoir@mozilla.com
push dateMon, 06 Jun 2016 19:02:08 +0000
treeherdermozilla-beta@46d72a56c57d [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssydpolk
bugs1262158
milestone48.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1262158 - Fix default tests being overwritten in mach firefox-ui-_; r=sydpolk MozReview-Commit-ID: JP59lLBRMc1
testing/firefox-ui/mach_commands.py
--- a/testing/firefox-ui/mach_commands.py
+++ b/testing/firefox-ui/mach_commands.py
@@ -55,26 +55,25 @@ def run_firefox_ui_test(testtype=None, t
 
     fxui_dir = os.path.join(topsrcdir, 'testing', 'firefox-ui')
 
     # Set the resources path which is used to serve test data via wptserve
     if not kwargs['server_root']:
         kwargs['server_root'] = os.path.join(fxui_dir, 'resources')
 
     # If no tests have been selected, set default ones
-    if kwargs.get('tests'):
-        tests = kwargs.get('tests')
-    else:
-        tests = [os.path.join(fxui_dir, 'tests', test)
+    if not kwargs.get('tests'):
+        kwargs['tests'] = [os.path.join(fxui_dir, 'tests', test)
                            for test in test_types[testtype]['default_tests']]
 
     kwargs['logger'] = commandline.setup_logging('Firefox UI - {} Tests'.format(testtype),
                                                  {"mach": sys.stdout})
 
-    args = parser.parse_args(args=tests)
+    # pass tests to parse_args to avoid rereading sys.argv
+    args = parser.parse_args(args=kwargs['tests'])
 
     for k, v in kwargs.iteritems():
         setattr(args, k, v)
 
     parser.verify_usage(args)
 
     failed = test_types[testtype]['cli_module'].cli(args=vars(args))