forked from cylc/cylc-flow
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
cylc#119: auto-detect minimum task repetition
- Loading branch information
1 parent
d8d7213
commit 3b8e15d
Showing
10 changed files
with
239 additions
and
37 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
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
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
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
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,46 @@ | ||
#!/bin/bash | ||
#C: THIS FILE IS PART OF THE CYLC SUITE ENGINE. | ||
#C: Copyright (C) 2008-2014 Hilary Oliver, NIWA | ||
#C: | ||
#C: This program is free software: you can redistribute it and/or modify | ||
#C: it under the terms of the GNU General Public License as published by | ||
#C: the Free Software Foundation, either version 3 of the License, or | ||
#C: (at your option) any later version. | ||
#C: | ||
#C: This program is distributed in the hope that it will be useful, | ||
#C: but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
#C: MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
#C: GNU General Public License for more details. | ||
#C: | ||
#C: You should have received a copy of the GNU General Public License | ||
#C: along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
#------------------------------------------------------------------------------- | ||
#C: Test default runahead limit behaviour is still the same | ||
. $(dirname $0)/test_header | ||
#------------------------------------------------------------------------------- | ||
set_test_number 5 | ||
#------------------------------------------------------------------------------- | ||
install_suite $TEST_NAME_BASE default-complex | ||
#------------------------------------------------------------------------------- | ||
TEST_NAME=$TEST_NAME_BASE-validate | ||
run_ok $TEST_NAME cylc validate -v $SUITE_NAME | ||
grep_ok "Runahead limit: PT4H" $TEST_NAME.stdout | ||
#------------------------------------------------------------------------------- | ||
TEST_NAME=$TEST_NAME_BASE-run | ||
run_fail $TEST_NAME cylc run --debug $SUITE_NAME | ||
#------------------------------------------------------------------------------- | ||
TEST_NAME=$TEST_NAME_BASE-check-fail | ||
DB=$(cylc get-global-config --print-run-dir)/$SUITE_NAME/cylc-suite.db | ||
RUNAHEAD=$(sqlite3 $DB "select max(cycle) from task_states") | ||
# manual comparison for the test | ||
if [[ "$RUNAHEAD" == "20100101T0400Z" ]]; then | ||
ok $TEST_NAME | ||
else | ||
fail $TEST_NAME | ||
fi | ||
#------------------------------------------------------------------------------- | ||
TEST_NAME=$TEST_NAME_BASE-check-timeout | ||
LOG=$(cylc get-global-config --print-run-dir)/$SUITE_NAME/log/suite/log | ||
run_ok $TEST_NAME grep 'Abort on suite timeout is set' $LOG | ||
#------------------------------------------------------------------------------- | ||
purge_suite $SUITE_NAME |
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,48 @@ | ||
#!/bin/bash | ||
#C: THIS FILE IS PART OF THE CYLC SUITE ENGINE. | ||
#C: Copyright (C) 2008-2014 Hilary Oliver, NIWA | ||
#C: | ||
#C: This program is free software: you can redistribute it and/or modify | ||
#C: it under the terms of the GNU General Public License as published by | ||
#C: the Free Software Foundation, either version 3 of the License, or | ||
#C: (at your option) any later version. | ||
#C: | ||
#C: This program is distributed in the hope that it will be useful, | ||
#C: but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
#C: MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
#C: GNU General Public License for more details. | ||
#C: | ||
#C: You should have received a copy of the GNU General Public License | ||
#C: along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
#------------------------------------------------------------------------------- | ||
#C: Test default runahead limit behaviour is still the same | ||
. $(dirname $0)/test_header | ||
#------------------------------------------------------------------------------- | ||
set_test_number 5 | ||
#------------------------------------------------------------------------------- | ||
install_suite $TEST_NAME_BASE default-future | ||
#------------------------------------------------------------------------------- | ||
TEST_NAME=$TEST_NAME_BASE-validate | ||
run_ok $TEST_NAME cylc validate -v $SUITE_NAME | ||
grep_ok "Runahead limit: PT8H" $TEST_NAME.stdout | ||
cat $TEST_NAME.stdout >/dev/tty | ||
cat $TEST_NAME.stderr >/dev/tty | ||
#------------------------------------------------------------------------------- | ||
TEST_NAME=$TEST_NAME_BASE-run | ||
run_fail $TEST_NAME cylc run --debug $SUITE_NAME | ||
#------------------------------------------------------------------------------- | ||
TEST_NAME=$TEST_NAME_BASE-check-fail | ||
DB=$(cylc get-global-config --print-run-dir)/$SUITE_NAME/cylc-suite.db | ||
RUNAHEAD=$(sqlite3 $DB "select max(cycle) from task_states") | ||
# manual comparison for the test | ||
if [[ "$RUNAHEAD" == "20100101T0800Z" ]]; then | ||
ok $TEST_NAME | ||
else | ||
fail $TEST_NAME | ||
fi | ||
#------------------------------------------------------------------------------- | ||
TEST_NAME=$TEST_NAME_BASE-check-timeout | ||
LOG=$(cylc get-global-config --print-run-dir)/$SUITE_NAME/log/suite/log | ||
run_ok $TEST_NAME grep 'Abort on suite timeout is set' $LOG | ||
#------------------------------------------------------------------------------- | ||
purge_suite $SUITE_NAME |
File renamed without changes.
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,24 @@ | ||
[cylc] | ||
UTC mode = True | ||
[[event hooks]] | ||
timeout = 0.1 | ||
abort on timeout = True | ||
[scheduling] | ||
initial cycle point = 20100101T00 | ||
final cycle point = 20100105T00 | ||
[[dependencies]] | ||
# T00, T07, T14, ... | ||
[[[PT7H]]] | ||
graph = "foo => bar" | ||
# T00, T12, T18... 2 hours difference | ||
[[[T00, T12, T18]]] | ||
graph = "foo" | ||
[[[T04]]] | ||
graph = "run_ok" | ||
[[[T05]]] | ||
graph = "never_run" | ||
[runtime] | ||
[[foo]] | ||
command scripting = false | ||
[[bar]] | ||
command scripting = true |
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,23 @@ | ||
[cylc] | ||
UTC mode = True | ||
[[event hooks]] | ||
timeout = 0.1 | ||
abort on timeout = True | ||
[scheduling] | ||
initial cycle point = 20100101T00 | ||
final cycle point = 20100105T00 | ||
[[dependencies]] | ||
# Every hour, so would expect a 2 hour runahead limit. | ||
[[[PT1H]]] | ||
graph = "foo => bar" | ||
# A 6 hour future trigger, => 2 + 6 = 8 hour runahead limit. | ||
[[[T04/PT6H]]] | ||
graph = """ | ||
baz[+PT6H] => bar | ||
baz | ||
""" | ||
[runtime] | ||
[[foo]] | ||
command scripting = false | ||
[[bar]] | ||
command scripting = true |
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