Changeset 170062 in webkit


Ignore:
Timestamp:
Jun 17, 2014, 11:02:08 AM (11 years ago)
Author:
commit-queue@webkit.org
Message:

Update import-w3c-tests to reflect current W3C test repo directory structure
https://bugs.webkit.org/show_bug.cgi?id=133460

Patch by Rebecca Hauck <rhauck@adobe.com> on 2014-06-17
Reviewed by Bem Jones-Bey.

Removed all references to test status, which are no longer reflected in the
directory names in the W3C CSS test repo. No tests are required for this
change, the existing tests pass.

  • Scripts/webkitpy/w3c/test_importer.py:

(main):
(TestImporter.init):
(TestImporter.find_importable_tests):
(TestImporter.setup_destination_directory):
(TestImporter.write_import_log):
(TestImporter.update_test_status): Deleted.

Location:
trunk/Tools
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Tools/ChangeLog

    r170058 r170062  
     12014-06-17  Rebecca Hauck  <rhauck@adobe.com>
     2
     3        Update import-w3c-tests to reflect current W3C test repo directory structure
     4        https://bugs.webkit.org/show_bug.cgi?id=133460
     5
     6        Reviewed by Bem Jones-Bey.
     7
     8        Removed all references to test status, which are no longer reflected in the
     9        directory names in the W3C CSS test repo.  No tests are required for this
     10        change, the existing tests pass.
     11
     12        * Scripts/webkitpy/w3c/test_importer.py:
     13        (main):
     14        (TestImporter.__init__):
     15        (TestImporter.find_importable_tests):
     16        (TestImporter.setup_destination_directory):
     17        (TestImporter.write_import_log):
     18        (TestImporter.update_test_status): Deleted.
     19
    1202014-06-17  Carlos Alberto Lopez Perez  <clopez@igalia.com>
    221
  • trunk/Tools/Scripts/webkitpy/w3c/test_importer.py

    r169369 r170062  
    3535 This script will import the tests into WebKit following these rules:
    3636
    37     - Only tests that are approved or officially submitted awaiting review are imported
    38 
    39     - All tests are imported into LayoutTests/csswg
    40 
    41     - If the tests are approved, they'll be imported into a directory tree that
    42       mirrors the CSS Mercurial repo. For example, <csswg_repo_root>/approved/css2.1 is brought in
    43       as LayoutTests/csswg/approved/css2.1, maintaining the entire directory structure under that
    44 
    45     - If the tests are submitted, they'll maintain their directory structure under
    46       LayoutTests/csswg. For example, everything under
    47       <csswg_repo_root>/contributors/adobe/submitted is brought into
    48       LayoutTests/csswg/contributors/adobe/submitted, mirroring its directory structure in the
    49       csswg repo
    50 
    51     - If the import directory specified is just a contributor folder, only the submitted folder
    52       for that contributor is brought in. For example, to import all of Mozilla's tests, either
    53       <csswg_repo_root>/contributors/mozilla or <csswg_repo_root>/contributors/mozilla/submitted
    54       will work and are equivalent.
     37    - All tests are imported into LayoutTests/w3c
     38
     39    - Tests will be imported into a directory tree that
     40      mirrors the CSS Mercurial repo. For example, <csswg_repo_root>/css2.1 is brought in
     41      as LayoutTests/csswg/css2.1, maintaining the entire directory structure under that
    5542
    5643    - By default, only reftests and jstest are imported. This can be overridden with a -a or --all
     
    9986from webkitpy.w3c.test_converter import convert_for_webkit
    10087
    101 
    102 TEST_STATUS_UNKNOWN = 'unknown'
    103 TEST_STATUS_APPROVED = 'approved'
    104 TEST_STATUS_SUBMITTED = 'submitted'
    105 VALID_TEST_STATUSES = [TEST_STATUS_APPROVED, TEST_STATUS_SUBMITTED]
    106 
    107 CONTRIBUTOR_DIR_NAME = 'contributors'
    108 
    10988CHANGESET_NOT_AVAILABLE = 'Not Available'
    110 
    11189
    11290_log = logging.getLogger(__name__)
     
    11795    import_dir = args[0]
    11896    if len(args) == 1:
    119         repo_dir_parts = []
    120         for part in import_dir.split(os.path.sep):
    121             if part in VALID_TEST_STATUSES:
    122                 break
    123             else:
    124                 repo_dir_parts.append(part)
    125         repo_dir = os.path.sep.join(repo_dir_parts)
     97        repo_dir = import_dir
    12698    else:
    12799        repo_dir = args[1]
     
    188160
    189161        self.changeset = CHANGESET_NOT_AVAILABLE
    190         self.test_status = TEST_STATUS_UNKNOWN
    191162
    192163        self.import_list = []
     
    212183            jstests = 0
    213184
    214             # "archive" and "data" dirs are internal csswg things that live in every approved directory.
    215             # FIXME: skip 'incoming' tests for now, but we should rework the 'test_status' concept and
    216             # support reading them as well.
    217             DIRS_TO_SKIP = ('.git', '.hg', 'data', 'archive', 'incoming')
     185            DIRS_TO_SKIP = ('.git', '.hg', 'work-in-progress', 'tools', 'support')
    218186            for d in DIRS_TO_SKIP:
    219187                if d in dirs:
     
    385353
    386354    def setup_destination_directory(self):
    387         """ Creates a destination directory that mirrors that of the source approved or submitted directory """
    388 
    389         self.update_test_status()
    390 
    391         start = self.source_directory.find(self.test_status)
     355        """ Creates a destination directory that mirrors that of the source directory """
     356
    392357        new_subpath = self.source_directory[len(self.repo_dir):]
    393358
     
    398363
    399364        _log.info('Tests will be imported into: %s', destination_directory)
    400 
    401     def update_test_status(self):
    402         """ Sets the test status to either 'approved' or 'submitted' """
    403 
    404         status = TEST_STATUS_UNKNOWN
    405 
    406         directory_parts = self.source_directory.split(os.path.sep)
    407         for test_status in VALID_TEST_STATUSES:
    408             if test_status in directory_parts:
    409                 status = test_status
    410 
    411         self.test_status = status
    412365
    413366    def remove_deleted_files(self, import_directory, new_file_list):
     
    449402        import_log.write('Last Import: ' + now.strftime('%Y-%m-%d %H:%M') + '\n')
    450403        import_log.write('W3C Mercurial changeset: ' + self.changeset + '\n')
    451         import_log.write('Test status at time of import: ' + self.test_status + '\n')
    452404        import_log.write('------------------------------------------------------------------------\n')
    453405        import_log.write('Properties requiring vendor prefixes:\n')
Note: See TracChangeset for help on using the changeset viewer.