| OLD | NEW |
| 1 # Copyright (c) 2012 Google Inc. All rights reserved. | 1 # Copyright (c) 2012 Google Inc. All rights reserved. |
| 2 # | 2 # |
| 3 # Redistribution and use in source and binary forms, with or without | 3 # Redistribution and use in source and binary forms, with or without |
| 4 # modification, are permitted provided that the following conditions are | 4 # modification, are permitted provided that the following conditions are |
| 5 # met: | 5 # met: |
| 6 # | 6 # |
| 7 # * Redistributions of source code must retain the above copyright | 7 # * Redistributions of source code must retain the above copyright |
| 8 # notice, this list of conditions and the following disclaimer. | 8 # notice, this list of conditions and the following disclaimer. |
| 9 # * Redistributions in binary form must reproduce the above | 9 # * Redistributions in binary form must reproduce the above |
| 10 # copyright notice, this list of conditions and the following disclaimer | 10 # copyright notice, this list of conditions and the following disclaimer |
| (...skipping 26 matching lines...) Expand all Loading... |
| 37 """ | 37 """ |
| 38 | 38 |
| 39 import base64 | 39 import base64 |
| 40 import logging | 40 import logging |
| 41 import optparse | 41 import optparse |
| 42 import os | 42 import os |
| 43 import sys | 43 import sys |
| 44 import types | 44 import types |
| 45 | 45 |
| 46 # Since we execute this script directly as part of the unit tests, we need to en
sure | 46 # Since we execute this script directly as part of the unit tests, we need to en
sure |
| 47 # that Tools/Scripts is in sys.path for the next imports to work correctly. | 47 # that tools is in sys.path for the next imports to work correctly. |
| 48 script_dir = os.path.dirname(os.path.dirname(os.path.dirname(os.path.dirname(os.
path.abspath(__file__))))) | 48 script_dir = os.path.dirname(os.path.dirname(os.path.dirname(os.path.dirname(os.
path.abspath(__file__))))) |
| 49 if script_dir not in sys.path: | 49 if script_dir not in sys.path: |
| 50 sys.path.append(script_dir) | 50 sys.path.append(script_dir) |
| 51 | 51 |
| 52 from webkitpy.common import read_checksum_from_png | 52 from webkitpy.common import read_checksum_from_png |
| 53 from webkitpy.common.system.systemhost import SystemHost | 53 from webkitpy.common.system.systemhost import SystemHost |
| 54 from webkitpy.layout_tests.port.driver import DriverInput, DriverOutput | 54 from webkitpy.layout_tests.port.driver import DriverInput, DriverOutput |
| 55 from webkitpy.layout_tests.port.factory import PortFactory | 55 from webkitpy.layout_tests.port.factory import PortFactory |
| 56 | 56 |
| 57 _log = logging.getLogger(__name__) | 57 _log = logging.getLogger(__name__) |
| (...skipping 219 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 277 self._stdout.write('#EOF\n') | 277 self._stdout.write('#EOF\n') |
| 278 self._stdout.flush() | 278 self._stdout.flush() |
| 279 self._stderr.write('#EOF\n') | 279 self._stderr.write('#EOF\n') |
| 280 self._stderr.flush() | 280 self._stderr.flush() |
| 281 | 281 |
| 282 | 282 |
| 283 if __name__ == '__main__': | 283 if __name__ == '__main__': |
| 284 # Note that the Mock in MockDRT refers to the fact that it is emulating a | 284 # Note that the Mock in MockDRT refers to the fact that it is emulating a |
| 285 # real DRT, and as such, it needs access to a real SystemHost, not a MockSys
temHost. | 285 # real DRT, and as such, it needs access to a real SystemHost, not a MockSys
temHost. |
| 286 sys.exit(main(sys.argv[1:], SystemHost(), sys.stdin, sys.stdout, sys.stderr)
) | 286 sys.exit(main(sys.argv[1:], SystemHost(), sys.stdin, sys.stdout, sys.stderr)
) |
| OLD | NEW |