Changeset 254383 in webkit
- Timestamp:
- Jan 10, 2020 5:06:40 PM (4 years ago)
- Location:
- trunk
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebKit/ChangeLog
r254381 r254383 1 2020-01-10 Jonathan Bedard <jbedard@apple.com> 2 3 Python3: Support Source/WebKit/Scripts/webkit 4 https://bugs.webkit.org/show_bug.cgi?id=206078 5 6 Reviewed by Stephanie Lewis. 7 8 Covered by existing unit tests. 9 10 * Scripts/webkit/LegacyMessages-expected.h: Sort forward declarations. 11 * Scripts/webkit/Messages-expected.h: Ditto. 12 * Scripts/webkit/messages.py: Sort printed outputs. 13 1 14 2020-01-10 Brent Fulgham <bfulgham@apple.com> 2 15 -
trunk/Source/WebKit/Scripts/webkit/LegacyMessages-expected.h
r251445 r254383 42 42 43 43 namespace IPC { 44 class DummyType; 44 45 class MachPort; 45 class DummyType;46 46 } 47 47 48 48 namespace WebKit { 49 class WebPreferencesStore; 49 50 class WebTouchEvent; 50 class WebPreferencesStore;51 51 } 52 52 -
trunk/Source/WebKit/Scripts/webkit/Messages-expected.h
r251445 r254383 42 42 43 43 namespace IPC { 44 class DummyType; 44 45 class MachPort; 45 class DummyType;46 46 } 47 47 48 48 namespace WebKit { 49 class WebPreferencesStore; 49 50 class WebTouchEvent; 50 class WebPreferencesStore;51 51 } 52 52 -
trunk/Source/WebKit/Scripts/webkit/messages.py
r254194 r254383 196 196 result = [] 197 197 result.append('namespace %s {\n' % namespace) 198 result += ['%s;\n' % forward_declaration(namespace, x) for x in kind_and_types]198 result += ['%s;\n' % forward_declaration(namespace, x) for x in sorted(kind_and_types)] 199 199 result.append('}\n') 200 200 return ''.join(result) … … 291 291 conditions = conditions_for_header(header) 292 292 if conditions and not None in conditions: 293 header_include = '#if %s\n' % ' || '.join(s et(conditions))293 header_include = '#if %s\n' % ' || '.join(sorted(set(conditions))) 294 294 header_include += '#include %s\n' % header 295 295 header_include += '#endif\n' … … 348 348 conditions = conditions_for_header(header) 349 349 if conditions and not None in conditions: 350 header_include = '#if %s\n' % ' || '.join(s et(conditions))350 header_include = '#if %s\n' % ' || '.join(sorted(set(conditions))) 351 351 header_include += '#include %s\n' % header 352 352 header_include += '#endif\n' … … 703 703 for header in sorted(header_conditions): 704 704 if header_conditions[header] and not None in header_conditions[header]: 705 result.append('#if %s\n' % ' || '.join(s et(header_conditions[header])))705 result.append('#if %s\n' % ' || '.join(sorted(set(header_conditions[header])))) 706 706 result += ['#include %s\n' % header] 707 707 result.append('#endif\n') -
trunk/Tools/ChangeLog
r254382 r254383 1 2020-01-10 Jonathan Bedard <jbedard@apple.com> 2 3 Python3: Support Source/WebKit/Scripts/webkit 4 https://bugs.webkit.org/show_bug.cgi?id=206078 5 6 Reviewed by Stephanie Lewis. 7 8 * Scripts/test-webkitpy-python3: Call test-webkitpy with Python 3 since 9 everything is now compatible. 10 1 11 2020-01-10 Jonathan Bedard <jbedard@apple.com> 2 12 -
trunk/Tools/Scripts/test-webkitpy-python3
r254340 r254383 22 22 # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 23 23 24 from webkitpy.common import multiprocessing_bootstrap 24 25 25 import sys 26 sys.dont_write_bytecode = True 27 28 import argparse 29 import os 30 import sys 31 import unittest 32 33 from webkitpy.common.checkout.scm.scm_unittest import SCMTest 34 35 36 PYTHON3_COMPATIBLE_DIRECTORIES = [ 37 'webkitpy.benchmark_runner', 38 'webkitpy.browserperfdash', 39 'webkitpy.common', 40 'webkitpy.layout_tests', 41 'webkitpy.performance_tests', 42 'webkitpy.port', 43 'webkitpy.results', 44 'webkitpy.style', 45 'webkitpy.test', 46 'webkitpy.tool', 47 'webkitpy.w3c', 48 'webkitpy.xcode', 49 ] 50 SLOW_TESTS = [ 51 SCMTest, 52 ] 53 54 def is_slow(candidate): 55 if isinstance(candidate, unittest.suite.TestSuite): 56 return any(is_slow(test) for test in candidate) 57 for test in SLOW_TESTS: 58 if isinstance(candidate, test): 59 return True 60 return False 61 62 63 def main(): 64 parser = argparse.ArgumentParser(description='Run unit tests with Python3. This is intended as a temporary script during the Python2/3 transition') 65 parser.add_argument( 66 '-v', '--verbose', 67 default=False, action='store_true', 68 help='Verbose output', 69 ) 70 parser.add_argument( 71 '-f', '--stop-on-fail', 72 default=False, action='store_true', 73 help='Stop on first fail or error', 74 ) 75 parser.add_argument( 76 '-a', '--all', 77 default=False, action='store_true', 78 help='Enables SCM tests, which are slow and so disable by default', 79 ) 80 81 if len(PYTHON3_COMPATIBLE_DIRECTORIES) == 1: 82 compatible_directories_readable = PYTHON3_COMPATIBLE_DIRECTORIES[0] 83 else: 84 compatible_directories_readable = '{} and {}'.format( 85 ', '.join(PYTHON3_COMPATIBLE_DIRECTORIES[:-1]), 86 PYTHON3_COMPATIBLE_DIRECTORIES[-1], 87 ) 88 parser.add_argument( 89 'modules_to_test', nargs='*', 90 help='Modules to be tested. By default, this is {}'.format(compatible_directories_readable), 91 default=PYTHON3_COMPATIBLE_DIRECTORIES, 92 ) 93 options = parser.parse_args() 94 95 root = os.path.dirname(os.path.abspath(__file__)) 96 97 suite = unittest.TestSuite() 98 for module_name in options.modules_to_test: 99 module_suite = unittest.defaultTestLoader.discover(os.path.join(root, module_name.replace('.', '/')), pattern='*test.py', top_level_dir=root) 100 for test in (module_suite or []): 101 if options.all or not is_slow(test): 102 suite.addTest(test) 103 104 if suite.countTestCases() == 0: 105 raise RuntimeError('No matching tests found.') 106 107 from webkitpy.thirdparty import autoinstall_everything 108 autoinstall_everything() 109 110 result = unittest.TextTestRunner(verbosity=int(options.verbose) + 1, failfast=options.stop_on_fail, buffer=not options.verbose).run(suite) 111 return len(result.errors) 112 113 if __name__ == '__main__': 114 sys.exit(main()) 26 multiprocessing_bootstrap.run('webkitpy', 'test', 'main.py')
Note: See TracChangeset
for help on using the changeset viewer.