OLD | NEW |
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 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
64 def to_platform_path_exact(filepath): | 64 def to_platform_path_exact(filepath): |
65 if not is_cygwin: | 65 if not is_cygwin: |
66 return filepath | 66 return filepath |
67 output, _ = popen(['cygpath', '-w', filepath]).communicate() | 67 output, _ = popen(['cygpath', '-w', filepath]).communicate() |
68 # pylint: disable=E1103 | 68 # pylint: disable=E1103 |
69 return output.strip().replace('\\', '\\\\') | 69 return output.strip().replace('\\', '\\\\') |
70 | 70 |
71 scripts_path = path.dirname(path.abspath(__file__)) | 71 scripts_path = path.dirname(path.abspath(__file__)) |
72 devtools_path = path.dirname(scripts_path) | 72 devtools_path = path.dirname(scripts_path) |
73 inspector_path = path.join(path.dirname(devtools_path), 'core', 'inspector') | 73 inspector_path = path.join(path.dirname(devtools_path), 'core', 'inspector') |
74 v8_inspector_path = path.join(path.dirname(devtools_path), 'platform', 'v8_inspe
ctor') | 74 # TODO(dgozman): move these checks to v8. |
| 75 v8_inspector_path = path.normpath(path.join(path.dirname(devtools_path), os.pard
ir, os.pardir, os.pardir, 'v8', 'src', 'inspector')) |
75 devtools_frontend_path = path.join(devtools_path, 'front_end') | 76 devtools_frontend_path = path.join(devtools_path, 'front_end') |
76 global_externs_file = to_platform_path(path.join(devtools_frontend_path, 'extern
s.js')) | 77 global_externs_file = to_platform_path(path.join(devtools_frontend_path, 'extern
s.js')) |
77 protocol_externs_file = path.join(devtools_frontend_path, 'protocol_externs.js') | 78 protocol_externs_file = path.join(devtools_frontend_path, 'protocol_externs.js') |
78 injected_script_source_name = path.join(v8_inspector_path, 'InjectedScriptSource
.js') | 79 injected_script_source_name = path.join(v8_inspector_path, 'InjectedScriptSource
.js') |
79 injected_script_externs_file = path.join(v8_inspector_path, 'injected_script_ext
erns.js') | 80 injected_script_externs_file = path.join(v8_inspector_path, 'injected_script_ext
erns.js') |
80 debugger_script_source_name = path.join(v8_inspector_path, 'DebuggerScript.js') | 81 debugger_script_source_name = path.join(v8_inspector_path, 'DebuggerScript.js') |
81 debugger_script_externs_file = path.join(v8_inspector_path, 'debugger_script_ext
erns.js') | 82 debugger_script_externs_file = path.join(v8_inspector_path, 'debugger_script_ext
erns.js') |
82 | 83 |
83 jsmodule_name_prefix = 'jsmodule_' | 84 jsmodule_name_prefix = 'jsmodule_' |
84 runtime_module_name = '_runtime' | 85 runtime_module_name = '_runtime' |
(...skipping 431 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
516 print 'Validate InjectedScriptSource.js output:%s' % os.linesep, (validateInject
edScriptOut if validateInjectedScriptOut else '<empty>') | 517 print 'Validate InjectedScriptSource.js output:%s' % os.linesep, (validateInject
edScriptOut if validateInjectedScriptOut else '<empty>') |
517 errors_found |= hasErrors(validateInjectedScriptOut) | 518 errors_found |= hasErrors(validateInjectedScriptOut) |
518 | 519 |
519 if errors_found: | 520 if errors_found: |
520 print 'ERRORS DETECTED' | 521 print 'ERRORS DETECTED' |
521 | 522 |
522 os.remove(injectedScriptSourceTmpFile) | 523 os.remove(injectedScriptSourceTmpFile) |
523 os.remove(compiler_args_file.name) | 524 os.remove(compiler_args_file.name) |
524 os.remove(protocol_externs_file) | 525 os.remove(protocol_externs_file) |
525 shutil.rmtree(modules_dir, True) | 526 shutil.rmtree(modules_dir, True) |
OLD | NEW |