-
Notifications
You must be signed in to change notification settings - Fork 93
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Reload will no longer reset existing stop point.
- Loading branch information
1 parent
baab788
commit 57ebff0
Showing
4 changed files
with
88 additions
and
8 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
#!/bin/bash | ||
# THIS FILE IS PART OF THE CYLC SUITE ENGINE. | ||
# Copyright (C) 2008-2018 NIWA | ||
# | ||
# 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 set stop point then reload. Reload should not reset stop point. | ||
. "$(dirname "$0")/test_header" | ||
|
||
set_test_number 3 | ||
install_suite "${TEST_NAME_BASE}" "${TEST_NAME_BASE}" | ||
|
||
run_ok "${TEST_NAME_BASE}-validate" cylc validate "${SUITE_NAME}" | ||
suite_run_ok "${TEST_NAME_BASE}-run" \ | ||
cylc run --debug --no-detach --reference-test "${SUITE_NAME}" | ||
if ! which sqlite3 > /dev/null; then | ||
skip 1 "sqlite3 not installed?" | ||
purge_suite "${SUITE_NAME}" | ||
exit 0 | ||
fi | ||
sqlite3 "${SUITE_RUN_DIR}/.service/db" \ | ||
'SELECT cycle,name,run_status FROM task_jobs' | sort >'db.out' | ||
cmp_ok 'db.out' <<'__OUT__' | ||
1|reload|0 | ||
1|set-stop-point|0 | ||
1|t1|0 | ||
2|t1|0 | ||
3|t1|0 | ||
__OUT__ | ||
|
||
purge_suite "${SUITE_NAME}" | ||
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,7 @@ | ||
2016-07-08T14:53:12+01 INFO - Initial point: 1 | ||
2016-07-08T14:53:12+01 INFO - Final point: 5 | ||
2016-07-08T14:53:12+01 INFO - [set-stop-point.1] -triggered off [] | ||
2016-07-08T14:53:19+01 INFO - [reload.1] -triggered off ['set-stop-point.1'] | ||
2016-07-08T14:53:19+01 INFO - [t1.1] -triggered off ['reload.1'] | ||
2016-07-08T14:53:19+01 INFO - [t1.2] -triggered off ['t1.1'] | ||
2016-07-08T14:53:19+01 INFO - [t1.3] -triggered off ['t1.2'] |
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,33 @@ | ||
#!Jinja2 | ||
[cylc] | ||
[[events]] | ||
abort on stalled = True | ||
[[reference test]] | ||
live mode suite timeout = PT1M | ||
required run mode = live | ||
[scheduling] | ||
cycling mode = integer | ||
initial cycle point = 1 | ||
final cycle point = 5 | ||
[[dependencies]] | ||
[[[R1]]] | ||
graph="set-stop-point => reload => t1" | ||
[[[P1]]] | ||
graph="t1[-P1] => t1" | ||
|
||
[runtime] | ||
[[set-stop-point]] | ||
script=cylc stop "${CYLC_SUITE_NAME}" '3' | ||
[[reload]] | ||
script=""" | ||
wait "${CYLC_TASK_MESSAGE_STARTED_PID}" 2>/dev/null || true | ||
cylc reload "${CYLC_SUITE_NAME}" | ||
LOG="${CYLC_SUITE_LOG_DIR}/log" | ||
while ! grep -q 'Reload completed' "${LOG}"; do | ||
sleep 1 # make sure reload completes | ||
done | ||
""" | ||
[[[job]]] | ||
execution time limit = PT1M | ||
[[t1]] | ||
script=true |