Commit 4a02f4a3 authored by Julien Muchembled's avatar Julien Muchembled

runUnitTest: add option to specify the location of the unit test instance

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@41771 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent a0e1ac20
...@@ -119,6 +119,8 @@ Options: ...@@ -119,6 +119,8 @@ Options:
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 --sys_path=path,path Comma-separated list of paths which will be used to
extend sys.path extend sys.path
--instance_home=PATH Create/use test instance in given path
When no unit test is specified, only activities are processed. When no unit test is specified, only activities are processed.
""" """
...@@ -603,6 +605,7 @@ def main(): ...@@ -603,6 +605,7 @@ def main():
"zserver=", "zserver=",
"products_path=", "products_path=",
"sys_path=", "sys_path=",
"instance_home=",
]) ])
except getopt.GetoptError, msg: except getopt.GetoptError, msg:
usage(sys.stderr, msg) usage(sys.stderr, msg)
...@@ -697,6 +700,8 @@ def main(): ...@@ -697,6 +700,8 @@ def main():
os.environ["PRODUCTS_PATH"] = arg os.environ["PRODUCTS_PATH"] = arg
elif opt == "--sys_path": elif opt == "--sys_path":
sys.path.extend(arg.split(',')) sys.path.extend(arg.split(','))
elif opt == "instance_home=":
instance_home = os.path.abspath(arg)
global tests_home global tests_home
os.environ['INSTANCE_HOME'] = instance_home os.environ['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