示例#1
0
# This 'global' file needs to be empty when we start
dns_host_file_path = os.path.join(prefix_abs, "dns_host_file")
if os.path.exists(dns_host_file_path):
    os.unlink(dns_host_file_path)

if opts.testenv:
    testenv_name = os.environ.get("SELFTEST_TESTENV", testenv_default)

    env = switch_env(testenv_name, prefix)
    testenv_vars = env.get_vars()

    os.environ["PIDDIR"] = testenv_vars["PIDDIR"]
    os.environ["ENVNAME"] = testenv_name

    envvarstr = exported_envvars_str(testenv_vars, exported_envvars)

    term = os.environ.get("TERMINAL", "xterm -e")
    cmd = """'echo -e "
Welcome to the Samba4 Test environment '%(testenv_name)'

This matches the client environment used in make test
server is pid `cat \$PIDDIR/samba.pid`

Some useful environment variables:
TORTURE_OPTIONS=\$TORTURE_OPTIONS
SMB_CONF_PATH=\$SMB_CONF_PATH

$envvarstr
\" && LD_LIBRARY_PATH=%(LD_LIBRARY_PATH)s $(SHELL)'""" % {
        "testenv_name": testenv_name,
示例#2
0
文件: test_run.py 项目: runt18/samba
 def test_vars_unknown(self):
     self.assertEquals("foo=1\n",
         exported_envvars_str({"foo": "1", "bla": "2"}, ["foo", "bar"]))
示例#3
0
 def test_vars_unknown(self):
     self.assertEquals("foo=1\n",
         exported_envvars_str({"foo": "1", "bla": "2"}, ["foo", "bar"]))
示例#4
0
文件: test_run.py 项目: runt18/samba
 def test_no_vars(self):
     self.assertEquals("", exported_envvars_str({}, ["foo", "bar"]))
示例#5
0
 def test_no_vars(self):
     self.assertEquals("", exported_envvars_str({}, ["foo", "bar"]))