summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/mailman/bin/master.py11
-rw-r--r--src/mailman/bin/runner.py6
-rw-r--r--src/mailman/rest/users.py1
3 files changed, 16 insertions, 2 deletions
diff --git a/src/mailman/bin/master.py b/src/mailman/bin/master.py
index 2b3ec87c4..9eaec21b8 100644
--- a/src/mailman/bin/master.py
+++ b/src/mailman/bin/master.py
@@ -369,9 +369,16 @@ class Loop:
args.extend(['-C', self._config_file])
log = logging.getLogger('mailman.runner')
log.debug('starting: %s', args)
- os.execl(*args)
+ # For the testing framework, if this environment variable is set, pass
+ # it on to the subprocess.
+ coverage_env = os.environ.get('COVERAGE_PROCESS_START')
+ if coverage_env is not None:
+ env = dict(COVERAGE_PROCESS_START=coverage_env)
+ args.append(env)
+ print('ARGS:', args, file=sys.stderr)
+ os.execle(*args)
# We should never get here.
- raise RuntimeError('os.execl() failed')
+ raise RuntimeError('os.execle() failed')
def start_runners(self, runner_names=None):
"""Start all the configured runners.
diff --git a/src/mailman/bin/runner.py b/src/mailman/bin/runner.py
index 76da0364f..7648ed961 100644
--- a/src/mailman/bin/runner.py
+++ b/src/mailman/bin/runner.py
@@ -42,6 +42,12 @@ from mailman.version import MAILMAN_VERSION_FULL
log = None
+# Enable coverage if run under the appropriate test suite.
+if os.environ.get('COVERAGE_PROCESS_START') is not None:
+ import coverage
+ coverage.process_startup()
+
+
class ROptionAction(argparse.Action):
"""Callback for -r/--runner option."""
diff --git a/src/mailman/rest/users.py b/src/mailman/rest/users.py
index 798fe699d..cfea36cfa 100644
--- a/src/mailman/rest/users.py
+++ b/src/mailman/rest/users.py
@@ -23,6 +23,7 @@ __metaclass__ = type
__all__ = [
'AUser',
'AllUsers',
+ 'Login',
]