LIB_PATH="shared"
-os.putenv('PYTHONUNBUFFERED', '1')
+os.environ['PYTHONUNBUFFERED'] = '1'
if Constants.HEXVERSION < 0x105019:
test_prefix = "%s/st" % (Utils.g_module.blddir)
shutil.rmtree(test_prefix, ignore_errors=True)
os.makedirs(test_prefix)
- os.putenv('TEST_DATA_PREFIX', test_prefix)
+ os.environ['TEST_DATA_PREFIX'] = test_prefix
cmd = os.path.join(Utils.g_module.blddir, 'tdbtorture')
ret = samba_utils.RUN_COMMAND(cmd)
print("testsuite returned %d" % ret)
cleanup_list = []
-os.putenv('CC', "ccache gcc")
+os.environ['CC'] = "ccache gcc"
builddirs = {
"samba3" : "source3",
cleanup_list = []
-os.putenv('CC', "ccache gcc")
+os.environ['CC'] = "ccache gcc"
tasks = {
"source3" : [ ("autogen", "./autogen.sh", "text/plain"),
test_prefix = "%s/st" % (Utils.g_module.blddir)
shutil.rmtree(test_prefix, ignore_errors=True)
os.makedirs(test_prefix)
- os.putenv('TEST_DATA_PREFIX', test_prefix)
+ os.environ['TEST_DATA_PREFIX'] = test_prefix
cmd = 'tests/test-tdb.sh'
ret = samba_utils.RUN_COMMAND(cmd)
print("testsuite returned %d" % ret)
# ensure we get messages out immediately, so they get in the samba logs,
# and don't get swallowed by a timeout
-os.putenv('PYTHONUNBUFFERED', '1')
+os.environ['PYTHONUNBUFFERED'] = '1'
# forcing GMT avoids a problem in some timezones with kerberos. Both MIT
# heimdal can get mutual authentication errors due to the 24 second difference
# between UTC and GMT when using some zone files (eg. the PDT zone from
# the US)
-os.putenv("TZ", "GMT")
+os.environ["TZ"] = "GMT"
# Find right directory when running from source tree
sys.path.insert(0, "bin/python")
f.write("send\n")
f.close()
- os.putenv("KRB5CCNAME", ccachename)
+ os.environ["KRB5CCNAME"] = ccachename
try:
cmd = nsupdate_cmd[:]
cmd.append(tmpfile)
# use our private krb5.conf to avoid problems with the wrong domain
# bind9 nsupdate wants the default domain set
krb5conf = lp.private_path('krb5.conf')
-os.putenv('KRB5_CONFIG', krb5conf)
+os.environ['KRB5_CONFIG'] = krb5conf
file = open(dns_update_list, "r")
# ensure we get messages out immediately, so they get in the samba logs,
# and don't get swallowed by a timeout
-os.putenv('PYTHONUNBUFFERED', '1')
+os.environ['PYTHONUNBUFFERED'] = '1'
# forcing GMT avoids a problem in some timezones with kerberos. Both MIT
# heimdal can get mutual authentication errors due to the 24 second difference
# between UTC and GMT when using some zone files (eg. the PDT zone from
# the US)
-os.putenv("TZ", "GMT")
+os.environ["TZ"] = "GMT"
# Find right directory when running from source tree
sys.path.insert(0, "bin/python")
self.vars = {}
self.list_mode = False
self.vms = None
- os.putenv('PYTHONUNBUFFERED', '1')
+ os.environ['PYTHONUNBUFFERED'] = '1'
self.parser = optparse.OptionParser("wintest")
def check_prerequesites(self):
def putenv(self, key, value):
'''putenv with substitution'''
- os.putenv(key, self.substitute(value))
+ os.environ[key] = self.substitute(value)
def chdir(self, dir):
'''chdir with substitution'''