| OLD | NEW |
| 1 # Copyright (c) 2009, Google Inc. All rights reserved. | 1 # Copyright (c) 2009, Google Inc. All rights reserved. |
| 2 # Copyright (c) 2009 Apple Inc. All rights reserved. | 2 # Copyright (c) 2009 Apple 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 17 matching lines...) Expand all Loading... |
| 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 csv | 30 import csv |
| 31 import errno | 31 import errno |
| 32 import logging | 32 import logging |
| 33 import multiprocessing | 33 import multiprocessing |
| 34 import os | 34 import os |
| 35 import signal | 35 import signal |
| 36 import subprocess | 36 import subprocess |
| 37 import sys | 37 import sys |
| 38 import threading |
| 38 import time | 39 import time |
| 39 import threading | |
| 40 | 40 |
| 41 from webkitpy.common.system.filesystem import FileSystem | 41 from webkitpy.common.system.filesystem import FileSystem |
| 42 | 42 |
| 43 | 43 |
| 44 _log = logging.getLogger(__name__) | 44 _log = logging.getLogger(__name__) |
| 45 | 45 |
| 46 | 46 |
| 47 class ScriptError(Exception): | 47 class ScriptError(Exception): |
| 48 | 48 |
| 49 def __init__(self, | 49 def __init__(self, |
| (...skipping 418 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 468 pool.close() | 468 pool.close() |
| 469 pool.join() | 469 pool.join() |
| 470 | 470 |
| 471 | 471 |
| 472 def _run_command_thunk(cmd_line_and_cwd): | 472 def _run_command_thunk(cmd_line_and_cwd): |
| 473 # Note that this needs to be a bare module (and hence Picklable) method to w
ork with multiprocessing.Pool. | 473 # Note that this needs to be a bare module (and hence Picklable) method to w
ork with multiprocessing.Pool. |
| 474 (cmd_line, cwd) = cmd_line_and_cwd | 474 (cmd_line, cwd) = cmd_line_and_cwd |
| 475 proc = subprocess.Popen(cmd_line, cwd=cwd, stdout=subprocess.PIPE, stderr=su
bprocess.PIPE) | 475 proc = subprocess.Popen(cmd_line, cwd=cwd, stdout=subprocess.PIPE, stderr=su
bprocess.PIPE) |
| 476 stdout, stderr = proc.communicate() | 476 stdout, stderr = proc.communicate() |
| 477 return (proc.returncode, stdout, stderr) | 477 return (proc.returncode, stdout, stderr) |
| OLD | NEW |