| 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 large window size using graphql and find tasks in window. |
| 20 |
# This is helpful with coverage by using most the no-rewalk mechanics. |
| 21 |
|
| 22 |
. "$(dirname "$0")/test_header" |
| 23 |
|
| 24 |
set_test_number 5 |
| 25 |
|
| 26 |
install_workflow "${TEST_NAME_BASE}" "${TEST_NAME_BASE}" |
| 27 |
|
| 28 |
TEST_NAME="${TEST_NAME_BASE}-validate" |
| 29 |
run_ok "${TEST_NAME}" cylc validate "${WORKFLOW_NAME}" |
| 30 |
|
| 31 |
TEST_NAME="${TEST_NAME_BASE}-run" |
| 32 |
# 'a => b => . . . f => g => h', 'a' sets window size to 5, |
| 33 |
# 'b => i => j => f', 'c' finds 'a', 'j', 'h' |
| 34 |
workflow_run_ok "${TEST_NAME}" cylc play --no-detach --debug "${WORKFLOW_NAME}" |
| 35 |
|
| 36 |
TEST_NAME="${TEST_NAME_BASE}-show-a.past" |
| 37 |
contains_ok "$WORKFLOW_RUN_DIR/show-a.txt" <<__END__ |
| 38 |
state: succeeded |
| 39 |
prerequisites: (None) |
| 40 |
__END__ |
| 41 |
|
| 42 |
TEST_NAME="${TEST_NAME_BASE}-show-j.parallel" |
| 43 |
contains_ok "${WORKFLOW_RUN_DIR}/show-j.txt" <<__END__ |
| 44 |
state: waiting |
| 45 |
prerequisites: ('⨯': not satisfied) |
| 46 |
⨯ 1/i succeeded |
| 47 |
__END__ |
| 48 |
|
| 49 |
TEST_NAME="${TEST_NAME_BASE}-show-h.future" |
| 50 |
contains_ok "${WORKFLOW_RUN_DIR}/show-h.txt" <<__END__ |
| 51 |
state: waiting |
| 52 |
prerequisites: ('⨯': not satisfied) |
| 53 |
⨯ 1/g succeeded |
| 54 |
__END__ |
| 55 |
|
| 56 |
purge |