Skip to content

Commit e2a8afc

Browse files
committed
Add a functional test.
1 parent 4a5975b commit e2a8afc

File tree

3 files changed

+54
-0
lines changed

3 files changed

+54
-0
lines changed
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
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+
19+
# Check that attempting to set an invalid prerequisite doesn't prevent the target
20+
# task from spawning later on - https://github.com/cylc/cylc-flow/pull/6691
21+
22+
. "$(dirname "$0")/test_header"
23+
set_test_number 2
24+
25+
install_and_validate
26+
reftest_run
27+
28+
purge
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
[scheduler]
2+
[[events]]
3+
inactivity timeout = PT1M
4+
abort on inactivity timeout = True
5+
stall timeout = PT0S
6+
abort on stall timeout = True
7+
8+
[scheduling]
9+
[[graph]]
10+
R1 = "foo => bar => baz"
11+
[runtime]
12+
[[foo]]
13+
script = """
14+
# set an invalid prerequisite...
15+
cylc set --pre=1/foo ${CYLC_WORKFLOW_ID}//1/baz
16+
cylc__job__poll_grep_workflow_log '1/baz does not depend on "1/foo:succeeded"'
17+
18+
# ...it should not stop us from successfully setting a valid one
19+
cylc set --pre=1/bar ${CYLC_WORKFLOW_ID}//1/baz
20+
cylc__job__poll_grep_workflow_log -E '1/baz.* => succeeded'
21+
"""
22+
[[bar]]
23+
[[baz]]
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
1/foo -triggered off [] in flow 1
2+
1/baz -triggered off ['1/bar'] in flow 1
3+
1/bar -triggered off ['1/foo'] in flow 1

0 commit comments

Comments
 (0)