Debian Codegraph @

tests/functional/broadcast/03-expire/flow.cylc

raw
1 [meta]
2 title=broadcast expire
3 description=Test broadcast expire option
4
5 [scheduler]
6 UTC mode = True
7
8 [scheduling]
9 initial cycle point = 2020
10 final cycle point = 2025
11 [[graph]]
12 P5Y="""
13 broadcast => t1 => broadcast-expire => t2
14 t2[-P5Y] => broadcast-expire
15 """
16
17 [runtime]
18 [[broadcast]]
19 script = """
20 cylc broadcast \
21 -s '[environment]FABRIC=Wool' \
22 -s "[environment]ORGANISM=sheep" \
23 -p "${CYLC_TASK_CYCLE_POINT}" \
24 -n 'F1' \
25 "${CYLC_WORKFLOW_ID}" \
26 | tee 'broadcast.out'
27 """
28 post-script = """
29 diff -u - 'broadcast.out' <<__OUT__
30 Broadcast set:
31 + [${CYLC_TASK_CYCLE_POINT}/F1] [environment]FABRIC=Wool
32 + [${CYLC_TASK_CYCLE_POINT}/F1] [environment]ORGANISM=sheep
33 __OUT__
34 """
35 [[broadcast-expire]]
36 script = """
37 NEXT_CYCLE_POINT=$(cylc cycletime --offset=P5Y)
38 cylc broadcast --expire="${NEXT_CYCLE_POINT}" "${CYLC_WORKFLOW_ID}" \
39 | tee 'broadcast.out'
40 """
41 post-script = """
42 diff -u - 'broadcast.out' <<__OUT__
43 Broadcast cancelled:
44 - [${CYLC_TASK_CYCLE_POINT}/F1] [environment]FABRIC=Wool
45 - [${CYLC_TASK_CYCLE_POINT}/F1] [environment]ORGANISM=sheep
46 __OUT__
47 """
48 [[F1]]
49 script = """
50 echo "${FABRIC} is from ${ORGANISM}." | tee 'echo.out'
51 """
52 [[[environment]]]
53 FABRIC=Silk
54 ORGANISM=silk worm
55 [[t1]]
56 inherit=F1
57 post-script="""
58 diff -u - 'echo.out' <<<'Wool is from sheep.'
59 """
60 [[t2]]
61 inherit=F1
62 post-script="""
63 diff -u - 'echo.out' <<<'Silk is from silk worm.'
64 """