| OLD | NEW |
| 1 # Copyright (C) 2010 Google Inc. All rights reserved. | 1 # Copyright (C) 2010 Google Inc. All rights reserved. |
| 2 # Copyright (C) 2009 Daniel Bates (dbates@intudata.com). All rights reserved. | 2 # Copyright (C) 2009 Daniel Bates (dbates@intudata.com). 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 14 matching lines...) Expand all Loading... |
| 25 # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | 25 # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
| 26 # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 26 # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
| 27 # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | 27 # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
| 28 # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 28 # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 29 | 29 |
| 30 import os | 30 import os |
| 31 import errno | 31 import errno |
| 32 import signal | 32 import signal |
| 33 import subprocess | 33 import subprocess |
| 34 import sys | 34 import sys |
| 35 import time | |
| 36 import unittest | 35 import unittest |
| 37 | 36 |
| 38 # Since we execute this script directly as part of the unit tests, we need to en
sure | 37 # Since we execute this script directly as part of the unit tests, we need to en
sure |
| 39 # that Tools/Scripts is in sys.path for the next imports to work correctly. | 38 # that Tools/Scripts is in sys.path for the next imports to work correctly. |
| 40 script_dir = os.path.dirname(os.path.dirname(os.path.dirname(os.path.dirname(os.
path.abspath(__file__))))) | 39 script_dir = os.path.dirname(os.path.dirname(os.path.dirname(os.path.dirname(os.
path.abspath(__file__))))) |
| 41 if script_dir not in sys.path: | 40 if script_dir not in sys.path: |
| 42 sys.path.append(script_dir) | 41 sys.path.append(script_dir) |
| 43 | 42 |
| 44 | 43 |
| 45 from webkitpy.common.system.executive import Executive, ScriptError | 44 from webkitpy.common.system.executive import Executive, ScriptError |
| (...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 200 import msvcrt | 199 import msvcrt |
| 201 msvcrt.setmode(stdout.fileno(), os.O_BINARY) | 200 msvcrt.setmode(stdout.fileno(), os.O_BINARY) |
| 202 if cmd == '--cat': | 201 if cmd == '--cat': |
| 203 stdout.write(stdin.read()) | 202 stdout.write(stdin.read()) |
| 204 elif cmd == '--echo': | 203 elif cmd == '--echo': |
| 205 stdout.write(' '.join(args)) | 204 stdout.write(' '.join(args)) |
| 206 return 0 | 205 return 0 |
| 207 | 206 |
| 208 if __name__ == '__main__' and len(sys.argv) > 1 and sys.argv[1] in ('--cat', '--
echo'): | 207 if __name__ == '__main__' and len(sys.argv) > 1 and sys.argv[1] in ('--cat', '--
echo'): |
| 209 sys.exit(main(sys.platform, sys.stdin, sys.stdout, sys.argv[1], sys.argv[2:]
)) | 208 sys.exit(main(sys.platform, sys.stdin, sys.stdout, sys.argv[1], sys.argv[2:]
)) |
| OLD | NEW |