Commit e06e5ec7 authored by Jérome Perrin's avatar Jérome Perrin

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 bbedf149
...@@ -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:
...@@ -287,6 +285,9 @@ def runTestSuite(): ...@@ -287,6 +285,9 @@ def runTestSuite():
parser.add_argument('--frontend_url', parser.add_argument('--frontend_url',
help='The url of the frontend of this test node', help='The url of the frontend of this test node',
default=None) 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='.')
...@@ -298,6 +299,7 @@ def runTestSuite(): ...@@ -298,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