Debian Codegraph @

tests/functional/spawn-on-demand/19-submitted-compat.t

raw
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 # Test the submitted and submit-failed triggers work correctly in back-compat
20 # mode. See https://github.com/cylc/cylc-flow/issues/5771
21
22 . "$(dirname "$0")/test_header"
23 set_test_number 4
24
25 init_workflow "${TEST_NAME_BASE}" << __FLOW__
26 [scheduler]
27 [[events]]
28 abort on stall timeout = True
29 stall timeout = PT0S
30
31 [scheduling]
32 [[graph]]
33 R1 = """
34 a
35 b
36 """
37
38 [runtime]
39 [[a]] # should complete
40 [[b]] # should not complete
41 platform = broken
42 __FLOW__
43
44 mv "$WORKFLOW_RUN_DIR/flow.cylc" "$WORKFLOW_RUN_DIR/suite.rc"
45
46 workflow_run_fail "${TEST_NAME_BASE}-run" \
47 cylc play "${WORKFLOW_NAME}" --no-detach
48
49 grep_workflow_log_ok \
50 "${TEST_NAME_BASE}-back-compat" \
51 'Backward compatibility mode ON'
52 grep_workflow_log_ok \
53 "${TEST_NAME_BASE}-a-complete" \
54 '\[1/a/01:running\] => succeeded'
55 grep_workflow_log_ok \
56 "${TEST_NAME_BASE}-b-incomplete" \
57 '1/b did not complete the required outputs:\n.*\n.*submitted.*\n.*succeeded\n' \
58 -Pizoq
59
60 purge