test suite: PYTHONPATH and other env var fixes
This commit is contained in:
parent
0e669c3ef8
commit
0cc96af152
4 changed files with 4 additions and 13 deletions
|
|
@ -23,11 +23,8 @@ test/objattrtest.py: Test immutable attributes of MMGen data objects
|
|||
# TODO: test 'typeconv' during instance creation
|
||||
|
||||
import sys,os
|
||||
pn = os.path.dirname(sys.argv[0])
|
||||
os.chdir(os.path.join(pn,os.pardir))
|
||||
sys.path.__setitem__(0,os.path.abspath(os.curdir))
|
||||
|
||||
os.environ['MMGEN_TEST_SUITE'] = '1'
|
||||
from include.tests_header import repo_root
|
||||
|
||||
# Import these _after_ local path's been added to sys.path
|
||||
from mmgen.common import *
|
||||
|
|
|
|||
|
|
@ -29,8 +29,6 @@ sys.path.insert(0,overlay_setup(repo_root))
|
|||
from mmgen.devinit import init_dev
|
||||
init_dev()
|
||||
|
||||
os.environ['MMGEN_TEST_SUITE'] = '1'
|
||||
|
||||
# Import these _after_ local path's been added to sys.path
|
||||
from mmgen.common import *
|
||||
from mmgen.obj import *
|
||||
|
|
|
|||
|
|
@ -131,10 +131,6 @@ trap 'echo -e "${GREEN}Exiting at user request$RESET"; exit' INT
|
|||
|
||||
umask 0022
|
||||
|
||||
export MMGEN_TEST_SUITE=1
|
||||
export MMGEN_NO_LICENSE=1
|
||||
export PYTHONPATH=.
|
||||
|
||||
test_py='test/test.py -n'
|
||||
objtest_py='test/objtest.py'
|
||||
objattrtest_py='test/objattrtest.py'
|
||||
|
|
|
|||
|
|
@ -201,6 +201,9 @@ cfg.skipping_deps = cfg.resuming or 'skip_deps' in po.user_opts
|
|||
|
||||
cmd_args = cfg._args
|
||||
|
||||
if not cfg.system:
|
||||
os.environ['PYTHONPATH'] = repo_root
|
||||
|
||||
if cfg.pexpect_spawn and gc.platform == 'win':
|
||||
die(1,'--pexpect-spawn option not supported on Windows platform, exiting')
|
||||
|
||||
|
|
@ -575,9 +578,6 @@ class TestSuiteRunner(object):
|
|||
else:
|
||||
self.spawn_env['MMGEN_COLUMNS'] = '120'
|
||||
|
||||
if not cfg.system:
|
||||
self.spawn_env['PYTHONPATH'] = repo_root
|
||||
|
||||
def spawn_wrapper(self,cmd,
|
||||
args = [],
|
||||
extra_desc = '',
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue