@@ -1645,7 +1645,7 @@ def _setup_paths(self):
16451645 except OSError as e :
16461646 raise PipelineError ('failed to set up paths' ) from e
16471647
1648- def _create_job (self , name , force_local = False , ** job_opts ):
1648+ def _create_job (self , job_type , force_local = False , ** job_opts ):
16491649 '''Setup the job related to this check.'''
16501650
16511651 if force_local :
@@ -1656,24 +1656,31 @@ def _create_job(self, name, force_local=False, **job_opts):
16561656 launcher = self ._current_partition .launcher_type ()
16571657
16581658 self .logger .debug (
1659- f'Setting up job { name !r} '
1659+ f'Setting up { type } job for test { self . name !r} '
16601660 f'(scheduler: { scheduler .registered_name !r} , '
16611661 f'launcher: { launcher .registered_name !r} )'
16621662 )
1663+
1664+ if job_type == 'build' :
1665+ script_name = 'rfm_build.sh'
1666+ elif job_type == 'run' :
1667+ script_name = 'rfm_job.sh'
1668+
16631669 return Job .create (scheduler ,
16641670 launcher ,
1665- name = name ,
1671+ name = f'rfm_{ self .short_name } ' ,
1672+ script_filename = script_name ,
16661673 workdir = self ._stagedir ,
16671674 sched_access = self ._current_partition .access ,
16681675 ** job_opts )
16691676
16701677 def _setup_build_job (self , ** job_opts ):
1671- self ._build_job = self ._create_job (f'rfm_build' ,
1672- self .local or self .build_locally ,
1673- ** job_opts )
1678+ self ._build_job = self ._create_job (
1679+ 'build' , self .local or self .build_locally , ** job_opts
1680+ )
16741681
16751682 def _setup_run_job (self , ** job_opts ):
1676- self ._job = self ._create_job (f'rfm_job ' , self .local , ** job_opts )
1683+ self ._job = self ._create_job (f'run ' , self .local , ** job_opts )
16771684
16781685 def _setup_container_platform (self ):
16791686 try :
0 commit comments