Debian Codegraph @

tests/functional/param_expand/03-env-tmpl/flow.cylc

raw
1 [task parameters]
2 num = 99..101..2
3 stuff = this, that
4 state = open, closed
5 [scheduling]
6 [[graph]]
7 R1 = """
8 t1<num,stuff> => t2<num,stuff>
9 x<stuff>
10 """
11 [runtime]
12 [[T]]
13 [[[environment]]]
14 MYNUM = %(num)d
15 MYSTUFF = stuff %(stuff)s
16 MY_FILE = %(num)04d-%(stuff)s
17 [[U<state>]]
18 [[[environment]]]
19 STATUS = %(state)s
20 [[t1<num,stuff>]]
21 inherit = T, U<state=open>
22 script = """
23 FILE="${CYLC_WORKFLOW_RUN_DIR}/t1-${MY_FILE}"
24 echo "${MYNUM} ${MYSTUFF} ${STATUS}" >"${FILE}"
25 diff ${FILE} ${FILE}.ref
26 """
27 [[t2<num,stuff>]]
28 inherit = T, U<state=closed>
29 script = """
30 FILE="${CYLC_WORKFLOW_RUN_DIR}/t2-${MY_FILE}"
31 echo "${MYNUM} ${MYSTUFF} ${STATUS}" >"${FILE}"
32 diff ${FILE} ${FILE}.ref
33 """
34 # The following tests the example of GH #4248. We had wrongly assumed that
35 # general comes before specific, for parameters in inherited environments.
36 [[x<stuff=that>]]
37 inherit = U<state=closed>
38 script = test $STATUS == closed
39 [[x<stuff>]]
40 pre-script = "echo pre"