-
Notifications
You must be signed in to change notification settings - Fork 94
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
128 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
#!/bin/bash | ||
# THIS FILE IS PART OF THE CYLC SUITE 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/>. | ||
#------------------------------------------------------------------------------- | ||
# Test cylc remove | ||
. "$(dirname "$0")/test_header" | ||
set_test_number 2 | ||
reftest | ||
exit |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
2013/10/02 11:54:04 INFO - Initial point: 1 | ||
2013/10/02 11:54:04 INFO - Final point: 1 | ||
2013/10/02 11:54:04 INFO - [a.1] -triggered off [] | ||
2013/10/02 11:54:11 INFO - [cleaner.1] -triggered off [] | ||
2013/10/02 11:54:07 INFO - [b.1] -triggered off ['a.1'] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
# Abort on timeout unless we remove unhandled failed and waiting task. | ||
[cylc] | ||
[[reference test]] | ||
expected task failures = b.1 | ||
[[events]] | ||
timeout = PT20S | ||
abort on timeout = True | ||
[scheduling] | ||
[[graph]] | ||
R1 = """a => b => c | ||
cleaner""" | ||
[runtime] | ||
[[a,c]] | ||
script = true | ||
[[b]] | ||
script = false | ||
[[cleaner]] | ||
script = """ | ||
cylc__job__poll_grep_suite_log 'b\.1.* failed' | ||
# Remove the unhandled failed task. | ||
cylc remove "$CYLC_SUITE_NAME" 'b.1' | ||
# Remove waiting c.1 | ||
# (not auto-removed because parent b.1, an unhandled fail, is not finished.) | ||
cylc remove "$CYLC_SUITE_NAME" '1/c:waiting' | ||
""" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
#!/bin/bash | ||
# THIS FILE IS PART OF THE CYLC SUITE 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/>. | ||
#------------------------------------------------------------------------------- | ||
# Test cylc remove in a cycling suite (spawn before remove, and not). | ||
. "$(dirname "$0")/test_header" | ||
set_test_number 2 | ||
reftest | ||
exit |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
2016-07-07T22:17:12Z INFO - Run mode: live | ||
2016-07-07T22:17:12Z INFO - Initial point: 2020 | ||
2016-07-07T22:17:12Z INFO - Final point: 2021 | ||
2016-07-07T22:17:12Z INFO - Cold Start 2020 | ||
2016-07-07T22:17:12Z INFO - [remover.2020] -triggered off [] | ||
2016-07-07T22:17:12Z INFO - [foo.2020] -triggered off [] | ||
2016-07-07T22:17:14Z INFO - [foo.2021] -triggered off [] | ||
2016-07-07T22:17:29Z INFO - [bar.2020] -triggered off ['foo.2020'] | ||
2016-07-07T22:17:29Z INFO - [bar.2021] -triggered off ['foo.2021'] | ||
2016-07-07T22:17:29Z INFO - [baz.2020] -triggered off ['foo.2020'] | ||
2016-07-07T22:17:29Z INFO - [baz.2021] -triggered off ['foo.2021'] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
# Abort on timeout unless we successfully remove some failed and waiting tasks. | ||
[cylc] | ||
UTC mode = True | ||
cycle point format = %Y | ||
[[reference test]] | ||
expected task failures = bar.2020, baz.2021 | ||
[[events]] | ||
timeout = PT30S | ||
abort on timeout = True | ||
[scheduling] | ||
initial cycle point = 2020 | ||
final cycle point = 2021 | ||
[[graph]] | ||
R1 = remover | ||
P1Y = foo => bar & baz => waz | ||
[runtime] | ||
[[remover]] | ||
script = """ | ||
cylc__job__poll_grep_suite_log 'bar.2020.* failed' | ||
cylc__job__poll_grep_suite_log 'baz.2021.* failed' | ||
# Remove the two unhandled failed tasks. | ||
cylc remove $CYLC_SUITE_NAME */ba*:failed | ||
# Remove the two unsatisfied waiting tasks. | ||
cylc remove $CYLC_SUITE_NAME */waz | ||
# Exit so suite can shut down. | ||
""" | ||
[[foo, waz]] | ||
script = true | ||
[[bar]] | ||
script = """ | ||
if [[ $CYLC_TASK_CYCLE_POINT == 2020 ]]; then | ||
false | ||
else | ||
true | ||
fi""" | ||
[[baz]] | ||
script = """ | ||
if [[ $CYLC_TASK_CYCLE_POINT == 2021 ]]; then | ||
false | ||
else | ||
true | ||
fi""" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../lib/bash/test_header |