Changeset 249582 in webkit


Ignore:
Timestamp:
Sep 6, 2019 11:10:49 AM (5 years ago)
Author:
Matt Lewis
Message:

run-webkit-test: Allow results to be uploaded without scm checkout
https://bugs.webkit.org/show_bug.cgi?id=200787

Reviewed by Jonathan Bedard.

  • Scripts/webkitpy/common/checkout/scm/detection.py:

(SCMDetector.detect_scm_system): Added in detection of stub repository.

  • Scripts/webkitpy/common/checkout/scm/stub_repository.py: Added.

(StubRepository):
(StubRepository.init):
(StubRepository._find_parent_path_matching_callback_condition): Checks up the path given to
find the directory containing the checkout_information.json of the stub repository.
(StubRepository.in_working_directory): Required functions to be implemented.
(StubRepository.svn_revision): Required functions to be implemented.
(StubRepository.native_revision): Required functions to be implemented.
(StubRepository.native_branch): Required functions to be implemented.
(StubRepository._decode_json): Decodes checkout_information.json.
(StubRepository.find_checkout_root): Required functions to be implemented.

  • Scripts/webkitpy/common/checkout/scm/stub_repository_unittest.py: Added.

(StubRepositoryTest): Unit test for stub_repository SCM.
(StubRepositoryTest.mock_host_for_stub_repository):
(StubRepositoryTest.test_in_working_directory):
(StubRepositoryTest.test_native_revision):
(StubRepositoryTest.test_native_branch):
(StubRepositoryTest.test_svn_revision):
(StubRepositoryTest.test_find_checkout_root):

  • Scripts/webkitpy/layout_tests/layout_package/json_results_generator.py:

(JSONResultsGenerator._get_svn_revision): Removed unnecessary scm initialization.

  • Scripts/webkitpy/port/base.py:

(Port.commits_for_upload): Removed unnecessary scm initialization.

Location:
trunk/Tools
Files:
2 added
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/Tools/ChangeLog

    r249575 r249582  
     12019-09-06  Matt Lewis  <jlewis3@apple.com>
     2
     3        run-webkit-test: Allow results to be uploaded without scm checkout
     4        https://bugs.webkit.org/show_bug.cgi?id=200787
     5
     6        Reviewed by Jonathan Bedard.
     7
     8        * Scripts/webkitpy/common/checkout/scm/detection.py:
     9        (SCMDetector.detect_scm_system): Added in detection of stub repository.
     10        * Scripts/webkitpy/common/checkout/scm/stub_repository.py: Added.
     11        (StubRepository):
     12        (StubRepository.__init__):
     13        (StubRepository._find_parent_path_matching_callback_condition): Checks up the path given to
     14        find the directory containing the checkout_information.json of the stub repository.
     15        (StubRepository.in_working_directory): Required functions to be implemented.
     16        (StubRepository.svn_revision): Required functions to be implemented.
     17        (StubRepository.native_revision): Required functions to be implemented.
     18        (StubRepository.native_branch): Required functions to be implemented.
     19        (StubRepository._decode_json): Decodes checkout_information.json.
     20        (StubRepository.find_checkout_root): Required functions to be implemented.
     21        * Scripts/webkitpy/common/checkout/scm/stub_repository_unittest.py: Added.
     22        (StubRepositoryTest): Unit test for stub_repository SCM.
     23        (StubRepositoryTest.mock_host_for_stub_repository):
     24        (StubRepositoryTest.test_in_working_directory):
     25        (StubRepositoryTest.test_native_revision):
     26        (StubRepositoryTest.test_native_branch):
     27        (StubRepositoryTest.test_svn_revision):
     28        (StubRepositoryTest.test_find_checkout_root):
     29        * Scripts/webkitpy/layout_tests/layout_package/json_results_generator.py:
     30        (JSONResultsGenerator._get_svn_revision): Removed unnecessary scm initialization.
     31        * Scripts/webkitpy/port/base.py:
     32        (Port.commits_for_upload): Removed unnecessary scm initialization.
     33
    1342019-09-06  Alex Christensen  <achristensen@webkit.org>
    235
  • trunk/Tools/Scripts/webkitpy/common/checkout/scm/detection.py

    r186870 r249582  
    3535from .svn import SVN
    3636from .git import Git
     37from .stub_repository import StubRepository
    3738
    3839_log = logging.getLogger(__name__)
     
    7576            return Git(cwd=real_path, patch_directories=patch_directories, filesystem=self._filesystem, executive=self._executive)
    7677
     78        if StubRepository.in_working_directory(real_path, filesystem=self._filesystem):
     79            return StubRepository(cwd=real_path, patch_directories=patch_directories, filesystem=self._filesystem, executive=self._executive)
     80
    7781        return None
    7882
  • trunk/Tools/Scripts/webkitpy/layout_tests/layout_package/json_results_generator.py

    r239739 r249582  
    445445        """
    446446
    447         # FIXME: We initialize this here in order to engage the stupid windows hacks :).
    448         # We can't reuse an existing scm object because the specific directories may
    449         # be part of other checkouts.
    450         self._port.host.initialize_scm()
    451447        scm = SCMDetector(self._filesystem, self._executive).detect_scm_system(in_directory)
    452448        if scm:
  • trunk/Tools/Scripts/webkitpy/port/base.py

    r249500 r249582  
    16041604        from webkitpy.results.upload import Upload
    16051605
    1606         self.host.initialize_scm()
    1607 
    16081606        repos = {}
    16091607        if port_config.apple_additions() and getattr(port_config.apple_additions(), 'repos', False):
Note: See TracChangeset for help on using the changeset viewer.