-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Files used by jobs need to be on a shared FS. This is typically the case
except that the ci_runner, when testing various branches, does the cloning in `/tmp`. One alternative solution would be to ensure this is moved to the home dir.
- Loading branch information
Showing
4 changed files
with
43 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,21 @@ | ||
import os | ||
from pathlib import Path | ||
|
||
from _test_tools import assert_completed | ||
from _test_tools import assert_completed, _deploy | ||
from psij import Job, JobSpec, JobExecutor | ||
|
||
|
||
def test_user_guide_pre_launch() -> None: | ||
script_dir = os.path.dirname(os.path.realpath(__file__)) | ||
|
||
# START | ||
ex = JobExecutor.get_instance('local') | ||
spec = JobSpec('/bin/bash', ['-c', 'module is-loaded test']) | ||
spec.pre_launch = Path(script_dir) / 'pre_launch.sh' | ||
with _deploy(Path(script_dir) / 'pre_launch.sh') as pre_launch_sh_path: | ||
# START | ||
ex = JobExecutor.get_instance('local') | ||
spec = JobSpec('/bin/bash', ['-c', 'module is-loaded test']) | ||
spec.pre_launch = pre_launch_sh_path | ||
|
||
job = Job(spec) | ||
ex.submit(job) | ||
status = job.wait() | ||
# END | ||
assert_completed(job, status) | ||
job = Job(spec) | ||
ex.submit(job) | ||
status = job.wait() | ||
# END | ||
assert_completed(job, status) |