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

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

Issue 662393007: DevTools: Make compile_frontend.py check code from all applications (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Address comment Created 6 years, 2 months 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 | Annotate | Revision Log
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 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
81 def log_error(message): 81 def log_error(message):
82 print 'ERROR: ' + message 82 print 'ERROR: ' + message
83 83
84 84
85 def error_excepthook(exctype, value, traceback): 85 def error_excepthook(exctype, value, traceback):
86 print 'ERROR:' 86 print 'ERROR:'
87 sys.__excepthook__(exctype, value, traceback) 87 sys.__excepthook__(exctype, value, traceback)
88 sys.excepthook = error_excepthook 88 sys.excepthook = error_excepthook
89 89
90 90
91 application_descriptors = ['devtools.json', 'toolbox.json']
91 loader = modular_build.DescriptorLoader(devtools_frontend_path) 92 loader = modular_build.DescriptorLoader(devtools_frontend_path)
92 descriptors = loader.load_application('devtools.json') 93 descriptors = loader.load_applications(application_descriptors)
93 modules_by_name = descriptors.modules 94 modules_by_name = descriptors.modules
94 95
95 96
96 def run_in_shell(command_line): 97 def run_in_shell(command_line):
97 return subprocess.Popen(command_line, stdout=subprocess.PIPE, stderr=subproc ess.STDOUT, shell=True) 98 return subprocess.Popen(command_line, stdout=subprocess.PIPE, stderr=subproc ess.STDOUT, shell=True)
98 99
99 100
100 def hasErrors(output): 101 def hasErrors(output):
101 return re.search(error_warning_regex, output) != None 102 return re.search(error_warning_regex, output) != None
102 103
(...skipping 287 matching lines...) Expand 10 before | Expand all | Expand 10 after
390 391
391 if errors_found: 392 if errors_found:
392 print 'ERRORS DETECTED' 393 print 'ERRORS DETECTED'
393 394
394 os.remove(injectedScriptSourceTmpFile) 395 os.remove(injectedScriptSourceTmpFile)
395 os.remove(injectedScriptCanvasModuleSourceTmpFile) 396 os.remove(injectedScriptCanvasModuleSourceTmpFile)
396 os.remove(compiler_args_file.name) 397 os.remove(compiler_args_file.name)
397 os.remove(injected_script_externs_file.name) 398 os.remove(injected_script_externs_file.name)
398 os.remove(protocol_externs_file) 399 os.remove(protocol_externs_file)
399 shutil.rmtree(modules_dir, True) 400 shutil.rmtree(modules_dir, True)
OLDNEW
« no previous file with comments | « Source/devtools/front_end/Runtime.js ('k') | Source/devtools/scripts/concatenate_application_code.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698