Commit 02666ca3 authored by Łukasz Nowak's avatar Łukasz Nowak

Enclose runTestSuite in its workspace.

parent d029684f
...@@ -45,6 +45,7 @@ class Recipe(BaseSlapRecipe): ...@@ -45,6 +45,7 @@ class Recipe(BaseSlapRecipe):
def installSlapOs(self): def installSlapOs(self):
CONFIG['slapos_directory'] = self.createDataDirectory('slapos') CONFIG['slapos_directory'] = self.createDataDirectory('slapos')
CONFIG['working_directory'] = self.createDataDirectory('testnode') CONFIG['working_directory'] = self.createDataDirectory('testnode')
CONFIG['test_suite_directory'] = self.createDataDirectory('test_suite')
CONFIG['software_root'] = os.path.join(CONFIG['slapos_directory'], CONFIG['software_root'] = os.path.join(CONFIG['slapos_directory'],
'software') 'software')
CONFIG['instance_root'] = os.path.join(CONFIG['slapos_directory'], CONFIG['instance_root'] = os.path.join(CONFIG['slapos_directory'],
...@@ -83,6 +84,7 @@ class Recipe(BaseSlapRecipe): ...@@ -83,6 +84,7 @@ class Recipe(BaseSlapRecipe):
git_binary=self.options['git_binary'], git_binary=self.options['git_binary'],
software_root=CONFIG['software_root'], software_root=CONFIG['software_root'],
working_directory=CONFIG['working_directory'], working_directory=CONFIG['working_directory'],
test_suite_directory=CONFIG['test_suite_directory'],
vcs_repository_list=eval(self.parameter_dict.get('vcs_repository_list'),), vcs_repository_list=eval(self.parameter_dict.get('vcs_repository_list'),),
node_quantity=self.parameter_dict.get('node_quantity', '1'), node_quantity=self.parameter_dict.get('node_quantity', '1'),
test_suite_master_url=self.parameter_dict.get( test_suite_master_url=self.parameter_dict.get(
......
...@@ -256,7 +256,7 @@ branch = %(branch)s ...@@ -256,7 +256,7 @@ branch = %(branch)s
# any custom code to pick the failure up and react ?) # any custom code to pick the failure up and react ?)
remote_test_result_needs_cleanup = False remote_test_result_needs_cleanup = False
run_test_suite = subprocess.Popen(invocation_list, run_test_suite = subprocess.Popen(invocation_list,
preexec_fn=os.setsid) preexec_fn=os.setsid, cwd=config['test_suite_directory'])
process_group_pid_set.add(run_test_suite.pid) process_group_pid_set.add(run_test_suite.pid)
run_test_suite.wait() run_test_suite.wait()
process_group_pid_set.remove(run_test_suite.pid) process_group_pid_set.remove(run_test_suite.pid)
......
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