summaryrefslogtreecommitdiffstats
path: root/WebKitTools/Scripts/webkitpy/common/system
diff options
context:
space:
mode:
Diffstat (limited to 'WebKitTools/Scripts/webkitpy/common/system')
-rw-r--r--WebKitTools/Scripts/webkitpy/common/system/executive_mock.py6
-rw-r--r--WebKitTools/Scripts/webkitpy/common/system/filesystem_mock.py6
2 files changed, 6 insertions, 6 deletions
diff --git a/WebKitTools/Scripts/webkitpy/common/system/executive_mock.py b/WebKitTools/Scripts/webkitpy/common/system/executive_mock.py
index 7347ff9..c1cf999 100644
--- a/WebKitTools/Scripts/webkitpy/common/system/executive_mock.py
+++ b/WebKitTools/Scripts/webkitpy/common/system/executive_mock.py
@@ -32,10 +32,12 @@
class MockExecutive2(object):
- def __init__(self, output='', exit_code=0, exception=None):
+ def __init__(self, output='', exit_code=0, exception=None,
+ run_command_fn=None):
self._output = output
self._exit_code = exit_code
self._exception = exception
+ self._run_command_fn = run_command_fn
def cpu_count(self):
return 2
@@ -52,4 +54,6 @@ class MockExecutive2(object):
raise self._exception
if return_exit_code:
return self._exit_code
+ if self._run_command_fn:
+ return self._run_command_fn(arg_list)
return self._output
diff --git a/WebKitTools/Scripts/webkitpy/common/system/filesystem_mock.py b/WebKitTools/Scripts/webkitpy/common/system/filesystem_mock.py
index d2cde4f..2dbc1e8 100644
--- a/WebKitTools/Scripts/webkitpy/common/system/filesystem_mock.py
+++ b/WebKitTools/Scripts/webkitpy/common/system/filesystem_mock.py
@@ -39,11 +39,7 @@ class MockFileSystem(object):
Args:
files: a dict of filenames -> file contents. A file contents
value of None is used to indicate that the file should
- not exist (even if standalone is False).
- standalone: If True, only the files listed in _files_ exist.
- If False, the object will pass through read calls to the
- underlying filesystem. Writes are never passed through.
-
+ not exist.
"""
self.files = files