summaryrefslogtreecommitdiff
path: root/selftest/selftest.py
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2012-03-05 03:49:50 +0100
committerJelmer Vernooij <jelmer@samba.org>2012-03-05 03:49:50 +0100
commitf26b40a92553863bc0da39918ff19bf21199c608 (patch)
tree83ceb362eb82d71880a54e694e93b1498aae04fb /selftest/selftest.py
parenta6a84566466a59fc954268ebd616ef1af4b347b1 (diff)
downloadsamba-f26b40a92553863bc0da39918ff19bf21199c608.tar.gz
selftest.run: Factor out exported_envvars_str.
Diffstat (limited to 'selftest/selftest.py')
-rwxr-xr-xselftest/selftest.py14
1 files changed, 2 insertions, 12 deletions
diff --git a/selftest/selftest.py b/selftest/selftest.py
index 893ff4cfaa0..9ca1e45c1df 100755
--- a/selftest/selftest.py
+++ b/selftest/selftest.py
@@ -42,6 +42,7 @@ from selftest.run import (
expand_environment_strings,
expand_command_list,
expand_command_run,
+ exported_envvars_str,
)
from selftest.target import (
EnvironmentManager,
@@ -446,17 +447,6 @@ exported_envvars = [
"LOCAL_PATH"
]
-def exported_envvars_str(testenv_vars):
- out = ""
-
- for n in exported_envvars:
- if not n in testenv_vars:
- continue
- out += "%s=%s\n" % (n, testenv_vars[n])
-
- return out
-
-
def switch_env(name, prefix):
if ":" in name:
(envname, option) = name.split(":", 1)
@@ -500,7 +490,7 @@ if opts.testenv:
os.environ["PIDDIR"] = testenv_vars["PIDDIR"]
os.environ["ENVNAME"] = testenv_name
- envvarstr = exported_envvars_str(testenv_vars)
+ envvarstr = exported_envvars_str(testenv_vars, exported_envvars)
term = os.environ.get("TERMINAL", "xterm -e")
cmd = """'echo -e "