Changeset 57486 in webkit


Ignore:
Timestamp:
Apr 12, 2010 4:15:08 PM (14 years ago)
Author:
dpranke@chromium.org
Message:

2010-04-12 Dirk Pranke <dpranke@chromium.org>

Reviewed by Eric Seidel.

Modify run_webkit_tests.py to not call sys.exit() at the end of test
run; doing so makes it more difficult to embed the routine for,
among other things, unit tests. We push the exit calling up into
new-run-webkit-tests.

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

  • Scripts/new-run-webkit-tests:
  • Scripts/webkitpy/layout_tests/run_webkit_tests.py:
Location:
trunk/WebKitTools
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebKitTools/ChangeLog

    r57483 r57486  
     12010-04-12  Dirk Pranke  <dpranke@chromium.org>
     2
     3        Reviewed by Eric Seidel.
     4
     5        Modify run_webkit_tests.py to not call sys.exit() at the end of test
     6        run; doing so makes it more difficult to embed the routine for,
     7        among other things, unit tests. We push the exit calling up into
     8        new-run-webkit-tests.
     9
     10        https://bugs.webkit.org/show_bug.cgi?id=37464
     11
     12        * Scripts/new-run-webkit-tests:
     13        * Scripts/webkitpy/layout_tests/run_webkit_tests.py:
     14
    1152010-04-12  Eric Seidel  <eric@webkit.org>
    216
  • trunk/WebKitTools/Scripts/new-run-webkit-tests

    r57443 r57486  
    2929
    3030"""Wrapper around webkitpy/layout_tests/run_webkit_tests.py"""
     31import sys
    3132
    3233import webkitpy.layout_tests.run_webkit_tests as run_webkit_tests
     
    3435if __name__ == '__main__':
    3536    options, args = run_webkit_tests.parse_args()
    36     run_webkit_tests.main(options, args)
     37    sys.exit(run_webkit_tests.main(options, args))
  • trunk/WebKitTools/Scripts/webkitpy/layout_tests/run_webkit_tests.py

    r57470 r57486  
    615615
    616616        Return:
    617           We return nonzero if there are regressions compared to the last run.
     617          The number of unexpected results (0 == success)
    618618        """
    619619        if not self._test_files:
     
    13691369
    13701370def main(options, args):
    1371     """Run the tests.  Will call sys.exit when complete.
     1371    """Run the tests.
    13721372
    13731373    Args:
    13741374      options: a dictionary of command line options
    13751375      args: a list of sub directories or files to test
     1376    Returns:
     1377      the number of unexpected results that occurred, or -1 if there is an
     1378          error.
    13761379    """
    13771380
     
    14711474        print ("If there are no fail messages, errors or exceptions, then the "
    14721475            "lint succeeded.")
    1473         sys.exit(0)
     1476        return 0
    14741477
    14751478    write = create_logging_writer(options, "config")
     
    14911494    meter.update("Checking build ...")
    14921495    if not port_obj.check_build(test_runner.needs_http()):
    1493         sys.exit(1)
     1496        return -1
    14941497
    14951498    meter.update("Starting helper ...")
     
    15001503        meter.update("Checking system dependencies ...")
    15011504        if not port_obj.check_sys_deps(test_runner.needs_http()):
    1502             sys.exit(1)
     1505            return -1
    15031506
    15041507    meter.update("Preparing tests ...")
     
    15141517            test_runner.add_test_type(fuzzy_image_diff.FuzzyImageDiff)
    15151518
    1516     has_new_failures = test_runner.run(result_summary)
     1519    num_unexpected_results = test_runner.run(result_summary)
    15171520
    15181521    port_obj.stop_helper()
    15191522
    1520     _log.debug("Exit status: %d" % has_new_failures)
    1521     sys.exit(has_new_failures)
     1523    _log.debug("Exit status: %d" % num_unexpected_results)
     1524    return num_unexpected_results
    15221525
    15231526
     
    16211624if '__main__' == __name__:
    16221625    options, args = parse_args()
    1623     main(options, args)
     1626    sys.exit(main(options, args))
Note: See TracChangeset for help on using the changeset viewer.