-
Notifications
You must be signed in to change notification settings - Fork 3
/
property-test.py
66 lines (55 loc) · 1.5 KB
/
property-test.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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
from jetlag import Universal, pp, mk_input, pcmd
from time import sleep
import os
import html
from knownsystems import *
if False:
uv = Universal()
uv.init(
backend = backend_agave,
notify = '[email protected]',
**shelob
)
uv.configure_from_ssh_keys()
# Check configuration...
uv = Universal()
uv.load(backend_agave, '[email protected]', 'shelob')
uv.check_values(shelob)
mm = uv.get_meta('system-config-sbrandt-shelob')
pp.pprint(mm)
uv = Universal()
uv.load(backend_agave, '[email protected]', 'rostam')
uv.check_values(rostam)
uv = Universal()
uv.load(backend_tapis, '[email protected]', 'shelob')
uv.check_values(shelob)
uv = Universal()
uv.load(backend_tapis, '[email protected]', 'rostam')
uv.check_values(rostam)
def dm(name):
for m in uv.get_meta('property-'+name):
uv.del_meta(m)
if True:
dm('a')
dm('b')
dm('c')
uv.hello_world_job('fork',sets_props={'a'},needs_props={})
uv.hello_world_job('fork',sets_props={'b'},needs_props={'a'})
uv.hello_world_job('fork',sets_props={'c'},needs_props={'b'})
while True:
mav = ""
mbv = ""
mcv = ""
for ma in uv.get_meta('property-a'):
mav = ma["value"]
for mb in uv.get_meta('property-b'):
mbv = mb["value"]
for mc in uv.get_meta('property-c'):
mcv = mc["value"]
print("m: a=",mav," b=",mbv," c=",mcv,sep='')
uv.poll()
if mcv == "READY":
assert mav == "READY"
assert mbv == "READY"
break
print("Test successful")