Commit 987c820f authored by Jérome Perrin's avatar Jérome Perrin Committed by Klaus Wölfel

egg testsuite: accept a --python_interpreter argument

This will be used to run tests using interpreter with pre-installed
eggs, generated with zc.recipe.egg's interpreter
parent d6f87e2b
...@@ -230,9 +230,7 @@ class EggTestSuite(TestSuite): ...@@ -230,9 +230,7 @@ class EggTestSuite(TestSuite):
def runUnitTest(self, *args, **kw): def runUnitTest(self, *args, **kw):
try: try:
# (FIXME) The python should be provided by environment with runUnitTest = "{python} setup.py test".format(python=self.python_interpreter)
# appropriated configuration.
runUnitTest = "python setup.py test"
args = tuple(shlex.split(runUnitTest)) args = tuple(shlex.split(runUnitTest))
status_dict = self.spawn(*args, **kw) status_dict = self.spawn(*args, **kw)
except SubprocessError, e: except SubprocessError, e:
...@@ -284,6 +282,12 @@ def runTestSuite(): ...@@ -284,6 +282,12 @@ def runTestSuite():
parser.add_argument('--master_url', parser.add_argument('--master_url',
help='The Url of Master controling many suites', help='The Url of Master controling many suites',
default=None) default=None)
parser.add_argument('--frontend_url',
help='The url of the frontend of this test node',
default=None)
parser.add_argument('--python_interpreter',
help='Path to python interpreter used to run the test suite',
default='python')
parser.add_argument('--source_code_path_list', parser.add_argument('--source_code_path_list',
help='List of Eggs folders to test, splited by commam', help='List of Eggs folders to test, splited by commam',
default='.') default='.')
...@@ -295,6 +299,7 @@ def runTestSuite(): ...@@ -295,6 +299,7 @@ def runTestSuite():
revision = args.revision revision = args.revision
suite = EggTestSuite(1, test_suite=args.test_suite, suite = EggTestSuite(1, test_suite=args.test_suite,
node_quantity=args.node_quantity, node_quantity=args.node_quantity,
python_interpreter=args.python_interpreter,
revision=revision) revision=revision)
test_result = master.createTestResult(revision, suite.getTestList(), test_result = master.createTestResult(revision, suite.getTestList(),
......
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