| 1 |
#!/usr/bin/env bash |
| 2 |
# THIS FILE IS PART OF THE CYLC WORKFLOW ENGINE. |
| 3 |
# Copyright (C) NIWA & British Crown (Met Office) & Contributors. |
| 4 |
# |
| 5 |
# This program is free software: you can redistribute it and/or modify |
| 6 |
# it under the terms of the GNU General Public License as published by |
| 7 |
# the Free Software Foundation, either version 3 of the License, or |
| 8 |
# (at your option) any later version. |
| 9 |
# |
| 10 |
# This program is distributed in the hope that it will be useful, |
| 11 |
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 12 |
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 13 |
# GNU General Public License for more details. |
| 14 |
# |
| 15 |
# You should have received a copy of the GNU General Public License |
| 16 |
# along with this program. If not, see <http://www.gnu.org/licenses/>. |
| 17 |
#------------------------------------------------------------------------------- |
| 18 |
# Test: family-OR logic pre-initial simplification bug (#1626). |
| 19 |
. "$(dirname "$0")/test_header" |
| 20 |
set_test_number 3 |
| 21 |
|
| 22 |
cat >'flow.cylc' <<'__FLOW_CONFIG__' |
| 23 |
[scheduler] |
| 24 |
UTC mode = True |
| 25 |
[scheduling] |
| 26 |
initial cycle point = 2000 |
| 27 |
[[graph]] |
| 28 |
T00 = """ |
| 29 |
A? |
| 30 |
B? |
| 31 |
A[-PT24H]:fail-any? | B[-PT24H]:fail-any? => c |
| 32 |
""" |
| 33 |
[runtime] |
| 34 |
[[A]] |
| 35 |
[[B]] |
| 36 |
[[a1]] |
| 37 |
inherit = A |
| 38 |
[[b1a, b2a, b3a]] |
| 39 |
inherit = B |
| 40 |
[[c]] |
| 41 |
__FLOW_CONFIG__ |
| 42 |
|
| 43 |
run_ok "${TEST_NAME_BASE}-validate" cylc validate "${PWD}" |
| 44 |
|
| 45 |
graph_workflow "${PWD}" "graph.plain" \ |
| 46 |
-g A -g B -g X 20000101T0000Z 20000103T0000Z |
| 47 |
cmp_ok 'graph.plain' - <<'__GRAPH__' |
| 48 |
edge "20000101T0000Z/A" "20000102T0000Z/c" |
| 49 |
edge "20000101T0000Z/B" "20000102T0000Z/c" |
| 50 |
edge "20000102T0000Z/A" "20000103T0000Z/c" |
| 51 |
edge "20000102T0000Z/B" "20000103T0000Z/c" |
| 52 |
graph |
| 53 |
node "20000101T0000Z/A" "A\n20000101T0000Z" |
| 54 |
node "20000101T0000Z/B" "B\n20000101T0000Z" |
| 55 |
node "20000101T0000Z/c" "c\n20000101T0000Z" |
| 56 |
node "20000102T0000Z/A" "A\n20000102T0000Z" |
| 57 |
node "20000102T0000Z/B" "B\n20000102T0000Z" |
| 58 |
node "20000102T0000Z/c" "c\n20000102T0000Z" |
| 59 |
node "20000103T0000Z/A" "A\n20000103T0000Z" |
| 60 |
node "20000103T0000Z/B" "B\n20000103T0000Z" |
| 61 |
node "20000103T0000Z/c" "c\n20000103T0000Z" |
| 62 |
stop |
| 63 |
__GRAPH__ |
| 64 |
|
| 65 |
grep_ok "Ignoring undefined family X" "graph.plain.err" |
| 66 |
|
| 67 |
exit |