Changeset 112406 in webkit


Ignore:
Timestamp:
Mar 28, 2012 8:53:47 AM (12 years ago)
Author:
Carlos Garcia Campos
Message:

[GTK] Add --skipped command line option to Tools/Scripts/run-gtk-tests
https://bugs.webkit.org/show_bug.cgi?id=82341

Reviewed by Martin Robinson.

Add --skipped=skip|ignore|only command line option.

  • Scripts/run-gtk-tests:

(TestRunner._test_cases_to_skip): Return the list of test cases
to skip for the given test depending on the skipped action.
(TestRunner._should_run_test): Decide whether to run the test or
not depending on the skipped action.
(TestRunner.run_tests): Only show the list of skipped tests when
skipped action is 'skip'.

Location:
trunk/Tools
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Tools/ChangeLog

    r112404 r112406  
     12012-03-28  Carlos Garcia Campos  <cgarcia@igalia.com>
     2
     3        [GTK] Add --skipped command line option to Tools/Scripts/run-gtk-tests
     4        https://bugs.webkit.org/show_bug.cgi?id=82341
     5
     6        Reviewed by Martin Robinson.
     7
     8        Add --skipped=skip|ignore|only command line option.
     9
     10        * Scripts/run-gtk-tests:
     11        (TestRunner._test_cases_to_skip): Return the list of test cases
     12        to skip for the given test depending on the skipped action.
     13        (TestRunner._should_run_test): Decide whether to run the test or
     14        not depending on the skipped action.
     15        (TestRunner.run_tests): Only show the list of skipped tests when
     16        skipped action is 'skip'.
     17
    1182012-03-28  Carlos Garcia Campos  <cgarcia@igalia.com>
    219
  • trunk/Tools/Scripts/run-gtk-tests

    r112404 r112406  
    206206
    207207    def _test_cases_to_skip(self, test):
     208        if self._options.skipped_action != 'skip':
     209            return []
     210
    208211        skipped = self._find_skipped_test(test)
    209212        if skipped is not None:
     
    212215
    213216    def _should_run_test(self, test):
     217        # Skipped test are ignored, run all tests.
     218        if self._options.skipped_action == 'ignore':
     219            return True
     220
    214221        skipped = self._find_skipped_test(test)
    215         return skipped is None or skipped.test_cases
     222        # By default skipped test are skipped, run them only when there are specific test cases failing.
     223        if self._options.skipped_action == 'skip':
     224            return skipped is None or skipped.test_cases
     225
     226        # Run only skipped tests.
     227        return skipped is not None
    216228
    217229    def _run_test(self, test):
     
    258270            sys.stdout.flush()
    259271
    260         if self._skipped_tests:
     272        if self._skipped_tests and self._options.skipped_action == 'skip':
    261273            sys.stdout.write("Tests skipped:\n%s\n" % "\n".join([str(skipped) for skipped in self._skipped_tests]))
    262274            sys.stdout.flush()
     
    277289    option_parser.add_option('--display', action='store', dest='display', default=':55',
    278290                             help='Display to run Xvfb')
     291    option_parser.add_option('--skipped', action='store', dest='skipped_action',
     292                             choices=['skip', 'ignore', 'only'], default='skip',
     293                             metavar='skip|ignore|only',
     294                             help='Specifies how to treat the skipped tests')
    279295    options, args = option_parser.parse_args()
    280296
Note: See TracChangeset for help on using the changeset viewer.