test.py: minor overlay fix
This commit is contained in:
parent
5d5c1835dd
commit
be5867dd2c
2 changed files with 10 additions and 7 deletions
|
|
@ -1,5 +1,8 @@
|
|||
import sys,os,shutil
|
||||
|
||||
def get_overlay_dir(repo_root):
|
||||
return os.path.join(repo_root,'test','overlay','tree')
|
||||
|
||||
def overlay_setup(repo_root):
|
||||
|
||||
def process_srcdir(d):
|
||||
|
|
@ -24,7 +27,7 @@ def overlay_setup(repo_root):
|
|||
os.path.join(srcdir,fn),
|
||||
os.path.join(destdir,link_fn) )
|
||||
|
||||
overlay_dir = os.path.join(repo_root,'test','overlay','tree')
|
||||
overlay_dir = get_overlay_dir(repo_root)
|
||||
fakemod_dir = os.path.join(repo_root,'test','overlay','fakemods')
|
||||
fakemods = os.listdir(fakemod_dir)
|
||||
make_link = os.symlink if sys.platform == 'linux' else shutil.copy2
|
||||
|
|
|
|||
12
test/test.py
12
test/test.py
|
|
@ -73,8 +73,8 @@ def create_shm_dir(data_dir,trash_dir):
|
|||
import sys,os,time
|
||||
|
||||
from include.tests_header import repo_root
|
||||
from test.overlay import overlay_setup
|
||||
overlay_dir = overlay_setup(repo_root)
|
||||
from test.overlay import get_overlay_dir,overlay_setup
|
||||
overlay_dir = get_overlay_dir(repo_root)
|
||||
sys.path.insert(0,overlay_dir)
|
||||
|
||||
try: os.unlink(os.path.join(repo_root,'my.err'))
|
||||
|
|
@ -796,12 +796,9 @@ class TestSuiteRunner(object):
|
|||
self.start_time = time.time()
|
||||
self.daemons_started = False
|
||||
gname_save = None
|
||||
overlay_setup(repo_root)
|
||||
if usr_args:
|
||||
for arg in usr_args:
|
||||
if arg in utils:
|
||||
params = usr_args[usr_args.index(arg)+1:]
|
||||
globals()[arg](*params)
|
||||
sys.exit(0)
|
||||
if arg in self.gm.cmd_groups:
|
||||
if not self.init_group(arg):
|
||||
continue
|
||||
|
|
@ -1027,6 +1024,9 @@ if opt.list_cmd_groups:
|
|||
CmdGroupMgr().list_cmd_groups()
|
||||
elif opt.list_cmds:
|
||||
list_cmds()
|
||||
elif usr_args and usr_args[0] in utils:
|
||||
globals()[usr_args[0]](*usr_args[1:])
|
||||
sys.exit(0)
|
||||
|
||||
if opt.pause:
|
||||
set_restore_term_at_exit()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue