mirror of
https://github.com/mongodb/mongo.git
synced 2024-11-24 16:46:00 +01:00
424314f65e
Split out the passthrough tests into separate suites. The MongoDB deployment is started up by resmoke.py so that we can record the success/failure of each individual test in MCI. Added support for parallel execution of tests by dispatching to multiple MongoDB deployments. Added support for grouping different kinds of tests (e.g. C++ unit tests, dbtests, and jstests) so that they can be run together. This allows for customizability in specifying what tests to execute when changes are made to a particular part of the code.
37 lines
991 B
Python
37 lines
991 B
Python
"""
|
|
Defines a mapping of shortened names for logger configuration files to
|
|
their full path.
|
|
"""
|
|
|
|
from __future__ import absolute_import
|
|
|
|
import os
|
|
import os.path
|
|
|
|
|
|
def _get_named_loggers():
|
|
"""
|
|
Explores this directory for any YAML configuration files.
|
|
|
|
Returns a mapping of basenames without the file extension to their
|
|
full path.
|
|
"""
|
|
|
|
dirname = os.path.dirname(__file__)
|
|
named_loggers = {}
|
|
|
|
try:
|
|
(root, _dirs, files) = os.walk(dirname).next()
|
|
for filename in files:
|
|
(short_name, ext) = os.path.splitext(filename)
|
|
if ext in (".yml", ".yaml"):
|
|
pathname = os.path.join(root, filename)
|
|
named_loggers[short_name] = os.path.relpath(pathname)
|
|
except StopIteration:
|
|
# 'dirname' does not exist, which should be impossible because it contains __file__.
|
|
raise IOError("Directory '%s' does not exist" % (dirname))
|
|
|
|
return named_loggers
|
|
|
|
NAMED_LOGGERS = _get_named_loggers()
|