Commit 186b1c26 authored by Łukasz Nowak's avatar Łukasz Nowak

- allow to extend sys.path with passed from command line


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@37137 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent e8a4f1eb
...@@ -115,9 +115,10 @@ Options: ...@@ -115,9 +115,10 @@ Options:
Make ZServer listen on given host:port Make ZServer listen on given host:port
If used with --activity_node=, this can be a If used with --activity_node=, this can be a
comma-separated list of addresses. comma-separated list of addresses.
--products_path=path,path Comma-separated list of products paths locations --products_path=path,path Comma-separated list of products paths locations
which shall be used in test environment. which shall be used in test environment.
--sys_path=path,path Comma-separated list of paths which will be used to
extend sys.path
When no unit test is specified, only activities are processed. When no unit test is specified, only activities are processed.
""" """
...@@ -618,6 +619,7 @@ def main(): ...@@ -618,6 +619,7 @@ def main():
"zeo_server=", "zeo_server=",
"zserver=", "zserver=",
"products_path=", "products_path=",
"sys_path="
]) ])
except getopt.GetoptError, msg: except getopt.GetoptError, msg:
usage(sys.stderr, msg) usage(sys.stderr, msg)
...@@ -709,6 +711,8 @@ def main(): ...@@ -709,6 +711,8 @@ def main():
os.environ["zserver"] = arg os.environ["zserver"] = arg
elif opt == "--products_path": elif opt == "--products_path":
os.environ["products_path"] = arg os.environ["products_path"] = arg
elif opt == "--sys_path":
sys.path.extend(arg.split(','))
initializeInstanceHome(tests_framework_home, real_instance_home, instance_home) initializeInstanceHome(tests_framework_home, real_instance_home, instance_home)
......
Markdown is supported
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