-
Notifications
You must be signed in to change notification settings - Fork 3
/
test2.py
37 lines (32 loc) · 983 Bytes
/
test2.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
from jetlag import Universal, pp, mk_input, pcmd, RemoteJobWatcher
from knownsystems import *
from time import sleep
import os
import html
import re
# Test creation of shelob configuration using Agave
uv = Universal()
uv.init(
backend = backend_tapis,
#notify = "https://www.cct.lsu.edu/~sbrandt/pushbullet.php?key={PBTOK_PASSWORD}&status=${JOB_STATUS}:${JOB_ID}",
notify='[email protected]',
**rostam
)
uv.configure_from_ssh_keys()
j1 = RemoteJobWatcher(uv, uv.hello_world_job('fork'))
print("Job was submitted")
j1.wait()
assert j1.status() == "FINISHED"
err = j1.err_output()
assert re.search(r'(?m)^This is stderr', err)
out = j1.std_output()
assert re.search(r'(?m)^This is stdout', out)
if True: # This does not work with Agave
j2 = RemoteJobWatcher(uv, uv.hello_world_job('queue'))
print("Job was submitted")
j2.wait()
assert j2.status() == "FINISHED"
else:
print("Test skipped: Tapis can't queue on slurm")
print("Test passed")
exit(0)