blob: 5bb3e8805b2cbfabe3b2e6a1984cf0ecf08eb4f3 [file]
############################################################################
# Copyright (C) SchedMD LLC.
############################################################################
import pytest
import atf
# Setup
@pytest.fixture(scope="module", autouse=True)
def setup():
atf.require_slurm_running()
def test_chdir():
"""Verify srun --chdir sets appropriate working directory"""
tmp_dir = "/tmp"
output = atf.run_command_output("srun --chdir=" + tmp_dir + " pwd", fatal=True)
assert output.strip("\n") == tmp_dir