Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(797)

Side by Side Diff: third_party/WebKit/Source/devtools/scripts/compile_frontend.py

Issue 2513423003: DevTools: Convert inspector-unit tests to use reusable test harness (Closed)
Patch Set: Moved type definition out of externs Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 #!/usr/bin/env python 1 #!/usr/bin/env python
2 # Copyright (c) 2012 Google Inc. All rights reserved. 2 # Copyright (c) 2012 Google Inc. All rights reserved.
3 # 3 #
4 # Redistribution and use in source and binary forms, with or without 4 # Redistribution and use in source and binary forms, with or without
5 # modification, are permitted provided that the following conditions are 5 # modification, are permitted provided that the following conditions are
6 # met: 6 # met:
7 # 7 #
8 # * Redistributions of source code must retain the above copyright 8 # * Redistributions of source code must retain the above copyright
9 # notice, this list of conditions and the following disclaimer. 9 # notice, this list of conditions and the following disclaimer.
10 # * Redistributions in binary form must reproduce the above 10 # * Redistributions in binary form must reproduce the above
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
116 116
117 117
118 def log_error(message): 118 def log_error(message):
119 print 'ERROR: ' + message 119 print 'ERROR: ' + message
120 120
121 def error_excepthook(exctype, value, traceback): 121 def error_excepthook(exctype, value, traceback):
122 print 'ERROR:' 122 print 'ERROR:'
123 sys.__excepthook__(exctype, value, traceback) 123 sys.__excepthook__(exctype, value, traceback)
124 sys.excepthook = error_excepthook 124 sys.excepthook = error_excepthook
125 125
126 application_descriptors = ['inspector.json', 'toolbox.json', 'formatter_worker.j son', 'heap_snapshot_worker.json', 'utility_shared_worker.json'] 126 application_descriptors = [
127 'inspector.json',
128 'toolbox.json',
129 'unit_test_runner.json',
130 'formatter_worker.json',
131 'heap_snapshot_worker.json',
132 'utility_shared_worker.json',
133 ]
127 loader = modular_build.DescriptorLoader(devtools_frontend_path) 134 loader = modular_build.DescriptorLoader(devtools_frontend_path)
128 descriptors = loader.load_applications(application_descriptors) 135 descriptors = loader.load_applications(application_descriptors)
129 modules_by_name = descriptors.modules 136 modules_by_name = descriptors.modules
130 137
131 138
132 def has_errors(output): 139 def has_errors(output):
133 return re.search(error_warning_regex, output) != None 140 return re.search(error_warning_regex, output) != None
134 141
135 142
136 def verify_jsdoc_extra(): 143 def verify_jsdoc_extra():
(...skipping 322 matching lines...) Expand 10 before | Expand all | Expand 10 after
459 print 'devtools_compatibility.js compilation output:%s' % os.linesep, devtools_j s_compile_out 466 print 'devtools_compatibility.js compilation output:%s' % os.linesep, devtools_j s_compile_out
460 errors_found |= has_errors(devtools_js_compile_out) 467 errors_found |= has_errors(devtools_js_compile_out)
461 468
462 os.remove(compiler_args_file.name) 469 os.remove(compiler_args_file.name)
463 os.remove(protocol_externs_file) 470 os.remove(protocol_externs_file)
464 shutil.rmtree(modules_dir, True) 471 shutil.rmtree(modules_dir, True)
465 472
466 if errors_found: 473 if errors_found:
467 print 'ERRORS DETECTED' 474 print 'ERRORS DETECTED'
468 sys.exit(1) 475 sys.exit(1)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698