-
Notifications
You must be signed in to change notification settings - Fork 94
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix param expansion in inherited environment. (#4248)
* Fix param expansion in inherited environment. * Update change log. * Extend functional test. * Code tidy. * Make prev fix work regardless of namespace order. * Extend param test again.
- Loading branch information
Showing
14 changed files
with
71 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,40 @@ | ||
[task parameters] | ||
num = 99..101..2 | ||
stuff = this, that | ||
state = open, closed | ||
[scheduling] | ||
[[graph]] | ||
R1 = "t1<num,stuff> => t2<num,stuff>" | ||
R1 = """ | ||
t1<num,stuff> => t2<num,stuff> | ||
x<stuff> | ||
""" | ||
[runtime] | ||
[[T]] | ||
[[[environment]]] | ||
MYNUM = %(num)d | ||
MYSTUFF = stuff %(stuff)s | ||
MY_FILE = %(num)04d-%(stuff)s | ||
[[U<state>]] | ||
[[[environment]]] | ||
STATUS = %(state)s | ||
[[t1<num,stuff>]] | ||
inherit = T | ||
inherit = T, U<state=open> | ||
script = """ | ||
echo "${MYNUM} and ${MYSTUFF}" >"${CYLC_WORKFLOW_RUN_DIR}/${MY_FILE}" | ||
""" | ||
FILE="${CYLC_WORKFLOW_RUN_DIR}/t1-${MY_FILE}" | ||
echo "${MYNUM} ${MYSTUFF} ${STATUS}" >"${FILE}" | ||
diff ${FILE} ${FILE}.ref | ||
""" | ||
[[t2<num,stuff>]] | ||
inherit = T | ||
inherit = T, U<state=closed> | ||
script = """ | ||
test "${MYNUM} and ${MYSTUFF}" = "$(<"${CYLC_WORKFLOW_RUN_DIR}/${MY_FILE}")" | ||
""" | ||
FILE="${CYLC_WORKFLOW_RUN_DIR}/t2-${MY_FILE}" | ||
echo "${MYNUM} ${MYSTUFF} ${STATUS}" >"${FILE}" | ||
diff ${FILE} ${FILE}.ref | ||
""" | ||
# The following tests the example of GH #4248. We had wrongly assumed that | ||
# general comes before specific, for parameters in inherited environments. | ||
[[x<stuff=that>]] | ||
inherit = U<state=closed> | ||
script = test $STATUS == closed | ||
[[x<stuff>]] | ||
pre-script = "echo pre" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,13 @@ | ||
2017-01-12T14:46:57Z INFO - Initial point: 1 | ||
2017-01-12T14:46:57Z INFO - Final point: 1 | ||
2017-01-12T14:46:57Z INFO - [t1_num099_this.1] -triggered off [] | ||
2017-01-12T14:47:00Z INFO - [t2_num099_this.1] -triggered off ['t1_num099_this.1'] | ||
2017-01-12T14:46:57Z INFO - [t1_num099_that.1] -triggered off [] | ||
2017-01-12T14:47:00Z INFO - [t2_num099_that.1] -triggered off ['t1_num099_that.1'] | ||
2017-01-12T14:46:57Z INFO - [t1_num101_this.1] -triggered off [] | ||
2017-01-12T14:47:00Z INFO - [t2_num101_this.1] -triggered off ['t1_num101_this.1'] | ||
2017-01-12T14:46:57Z INFO - [t1_num101_that.1] -triggered off [] | ||
2017-01-12T14:47:00Z INFO - [t2_num101_that.1] -triggered off ['t1_num101_that.1'] | ||
Initial point: 1 | ||
Final point: 1 | ||
[t1_num099_this.1] -triggered off [] | ||
[t2_num099_this.1] -triggered off ['t1_num099_this.1'] | ||
[t1_num099_that.1] -triggered off [] | ||
[t2_num099_that.1] -triggered off ['t1_num099_that.1'] | ||
[t1_num101_this.1] -triggered off [] | ||
[t2_num101_this.1] -triggered off ['t1_num101_this.1'] | ||
[t1_num101_that.1] -triggered off [] | ||
[t2_num101_that.1] -triggered off ['t1_num101_that.1'] | ||
[x_that.1] -triggered off [] | ||
[x_this.1] -triggered off [] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
99 stuff that open |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
99 stuff this open |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
101 stuff that open |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
101 stuff this open |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
99 stuff that closed |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
99 stuff this closed |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
101 stuff that closed |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
101 stuff this closed |