##// END OF EJS Templates
Merge pull request #4350 from minrk/winhpc-unicode...
Min RK -
r12936:3b1746f9 merge
parent child Browse files
Show More
@@ -145,7 +145,7 b' class WinHPCJob(Configurable):'
145 """Return the string representation of the job description XML."""
145 """Return the string representation of the job description XML."""
146 root = self.as_element()
146 root = self.as_element()
147 indent(root)
147 indent(root)
148 txt = ET.tostring(root, encoding="utf-8")
148 txt = ET.tostring(root, encoding="utf-8").decode('utf-8')
149 # Now remove the tokens used to order the attributes.
149 # Now remove the tokens used to order the attributes.
150 txt = re.sub(r'_[A-Z]_','',txt)
150 txt = re.sub(r'_[A-Z]_','',txt)
151 txt = '<?xml version="1.0" encoding="utf-8"?>\n' + txt
151 txt = '<?xml version="1.0" encoding="utf-8"?>\n' + txt
@@ -264,8 +264,8 b' class IPControllerTask(WinHPCTask):'
264 unit_type = Unicode("Core", config=False)
264 unit_type = Unicode("Core", config=False)
265 work_directory = Unicode('', config=False)
265 work_directory = Unicode('', config=False)
266
266
267 def __init__(self, config=None):
267 def __init__(self, **kwargs):
268 super(IPControllerTask, self).__init__(config=config)
268 super(IPControllerTask, self).__init__(**kwargs)
269 the_uuid = uuid.uuid1()
269 the_uuid = uuid.uuid1()
270 self.std_out_file_path = os.path.join('log','ipcontroller-%s.out' % the_uuid)
270 self.std_out_file_path = os.path.join('log','ipcontroller-%s.out' % the_uuid)
271 self.std_err_file_path = os.path.join('log','ipcontroller-%s.err' % the_uuid)
271 self.std_err_file_path = os.path.join('log','ipcontroller-%s.err' % the_uuid)
@@ -292,8 +292,8 b' class IPEngineTask(WinHPCTask):'
292 unit_type = Unicode("Core", config=False)
292 unit_type = Unicode("Core", config=False)
293 work_directory = Unicode('', config=False)
293 work_directory = Unicode('', config=False)
294
294
295 def __init__(self, config=None):
295 def __init__(self, **kwargs):
296 super(IPEngineTask,self).__init__(config=config)
296 super(IPEngineTask,self).__init__(**kwargs)
297 the_uuid = uuid.uuid1()
297 the_uuid = uuid.uuid1()
298 self.std_out_file_path = os.path.join('log','ipengine-%s.out' % the_uuid)
298 self.std_out_file_path = os.path.join('log','ipengine-%s.out' % the_uuid)
299 self.std_err_file_path = os.path.join('log','ipengine-%s.err' % the_uuid)
299 self.std_err_file_path = os.path.join('log','ipengine-%s.err' % the_uuid)
@@ -177,9 +177,17 b' class TestSSHEngineLauncher(SSHTest, LauncherTest, TestCase):'
177 # Windows Launcher Tests
177 # Windows Launcher Tests
178 #-------------------------------------------------------------------------------
178 #-------------------------------------------------------------------------------
179
179
180 if sys.platform.startswith("win"):
180 class WinHPCTest:
181 class TestWinHPCControllerLauncher(ControllerLauncherTest, TestCase):
181 """Tests for WinHPC Launchers"""
182 launcher_class = launcher.WindowsHPCControllerLauncher
182 def test_batch_template(self):
183 launcher = self.build_launcher()
184 job_file = os.path.join(self.profile_dir, launcher.job_file_name)
185 self.assertEqual(launcher.job_file, job_file)
186 launcher.write_job_file(1)
187 self.assertTrue(os.path.isfile(job_file))
188
189 class TestWinHPCControllerLauncher(WinHPCTest, ControllerLauncherTest, TestCase):
190 launcher_class = launcher.WindowsHPCControllerLauncher
183
191
184 class TestWinHPCEngineSetLauncher(EngineSetLauncherTest, TestCase):
192 class TestWinHPCEngineSetLauncher(WinHPCTest, EngineSetLauncherTest, TestCase):
185 launcher_class = launcher.WindowsHPCEngineSetLauncher
193 launcher_class = launcher.WindowsHPCEngineSetLauncher
General Comments 0
You need to be logged in to leave comments. Login now