Commit 727c3bcb 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 4170bc62
...@@ -248,7 +248,8 @@ class EggTestSuite(TestSuite): ...@@ -248,7 +248,8 @@ class EggTestSuite(TestSuite):
status_dict = self.spawn( status_dict = self.spawn(
self.python_interpreter, 'setup.py', 'test', self.python_interpreter, 'setup.py', 'test',
cwd=self.egg_test_path_dict[test], cwd=self.egg_test_path_dict[test],
SLAPOS_TEST_SHARED_PART_LIST=self.shared_part_list) SLAPOS_TEST_SHARED_PART_LIST=self.shared_part_list,
SLAPOS_TEST_LOG_DIRECTORY=self.log_directory)
except SubprocessError as e: except SubprocessError as e:
status_dict = e.status_dict status_dict = e.status_dict
test_log = status_dict['stderr'] test_log = status_dict['stderr']
...@@ -298,6 +299,9 @@ def runTestSuite(): ...@@ -298,6 +299,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('--log_directory',
help='Directory to store logs',
default=None)
parser.add_argument('--python_interpreter', parser.add_argument('--python_interpreter',
help='Path to python interpreter used to run the test suite', help='Path to python interpreter used to run the test suite',
default='python') default='python')
...@@ -329,7 +333,8 @@ def runTestSuite(): ...@@ -329,7 +333,8 @@ def runTestSuite():
revision=revision, revision=revision,
python_interpreter=args.python_interpreter, python_interpreter=args.python_interpreter,
egg_test_path_dict=egg_test_path_dict, egg_test_path_dict=egg_test_path_dict,
shared_part_list=args.shared_part_list shared_part_list=args.shared_part_list,
log_directory=args.log_directory,
) )
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