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

EggTestSuite: support --log_directory

Just propagate it as SLAPOS_TEST_LOG_DIRECTORY, then tests (running with
python setup.py test) will be able to use it if they wish.
parent 1f987995
......@@ -245,8 +245,10 @@ class EggTestSuite(TestSuite):
def run(self, test):
print(test)
try:
status_dict = self.spawn(self.python_interpreter, 'setup.py', 'test',
cwd=self.egg_test_path_dict[test])
status_dict = self.spawn(
self.python_interpreter, 'setup.py', 'test',
cwd=self.egg_test_path_dict[test],
SLAPOS_TEST_LOG_DIRECTORY=self.log_directory)
except SubprocessError as e:
status_dict = e.status_dict
test_log = status_dict['stderr']
......@@ -296,6 +298,9 @@ def runTestSuite():
parser.add_argument('--frontend_url',
help='The url of the frontend of this test node',
default=None)
parser.add_argument('--log_directory',
help='Directory to store logs',
default=None)
parser.add_argument('--python_interpreter',
help='Path to python interpreter used to run the test suite',
default='python')
......@@ -324,6 +329,7 @@ def runTestSuite():
revision=revision,
python_interpreter=args.python_interpreter,
egg_test_path_dict=egg_test_path_dict,
log_directory=args.log_directory,
)
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