Changeset 244701 in webkit


Ignore:
Timestamp:
Apr 26, 2019 11:25:28 AM (5 years ago)
Author:
Jonathan Bedard
Message:

webkitpy: Running a single test will always use the default device
https://bugs.webkit.org/show_bug.cgi?id=195472
<rdar://problem/48724825>

Reviewed by Lucas Forschler.

It makes more sense to have the Manager class handle the case where a user specifically requests a test which is
skipped on the current configuration. This changes the behavior when running part of a test shard, now tests explicitly
requested will be run regardless of what shard they are in.

  • Scripts/webkitpy/layout_tests/controllers/layout_test_finder.py:

(LayoutTestFinder.skip_tests): Caller should manage running skipped tests which were explicitly requested.

  • Scripts/webkitpy/layout_tests/controllers/manager.py:

(Manager.run): If a test is marked as skipped for the configuration, but was specifically requested, run it anyways
on the default device type.

  • Scripts/webkitpy/layout_tests/run_webkit_tests_integrationtest.py:

(RunTest.test_run_chunk): Explicitly requesting a test will override sharing behavior.
(RunTest.test_run_part): Ditto.

Location:
trunk/Tools
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/Tools/ChangeLog

    r244695 r244701  
     12019-04-26  Jonathan Bedard  <jbedard@apple.com>
     2
     3        webkitpy: Running a single test will always use the default device
     4        https://bugs.webkit.org/show_bug.cgi?id=195472
     5        <rdar://problem/48724825>
     6
     7        Reviewed by Lucas Forschler.
     8
     9        It makes more sense to have the Manager class handle the case where a user specifically requests a test which is
     10        skipped on the current configuration. This changes the behavior when running part of a test shard, now tests explicitly
     11        requested will be run regardless of what shard they are in.
     12
     13        * Scripts/webkitpy/layout_tests/controllers/layout_test_finder.py:
     14        (LayoutTestFinder.skip_tests): Caller should manage running skipped tests which were explicitly requested.
     15        * Scripts/webkitpy/layout_tests/controllers/manager.py:
     16        (Manager.run): If a test is marked as skipped for the configuration, but was specifically requested, run it anyways
     17        on the default device type.
     18        * Scripts/webkitpy/layout_tests/run_webkit_tests_integrationtest.py:
     19        (RunTest.test_run_chunk): Explicitly requesting a test will override sharing behavior.
     20        (RunTest.test_run_part): Ditto.
     21
    1222019-04-26  Alex Christensen  <achristensen@webkit.org>
    223
  • trunk/Tools/Scripts/webkitpy/layout_tests/controllers/layout_test_finder.py

    r240150 r244701  
    131131        elif self._options.skipped == 'ignore':
    132132            tests_to_skip = set()
    133         elif self._options.skipped != 'always':
    134             # make sure we're explicitly running any tests passed on the command line; equivalent to 'default'.
    135             tests_to_skip -= set(paths)
    136133
    137134        # unless of course we don't want to run the HTTP tests :)
  • trunk/Tools/Scripts/webkitpy/layout_tests/controllers/manager.py

    r243936 r244701  
    206206            aggregate_tests.update(tests_to_run)
    207207
     208        # If a test is marked skipped, but was explicitly requested, run it anyways
     209        if self._options.skipped != 'always':
     210            for arg in args:
     211                if arg in total_tests and arg not in aggregate_tests:
     212                    tests_to_run_by_device[device_type_list[0]].append(arg)
     213                    aggregate_tests.add(arg)
     214
    208215        tests_to_skip = total_tests - aggregate_tests
    209216        self._printer.print_found(len(aggregate_test_names), len(aggregate_tests), self._options.repeat_each, self._options.iterations)
  • trunk/Tools/Scripts/webkitpy/layout_tests/run_webkit_tests_integrationtest.py

    r240163 r244701  
    386386        # Test that we wrap around if the number of tests is not evenly divisible by the chunk size
    387387        tests_to_run = ['passes/error.html', 'passes/image.html', 'passes/platform_image.html', 'passes/text.html']
    388         chunk_tests_run = get_tests_run(['--run-chunk', '1:3'] + tests_to_run)
     388        chunk_tests_run = get_tests_run(['--run-chunk', '1:3', '--skipped', 'always'] + tests_to_run)
    389389        self.assertEqual(['passes/text.html', 'passes/error.html', 'passes/image.html'], chunk_tests_run)
    390390
     
    398398        # Test that we actually select the right part
    399399        tests_to_run = ['passes/error.html', 'passes/image.html', 'passes/platform_image.html', 'passes/text.html']
    400         tests_run = get_tests_run(['--run-part', '1:2'] + tests_to_run)
     400        tests_run = get_tests_run(['--run-part', '1:2', '--skipped', 'always'] + tests_to_run)
    401401        self.assertEqual(['passes/error.html', 'passes/image.html'], tests_run)
    402402
     
    404404        # (here we end up with 3 parts, each with 2 tests, and we only have 4 tests total, so the
    405405        # last part repeats the first two tests).
    406         chunk_tests_run = get_tests_run(['--run-part', '3:3'] + tests_to_run)
     406        chunk_tests_run = get_tests_run(['--run-part', '3:3', '--skipped', 'always'] + tests_to_run)
    407407        self.assertEqual(['passes/error.html', 'passes/image.html'], chunk_tests_run)
    408408
Note: See TracChangeset for help on using the changeset viewer.