summaryrefslogtreecommitdiff
path: root/selftest
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2012-03-04 02:38:15 +0100
committerJelmer Vernooij <jelmer@samba.org>2012-03-04 18:02:06 +0100
commit4d602fb05dfc7d747f3aff90d9482313999a7092 (patch)
tree5b26ed4480adb2aa458233072a29f7ba310c480c /selftest
parent646f6b2697147ebabe5ee985b13964d5e3f33ae1 (diff)
downloadsamba-4d602fb05dfc7d747f3aff90d9482313999a7092.tar.gz
samba-4d602fb05dfc7d747f3aff90d9482313999a7092.tar.bz2
samba-4d602fb05dfc7d747f3aff90d9482313999a7092.zip
selftest.target: Add Environment.get_vars.
Diffstat (limited to 'selftest')
-rw-r--r--selftest/target/__init__.py11
1 files changed, 11 insertions, 0 deletions
diff --git a/selftest/target/__init__.py b/selftest/target/__init__.py
index 72e0770d92..b6a297ce02 100644
--- a/selftest/target/__init__.py
+++ b/selftest/target/__init__.py
@@ -28,6 +28,7 @@ class EnvironmentDown(Exception):
def __init__(self, msg):
super(EnvironmentDown, self).__init__("environment went down: %s" % msg)
+
class Target(object):
"""A target for Samba tests."""
@@ -67,6 +68,13 @@ class Environment(object):
"""
raise NotImplementedError(self.teardown)
+ def get_vars(self):
+ """Retrieve the environment variables for this environment.
+
+ :return: Dictionary with string -> string values
+ """
+ raise NotImplementedError(self.get_vars)
+
class NoneEnvironment(Environment):
"""Empty environment.
@@ -81,6 +89,9 @@ class NoneEnvironment(Environment):
def teardown(self):
return
+ def get_vars(self):
+ return {}
+
class EnvironmentManager(object):
"""Manager of environments."""