Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1676)

Unified Diff: build/android/pylib/output/noop_output_manager.py

Issue 2933993002: Add local results details pages.
Patch Set: More doc fixes. Created 3 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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 ''
+

Powered by Google App Engine
This is Rietveld 408576698