• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1import time
2
3print "--SELFTEST-- loading test"
4
5us = [
6	'127.0.0.1#P1',
7	'127.0.0.1#P2',
8	'127.0.0.1#P3',
9	'127.0.0.1#P4',
10	'127.0.0.1#P5'
11]
12
13def payload1(wait, n):
14	time.sleep(wait)
15
16	print "--STEPTEST-- payload1 start"
17
18	b = job.barrier('127.0.0.1#P%d' % (n), 'here', 60)
19	b.rendezvous(*us)
20
21	print "--STEPTEST-- payload1 complete"
22
23def payload2(wait, n):
24	time.sleep(wait)
25	print "--STEPTEST-- payload2 start"
26
27	b = job.barrier('127.0.0.1#P%d' % (n), 'here', 60)
28	b.rendezvous(*us)
29
30	time.sleep(1)
31	print "--STEPTEST-- payload2 complete"
32
33job.parallel(
34	[payload2, 5,  1],
35	[payload2, 10, 2],
36	[payload1, 15, 3],
37	[payload2, 20, 4],
38	[payload2, 25, 5]
39)
40