def setUp(self): self.workdir = tempfile.mkdtemp(dir='unittests') self.testjob = self.job_type( name='testjob', launcher=self.launcher, workdir=self.workdir, script_filename=os_ext.mkstemp_path( dir=self.workdir, suffix='.sh'), stdout=os_ext.mkstemp_path(dir=self.workdir, suffix='.out'), stderr=os_ext.mkstemp_path(dir=self.workdir, suffix='.err'), ) self.environs = [Environment(name='foo', modules=['testmod_foo'])] self.pre_run = ['echo prerun'] self.post_run = ['echo postrun'] self.parallel_cmd = 'hostname'
def setUp(self): self.workdir = tempfile.mkdtemp(dir='unittests') self.testjob = self.job_type( name='testjob', command='hostname', launcher=self.launcher, environs=[Environment(name='foo', modules=['testmod_foo'])], workdir=self.workdir, script_filename=os_ext.mkstemp_path(dir=self.workdir, suffix='.sh'), stdout=os_ext.mkstemp_path(dir=self.workdir, suffix='.out'), stderr=os_ext.mkstemp_path(dir=self.workdir, suffix='.err'), pre_run=['echo prerun'], post_run=['echo postrun']) self.builder = BashScriptBuilder()