Commit 325395e8 authored by Jérome Perrin's avatar Jérome Perrin

Eggtest: support --shared_part_list

Shared parts received from test node will be passed as
SLAPOS_TEST_SHARED_PART_LIST environment variable to egg tests.

This will be useful for SLAPOS-SR tests.
parent 35768fa2
Pipeline #7706 passed with stage
in 0 seconds
...@@ -245,8 +245,10 @@ class EggTestSuite(TestSuite): ...@@ -245,8 +245,10 @@ class EggTestSuite(TestSuite):
def run(self, test): def run(self, test):
print(test) print(test)
try: try:
status_dict = self.spawn(self.python_interpreter, 'setup.py', 'test', status_dict = self.spawn(
cwd=self.egg_test_path_dict[test]) self.python_interpreter, 'setup.py', 'test',
cwd=self.egg_test_path_dict[test],
SLAPOS_TEST_SHARED_PART_LIST=self.shared_part_list)
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']
...@@ -302,6 +304,9 @@ def runTestSuite(): ...@@ -302,6 +304,9 @@ def runTestSuite():
parser.add_argument('--source_code_path_list', parser.add_argument('--source_code_path_list',
help='Coma separated list of Eggs folders to test', help='Coma separated list of Eggs folders to test',
default='.') default='.')
parser.add_argument('--shared_part_list',
help='Shared parts for recursive slapos',
default='')
args = parser.parse_args() args = parser.parse_args()
master = taskdistribution.TaskDistributor(args.master_url) master = taskdistribution.TaskDistributor(args.master_url)
...@@ -324,6 +329,7 @@ def runTestSuite(): ...@@ -324,6 +329,7 @@ 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
) )
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