Commit 45ac13b5 authored by Andrea Valassi's avatar Andrea Valassi
Browse files

Override default test user by $COOL_QMTEST_USER if defined (CORALCOOL-2888)


git-svn-id: file:///git/lcgcool.svndb/cool/trunk@19965 4525493e-7705-40b1-a816-d608a930855b
parent 7b90c852
...@@ -222,9 +222,10 @@ class DBPreparer: ...@@ -222,9 +222,10 @@ class DBPreparer:
# With COOL >= 2.0.0 we can use the following # With COOL >= 2.0.0 we can use the following
#return "sqlite_file:%s/%s"%(self.SQLiteFilename(),self.name) #return "sqlite_file:%s/%s"%(self.SQLiteFilename(),self.name)
else: else:
# Override default by $COOL_QMTEST_USER if defined (CORALCOOL-2888)
if "COOL_QMTEST_USER" in self.env: user=self.env["COOL_QMTEST_USER"]
# AV Fix for bug #28349 (use USERNAME instead of USER on Windows) # AV Fix for bug #28349 (use USERNAME instead of USER on Windows)
if "USER" in self.env: user=self.env["USER"] elif "USER" in self.env: user=self.env["USER"]
else: user=self.env["USERNAME"] else: user=self.env["USERNAME"]
return "COOL-%s-%s/%s"%(self.backend,user,self.name) return "COOL-%s-%s/%s"%(self.backend,user,self.name)
...@@ -461,9 +462,9 @@ class StandardTest(ShellCommandTest): ...@@ -461,9 +462,9 @@ class StandardTest(ShellCommandTest):
###os.environ[ 'COOL_PYCOOLTEST_SKIP_EXCEPTIONS' ] = '1' ###os.environ[ 'COOL_PYCOOLTEST_SKIP_EXCEPTIONS' ] = '1'
###os.environ[ 'COOL_PYCOOLTEST_SKIP_ROOT6927' ] = '1' ###os.environ[ 'COOL_PYCOOLTEST_SKIP_ROOT6927' ] = '1'
# dump software versions on a test by test basis # dump software versions and other useful env on a test by test basis
# [NB CORALSYS and COOLSYS _only_ exist for this reason!] # [NB CORALSYS and COOLSYS _only_ exist for this reason!]
for vname in "QMTEST_CLASS_PATH", "COOLSYS", "CORALSYS", "ROOTSYS" : for vname in "QMTEST_CLASS_PATH", "COOLSYS", "CORALSYS", "ROOTSYS", "COOL_QMTEST_USER" :
if vname in os.environ: if vname in os.environ:
result['CoolTest.%s'%vname] = os.path.abspath(os.environ[vname]) result['CoolTest.%s'%vname] = os.path.abspath(os.environ[vname])
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment