Changeset 65949 in webkit


Ignore:
Timestamp:
Aug 24, 2010 4:45:28 PM (14 years ago)
Author:
dpranke@chromium.org
Message:

2010-08-24 Dirk Pranke <dpranke@chromium.org>

Reviewed by Eric Seidel.

speed up new-run-webkit-tests unit tests

Add a --no-record-results flag that turns off generating the JSON
results file on every test run. Generating the file requires us to
fetch the old results down from the bots, which can be slow. This
flag is off by default.

Reduce the sleep time in wait_for_threads_to_finish from 0.1s to 0.01s.

These changes together shorten the test cycle from ~4.5s to ~1.5s

  • a 3x speedup.

https://bugs.webkit.org/show_bug.cgi?id=44553

  • Scripts/webkitpy/layout_tests/run_webkit_tests.py:
  • Scripts/webkitpy/layout_tests/run_webkit_tests_unittest.py:
Location:
trunk/WebKitTools
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebKitTools/ChangeLog

    r65944 r65949  
     12010-08-24  Dirk Pranke  <dpranke@chromium.org>
     2
     3        Reviewed by Eric Seidel.
     4
     5        speed up new-run-webkit-tests unit tests
     6
     7        Add a --no-record-results flag that turns off generating the JSON
     8        results file on every test run. Generating the file requires us to
     9        fetch the old results down from the bots, which can be slow. This
     10        flag is off by default.
     11   
     12        Reduce the sleep time in wait_for_threads_to_finish from 0.1s to 0.01s.
     13   
     14        These changes together shorten the test cycle from ~4.5s to ~1.5s
     15        - a 3x speedup.
     16
     17        https://bugs.webkit.org/show_bug.cgi?id=44553
     18
     19        * Scripts/webkitpy/layout_tests/run_webkit_tests.py:
     20        * Scripts/webkitpy/layout_tests/run_webkit_tests_unittest.py:
     21
    1222010-08-24  Tony Chang  <tony@chromium.org>
    223
  • trunk/WebKitTools/Scripts/webkitpy/layout_tests/run_webkit_tests.py

    r65578 r65949  
    688688
    689689                if some_thread_is_alive:
    690                     time.sleep(0.1)
     690                    time.sleep(0.01)
    691691
    692692        except KeyboardInterrupt:
     
    780780        self._printer.print_unexpected_results(unexpected_results)
    781781
    782         # Write the same data to log files.
    783         self._write_json_files(unexpected_results, result_summary,
    784                              individual_test_timings)
    785 
    786         # Upload generated JSON files to appengine server.
    787         self._upload_json_files()
     782        if self._options.record_results:
     783            # Write the same data to log files.
     784            self._write_json_files(unexpected_results, result_summary,
     785                                   individual_test_timings)
     786
     787            # Upload generated JSON files to appengine server.
     788            self._upload_json_files()
    788789
    789790        # Write the summary to disk (results.html) and display it if requested.
     
    15461547        optparse.make_option("--platform",
    15471548            help="Override the platform for expected results"),
     1549        optparse.make_option("--no-record-results", action="store_false",
     1550            default=True, dest="record_results",
     1551            help="Don't record the results."),
    15481552        # old-run-webkit-tests also has HTTP toggle options:
    15491553        # --[no-]http                     Run (or do not run) http tests
  • trunk/WebKitTools/Scripts/webkitpy/layout_tests/run_webkit_tests_unittest.py

    r65343 r65949  
    4949
    5050
    51 def passing_run(args, port_obj=None, logging_included=False):
    52     if not logging_included:
    53         args.extend(['--print', 'nothing'])
     51def passing_run(args, port_obj=None, record_results=False):
     52    args.extend(['--print', 'nothing'])
     53    if not record_results:
     54        args.append('--no-record-results')
    5455    options, args = run_webkit_tests.parse_args(args)
    5556    if port_obj is None:
     
    5960
    6061def logging_run(args):
     62    args.extend(['--no-record-results'])
    6163    options, args = run_webkit_tests.parse_args(args)
    6264    port_obj = port.get(options.platform, options)
     
    7577        self.assertTrue(passing_run(['--platform', 'test',
    7678                                     'text/article-element.html']))
    77         self.assertTrue(passing_run(['--platform', 'test',
    78                                     '--child-processes', '1',
    79                                      '--print', 'unexpected']))
    80 
    81     def test_child_processes(self):
     79
     80    def test_one_child_process(self):
    8281        (res, buildbot_output, regular_output) = logging_run(
    8382             ['--platform', 'test', '--print', 'config', '--child-processes',
     
    8685                        in regular_output.get())
    8786
     87    def test_two_child_processes(self):
    8888        (res, buildbot_output, regular_output) = logging_run(
    8989             ['--platform', 'test', '--print', 'config', '--child-processes',
     
    9393
    9494    def test_last_results(self):
    95         passing_run(['--platform', 'test'])
     95        passing_run(['--platform', 'test'], record_results=True)
    9696        (res, buildbot_output, regular_output) = logging_run(
    9797            ['--platform', 'test', '--print-last-failures'])
    9898        self.assertEqual(regular_output.get(), ['\n\n'])
    9999        self.assertEqual(buildbot_output.get(), [])
    100 
    101100
    102101
Note: See TracChangeset for help on using the changeset viewer.