scripts/exec_wrapper.py: ensure loading of mmgen mods from overlay
This commit is contained in:
parent
063847db0e
commit
10cc89feac
1 changed files with 5 additions and 2 deletions
|
|
@ -27,8 +27,11 @@ def exec_wrapper_init():
|
|||
|
||||
if exec_wrapper_os.path.dirname(exec_wrapper_sys.argv[1]) == 'test':
|
||||
# support running of test scripts under wrapper
|
||||
exec_wrapper_sys.path[0] = exec_wrapper_os.getcwd() # assume we’re in repo root
|
||||
exec_wrapper_sys.path.insert(0,exec_wrapper_os.path.join('test', 'overlay', 'tree'))
|
||||
repo_root = exec_wrapper_os.getcwd() # assume we’re in repo root
|
||||
exec_wrapper_sys.path[0] = repo_root
|
||||
# ensure loading of mmgen mods from overlay tree, not repo root:
|
||||
from test.overlay import overlay_setup
|
||||
overlay_setup(repo_root)
|
||||
else:
|
||||
exec_wrapper_sys.path.pop(0)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue