diff --git a/tests/functional/isolate-icp-fcp/00-simple.t b/tests/functional/isolate-icp-fcp/00-simple.t new file mode 100644 index 00000000000..e70525249ff --- /dev/null +++ b/tests/functional/isolate-icp-fcp/00-simple.t @@ -0,0 +1,22 @@ +#!/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 . +#------------------------------------------------------------------------------- +# Test optinoal isolation of initial and final cycle point graphs. +. "$(dirname "$0")/test_header" +set_test_number 2 +reftest +exit diff --git a/tests/functional/isolate-icp-fcp/00-simple/flow.cylc b/tests/functional/isolate-icp-fcp/00-simple/flow.cylc new file mode 100644 index 00000000000..bb1df47075c --- /dev/null +++ b/tests/functional/isolate-icp-fcp/00-simple/flow.cylc @@ -0,0 +1,30 @@ +# Test optional isolation of initial and final cycle point graphs. +[scheduler] + [[events]] + stall timeout = PT0S + abort on stall timeout = True +[scheduling] + cycling mode = integer + final cycle point = 3 + isolate initial cycle point = True + isolate final cycle point = True + [[graph]] + R1 = "prep => foo" + P1 = "foo" + R1/$ = "foo => clean" +[runtime] + [[prep]] + script = "sleep 5" + [[foo]] + script = """ + # No foo instance should start before prep is finished. + grep -s "1/prep running .* succeeded" "${CYLC_WORKFLOW_LOG_DIR}/log" + if ((CYLC_TASK_CYCLE_POINT == 1)); then + sleep 5 + fi + """ + [[clean]] + script = """ + # Clean should not run before 1/foo is finished. + grep -s "1/foo running .* succeeded" "${CYLC_WORKFLOW_LOG_DIR}/log" + """ diff --git a/tests/functional/isolate-icp-fcp/00-simple/reference.log b/tests/functional/isolate-icp-fcp/00-simple/reference.log new file mode 100644 index 00000000000..58e6d000d0c --- /dev/null +++ b/tests/functional/isolate-icp-fcp/00-simple/reference.log @@ -0,0 +1,5 @@ +1/prep -triggered off [] in flow 1 +1/foo -triggered off ['1/prep'] in flow 1 +2/foo -triggered off [] in flow 1 +3/foo -triggered off [] in flow 1 +3/clean -triggered off ['3/foo'] in flow 1 diff --git a/tests/functional/isolate-icp-fcp/test_header b/tests/functional/isolate-icp-fcp/test_header new file mode 120000 index 00000000000..90bd5a36f92 --- /dev/null +++ b/tests/functional/isolate-icp-fcp/test_header @@ -0,0 +1 @@ +../lib/bash/test_header \ No newline at end of file