# Copyright 2020 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.
"""Creates and manages test runner log file objects.
Provides a context manager object for use in a with statement and a module level FileStreamFor function for use by clients. """
import collections import multiprocessing import os
if self._log_dir andnot os.path.isdir(self._log_dir):
os.makedirs(self._log_dir)
_instance = self
def __enter__(self): return self
def __exit__(self, exc_type, exc_value, traceback):
pool = multiprocessing.Pool(4) for log_entry in self._runner_logs:
pool.apply_async(_FinalizeLog, (log_entry, self._build_ids_files))
pool.close()
pool.join()
_instance = None
def _FileStreamFor(self, name, symbolize): if any(elem.name == name for elem in self._runner_logs): raise Exception('RunnerLogManager can only open "%s" once' % name)
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.