Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion reframe/core/containers.py
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ def launch_command(self, stagedir):
run_opts.append('--nv')

if self.workdir:
run_opts.append(f'-W {self.workdir}')
run_opts.append(f'--pwd {self.workdir}')

run_opts += self.options
if self.command:
Expand Down
8 changes: 4 additions & 4 deletions unittests/test_containers.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,15 +104,15 @@ def expected_cmd_mount_points(container_variant):
elif container_variant in {'Singularity', 'Singularity+nopull'}:
return ('singularity exec -B"/path/one:/one" '
'-B"/path/two:/two" -B"/foo:/rfm_workdir" '
'-W /rfm_workdir image:tag cmd')
'--pwd /rfm_workdir image:tag cmd')
elif container_variant == 'Singularity+cuda':
return ('singularity exec -B"/path/one:/one" '
'-B"/path/two:/two" -B"/foo:/rfm_workdir" --nv '
'-W /rfm_workdir image:tag cmd')
'--pwd /rfm_workdir image:tag cmd')
elif container_variant == 'Singularity+nocommand':
return ('singularity run -B"/path/one:/one" '
'-B"/path/two:/two" -B"/foo:/rfm_workdir" '
'-W /rfm_workdir image:tag')
'--pwd /rfm_workdir image:tag')


@pytest.fixture
Expand Down Expand Up @@ -265,7 +265,7 @@ def expected_run_with_workdir(container_variant_noopt):
'--foo image:tag cmd1'
)
elif container_variant_noopt == 'Singularity':
return ('singularity exec -B\"/foo:/rfm_workdir\" -W foodir '
return ('singularity exec -B\"/foo:/rfm_workdir\" --pwd foodir '
'--foo image:tag cmd1')


Expand Down