Changeset 91028 in webkit


Ignore:
Timestamp:
Jul 14, 2011 2:21:24 PM (13 years ago)
Author:
commit-queue@webkit.org
Message:

NRWT doesn't store the svn revision in full_results.json on chromium-win
https://bugs.webkit.org/show_bug.cgi?id=64492

Unreviewed. Just fixing my test-webkitpy regression.

Fix the unit tests. Unfortunately scm does not use a filesystem
object so we can't control the result of detect_scm_system.
When detect_scm_system would fail, we would log, which would
cause all passing_run integration tests to fail.

  • Scripts/webkitpy/common/checkout/scm/scm.py:
  • Scripts/webkitpy/layout_tests/controllers/manager.py:
  • Scripts/webkitpy/layout_tests/port/base.py:
  • Scripts/webkitpy/layout_tests/port/test.py:
  • Scripts/webkitpy/layout_tests/run_webkit_tests_integrationtest.py:
Location:
trunk/Tools
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/Tools/ChangeLog

    r91023 r91028  
     12011-07-14  Eric Seidel  <eric@webkit.org>
     2
     3        NRWT doesn't store the svn revision in full_results.json on chromium-win
     4        https://bugs.webkit.org/show_bug.cgi?id=64492
     5
     6        Unreviewed.  Just fixing my test-webkitpy regression.
     7
     8        Fix the unit tests.  Unfortunately scm does not use a filesystem
     9        object so we can't control the result of detect_scm_system.
     10        When detect_scm_system would fail, we would log, which would
     11        cause all passing_run integration tests to fail.
     12
     13        * Scripts/webkitpy/common/checkout/scm/scm.py:
     14        * Scripts/webkitpy/layout_tests/controllers/manager.py:
     15        * Scripts/webkitpy/layout_tests/port/base.py:
     16        * Scripts/webkitpy/layout_tests/port/test.py:
     17        * Scripts/webkitpy/layout_tests/run_webkit_tests_integrationtest.py:
     18
    1192011-07-14  Eric Seidel  <eric@webkit.org>
    220
  • trunk/Tools/Scripts/webkitpy/common/checkout/scm/scm.py

    r90978 r91028  
    9494            return
    9595        if not force_clean:
    96             # FIXME: Shouldn't this use cwd=self.checkout_root?  (Git definitely would want that, unclear if SVN would.)
    97             print self.run(self.status_command(), error_handler=Executive.ignore_error)
     96            print self.run(self.status_command(), error_handler=Executive.ignore_error, cwd=self.checkout_root)
    9897            raise ScriptError(message="Working directory has modifications, pass --force-clean or --no-clean to continue.")
    9998        log("Cleaning working directory")
  • trunk/Tools/Scripts/webkitpy/layout_tests/controllers/manager.py

    r91023 r91028  
    210210    results['has_pretty_patch'] = port_obj.pretty_patch_available()
    211211    try:
    212         results['revision'] = port_object.webkit_scm().head_svn_revision()
     212        results['revision'] = port_obj.webkit_scm().head_svn_revision()
    213213    except Exception, e:
    214         _log.warn("Failed to determine svn revision for checkout (cwd: %s), leaving 'revision' key blank in full_results.json.\n%s" % (port_obj._filesystem.getcwd(), e))
     214        # FIXME: We would like to warn here, but that would cause all passing_run integration tests
     215        # to fail, since they assert that we have no logging output.
     216        # The revision lookup always fails when running the tests since it tries to read from
     217        # "/mock" using the real file system (since there is no way to mock out detect_scm_system at current).
     218        # Once we fix detect_scm_system to use the mock file system we can add this log back.
     219        #_log.warn("Failed to determine svn revision for checkout (cwd: %s, webkit_base: %s), leaving 'revision' key blank in full_results.json.\n%s" % (port_obj._filesystem.getcwd(), port_obj.path_from_webkit_base(), e))
    215220        # Handle cases where we're running outside of version control.
    216221        results['revision'] = ""
  • trunk/Tools/Scripts/webkitpy/layout_tests/port/base.py

    r91023 r91028  
    3838import os
    3939
     40from webkitpy.common.checkout.scm import detect_scm_system
    4041from webkitpy.common.memoized import memoized
    4142from webkitpy.common.net.testoutputset import AggregateTestOutputSet
     
    608609        # object in NRWT seems to keep an SCM around.  (Unlike webkit-patch where it's on the Tool/Host object.)
    609610        # FIXME: We should be able to get the SCM from somewhere else.
    610         return scm.detect_scm_system(self._config.webkit_base_dir())
     611        return detect_scm_system(self._config.webkit_base_dir())
    611612
    612613    def path_to_test_expectations_file(self):
  • trunk/Tools/Scripts/webkitpy/layout_tests/port/test.py

    r90520 r91028  
    242242    files[LAYOUT_TEST_DIR + 'userscripts/resources/iframe.html'] = 'iframe'
    243243
    244     fs = filesystem_mock.MockFileSystem(files)
     244    fs = filesystem_mock.MockFileSystem(files, dirs=set(['/mock']))  # Make sure at least the checkout_root exists as a directory.
    245245    fs._tests = test_list
    246246    return fs
  • trunk/Tools/Scripts/webkitpy/layout_tests/run_webkit_tests_integrationtest.py

    r90781 r91028  
    6868
    6969
    70 def parse_args(extra_args=None, record_results=False, tests_included=False,
    71                new_results=False, print_nothing=True):
     70def parse_args(extra_args=None, record_results=False, tests_included=False, new_results=False, print_nothing=True):
    7271    extra_args = extra_args or []
    7372    if print_nothing:
     
    9493
    9594
    96 def passing_run(extra_args=None, port_obj=None, record_results=False,
    97                 tests_included=False, filesystem=None):
    98     options, parsed_args = parse_args(extra_args, record_results,
    99                                       tests_included)
     95def passing_run(extra_args=None, port_obj=None, record_results=False, tests_included=False, filesystem=None):
     96    options, parsed_args = parse_args(extra_args, record_results, tests_included)
    10097    if not port_obj:
    101         port_obj = port.get(port_name=options.platform, options=options,
    102                             user=mocktool.MockUser(), filesystem=filesystem)
     98        port_obj = port.get(port_name=options.platform, options=options, user=mocktool.MockUser(), filesystem=filesystem)
    10399    buildbot_output = array_stream.ArrayStream()
    104100    regular_output = array_stream.ArrayStream()
    105     res = run_webkit_tests.run(port_obj, options, parsed_args, buildbot_output=buildbot_output,
    106                                regular_output=regular_output)
     101    res = run_webkit_tests.run(port_obj, options, parsed_args, buildbot_output=buildbot_output, regular_output=regular_output)
    107102    return res == 0 and regular_output.empty() and buildbot_output.empty()
    108103
     
    115110    user = mocktool.MockUser()
    116111    if not port_obj:
    117         port_obj = port.get(port_name=options.platform, options=options,
    118                             user=user, filesystem=filesystem)
    119 
    120     res, buildbot_output, regular_output = run_and_capture(port_obj, options,
    121                                                            parsed_args)
     112        port_obj = port.get(port_name=options.platform, options=options, user=user, filesystem=filesystem)
     113
     114    res, buildbot_output, regular_output = run_and_capture(port_obj, options, parsed_args)
    122115    return (res, buildbot_output, regular_output, user)
    123116
Note: See TracChangeset for help on using the changeset viewer.