Chromium Code Reviews| Index: build/android/pylib/output/noop_output_manager.py |
| diff --git a/build/android/pylib/output/noop_output_manager.py b/build/android/pylib/output/noop_output_manager.py |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..0314a4b46d58970f397b7ec54bff3a1756530319 |
| --- /dev/null |
| +++ b/build/android/pylib/output/noop_output_manager.py |
| @@ -0,0 +1,43 @@ |
| +# Copyright 2017 The Chromium Authors. All rights reserved. |
| +# Use of this source code is governed by a BSD-style license that can be |
| +# found in the LICENSE file. |
| + |
| +import contextlib |
| + |
| +from pylib.base import output_manager |
| + |
| +# TODO(mikecase): This class is currently mostly unused. |
|
jbudorick
2017/08/23 16:16:20
haha, maybe TODO someone else. (me?)
mikecase (-- gone --)
2017/08/24 05:29:08
done
|
| +# Add a --bot-mode argument that all bots pass. If --bot-mode and |
| +# --local-ouput args are both not passed to test runner then use this |
|
jbudorick
2017/08/23 16:16:20
super nit: --local-output
mikecase (-- gone --)
2017/08/24 05:29:08
done
|
| +# as the output manager impl. |
| + |
| +# pylint: disable=abstract-method |
|
jbudorick
2017/08/23 16:16:20
Is this because one of these doesn't override a No
|
| +# pylint: disable=no-self-use |
| +# pylint: disable=super-init-not-called |
|
jbudorick
2017/08/23 16:16:20
Why doesn't NoopArchivedFile call super.__init__()
mikecase (-- gone --)
2017/08/24 05:29:07
Because it creates a tempfile. Basically, I hate s
|
| +# pylint: disable=unused-argument |
| + |
| +class NoopOutputManager(output_manager.OutputManager): |
| + |
| + def __init__(self): |
| + super(NoopOutputManager, self).__init__() |
| + |
| + #override |
| + @contextlib.contextmanager |
| + def ArchiveAndDeleteFile(self, *args, **kwargs): |
| + yield NoopArchivedFile() |
| + |
| + |
| +class NoopArchivedFile(output_manager.ArchivedFile): |
| + |
| + def __init__(self): |
| + pass |
| + |
| + def write(self, *args, **kwargs): |
| + pass |
| + |
| + def flush(self, *args, **kwargs): |
| + pass |
| + |
| + def Link(self): |
| + return '' |
| + |