Bug 1212756 - Fix jstests --debug option r=terrence
authorJon Coppeard <jcoppeard@mozilla.com>
Thu, 08 Oct 2015 17:48:53 +0100
changeset 266964 ecabb878492d482b3caac0b125df41e8a9278a39
parent 266963 1f46ca0a518a0a9be083fa93877731b1c38ed5ba
child 266965 df9bd3a65292788d5b679ff5d8b1e092e538cabd
push id29504
push usercbook@mozilla.com
push dateFri, 09 Oct 2015 09:43:23 +0000
treeherdermozilla-central@d01dd42e654b [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersterrence
bugs1212756
milestone44.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 1212756 - Fix jstests --debug option r=terrence
js/src/tests/jstests.py
--- a/js/src/tests/jstests.py
+++ b/js/src/tests/jstests.py
@@ -345,24 +345,25 @@ def main():
 
     if test_count == 0:
         print('no tests selected')
         return 1
 
     test_dir = dirname(abspath(__file__))
 
     if options.debug:
-        if len(list(test_gen)) > 1:
+        tests = list(test_gen)
+        if len(tests) > 1:
             print('Multiple tests match command line arguments,'
                   ' debugger can only run one')
-            for tc in test_gen:
+            for tc in tests:
                 print('    {}'.format(tc.path))
             return 2
 
-        cmd = test_gen[0].get_command(RefTestCase.js_cmd_prefix)
+        cmd = tests[0].get_command(prefix)
         if options.show_cmd:
             print(list2cmdline(cmd))
         with changedir(test_dir):
             call(cmd)
         return 0
 
     with changedir(test_dir):
         # Force Pacific time zone to avoid failures in Date tests.