Skip to content

Commit

Permalink
test #4619
Browse files Browse the repository at this point in the history
  • Loading branch information
oliver-sanders committed Feb 2, 2022
1 parent 71d8689 commit ef23652
Show file tree
Hide file tree
Showing 3 changed files with 49 additions and 0 deletions.
25 changes: 25 additions & 0 deletions tests/functional/spawn-on-demand/13-trigger-runahead.t
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
#!/usr/bin/env bash
# THIS FILE IS PART OF THE CYLC WORKFLOW ENGINE.
# Copyright (C) NIWA & British Crown (Met Office) & Contributors.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#-------------------------------------------------------------------------------

# Check correct behaviour if a parentless task is manually triggered whilst
# runahead-limited. See GitHub #4619.

. "$(dirname "$0")/test_header"
set_test_number 2
reftest
exit
18 changes: 18 additions & 0 deletions tests/functional/spawn-on-demand/13-trigger-runahead/flow.cylc
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# This workflow should behave the same as if foo.1 did not trigger foo.2.

[scheduling]
cycling mode = integer
initial cycle point = 1
final cycle point = 4
runahead limit = P1
[[graph]]
P1 = foo
[runtime]
[[foo]]
script = """
cylc__job__wait_cylc_message_started
if ((CYLC_TASK_CYCLE_POINT == 1)); then
# Force trigger next instance while it is runahead limited.
cylc trigger $CYLC_WORKFLOW_NAME//3/foo
fi
"""
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
Initial point: 1
Final point: 3
1/foo -triggered off []
2/foo -triggered off []
3/foo -triggered off []
4/foo -triggered off []

0 comments on commit ef23652

Please sign in to comment.