-
Notifications
You must be signed in to change notification settings - Fork 90
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
scheduler, task_pool, task_proxy refactor
Test `cylc reset --output=OUTPUT ...`. Test `cylc submit FAM.CYCLE` - multi-level family.
- Loading branch information
1 parent
e5eeeb3
commit db0b2c6
Showing
10 changed files
with
173 additions
and
13 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
#!/bin/bash | ||
# THIS FILE IS PART OF THE CYLC SUITE ENGINE. | ||
# Copyright (C) 2008-2017 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 "cylc reset --output='TRIGGER|MESSAGE' 'SUITE' 'TASK.ID'". | ||
. "$(dirname "$0")/test_header" | ||
|
||
set_test_number 2 | ||
install_suite "${TEST_NAME_BASE}" "${TEST_NAME_BASE}" | ||
|
||
run_ok "${TEST_NAME_BASE}-validate" cylc validate "${SUITE_NAME}" | ||
run_ok "${TEST_NAME_BASE}" cylc run --reference-test --debug "${SUITE_NAME}" | ||
|
||
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,6 @@ | ||
2016-01-14T11:55:10Z INFO - Initial point: 1 | ||
2016-01-14T11:55:10Z INFO - Final point: 1 | ||
2016-01-14T11:55:10Z INFO - [t1.1] -triggered off [] | ||
2016-01-14T11:55:10Z INFO - [t2.1] -triggered off [] | ||
2016-01-14T11:55:10Z INFO - [t3.1] -triggered off ['t1.1', 't2.1'] | ||
2016-01-14T11:55:13Z INFO - [t4.1] -triggered off ['t1.1', 't2.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,39 @@ | ||
[cylc] | ||
UTC mode = True | ||
[[events]] | ||
abort on stalled = True | ||
[[reference test]] | ||
live mode suite timeout = PT1M | ||
required run mode = live | ||
[scheduling] | ||
[[dependencies]] | ||
graph = """ | ||
t1 => t3 | ||
t2 => t3 | ||
t1:hello & t2:greet => t4 | ||
""" | ||
[runtime] | ||
[[t1]] | ||
script=true | ||
[[[outputs]]] | ||
hello = Hello World | ||
[[t2]] | ||
script=true | ||
[[[outputs]]] | ||
greet = Greet World | ||
[[t3]] | ||
script = """ | ||
LOG="${CYLC_SUITE_LOG_DIR}/log" | ||
cylc reset --debug --output=hello "${CYLC_SUITE_NAME}" 't1.1' | ||
while ! grep -qF '[t1.1] -reset output to complete: hello' "${LOG}"; do | ||
sleep 1 # make sure reset completes | ||
done | ||
cylc reset --debug --output='Greet World' "${CYLC_SUITE_NAME}" 't2.1' | ||
while ! grep -qF '[t2.1] -reset output to complete: Greet World' "${LOG}"; do | ||
sleep 1 # make sure reset completes | ||
done | ||
""" | ||
[[[job]]] | ||
execution time limit = PT30S | ||
[[t4]] | ||
script = 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,41 @@ | ||
#!/bin/bash | ||
# THIS FILE IS PART OF THE CYLC SUITE ENGINE. | ||
# Copyright (C) 2008-2017 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 "cylc reset --output='!OUTPUT' 'SUITE' 'TASK.ID'". | ||
. "$(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}" | ||
run_ok "${TEST_NAME_BASE}" cylc run --reference-test --debug "${SUITE_NAME}" | ||
cmp_ok "${SUITE_RUN_DIR}/cylc-show.out" <<'__OUT__' | ||
title: (not given) | ||
description: (not given) | ||
prerequisites (- => not satisfied): | ||
(None) | ||
outputs (- => not completed): | ||
+ t1.1 submitted | ||
+ t1.1 started | ||
+ t1.1 succeeded | ||
- t1.1 Greet World | ||
- t1.1 Hello World | ||
__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,4 @@ | ||
2016-01-14T11:55:10Z INFO - Initial point: 1 | ||
2016-01-14T11:55:10Z INFO - Final point: 1 | ||
2016-01-14T11:55:10Z INFO - [t1.1] -triggered off [] | ||
2016-01-14T11:55:10Z INFO - [t2.1] -triggered off ['t1.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,30 @@ | ||
[cylc] | ||
UTC mode = True | ||
[[events]] | ||
abort on stalled = True | ||
[[reference test]] | ||
live mode suite timeout = PT1M | ||
required run mode = live | ||
[scheduling] | ||
[[dependencies]] | ||
graph = t1 => t2 | ||
[runtime] | ||
[[t1]] | ||
script=true | ||
[[[outputs]]] | ||
hello = Hello World | ||
greet = Greet World | ||
[[t2]] | ||
script = """ | ||
LOG="${CYLC_SUITE_LOG_DIR}/log" | ||
cylc reset --output='!hello' --output='!Greet World' "${CYLC_SUITE_NAME}" 't1.1' | ||
while ! grep -qF -e '[t1.1] -reset output to incomplete: hello' "${LOG}"; do | ||
sleep 1 # make sure reset completes | ||
done | ||
while ! grep -qF '[t1.1] -reset output to incomplete: Greet World' "${LOG}"; do | ||
sleep 1 # make sure reset completes | ||
done | ||
cylc show "${CYLC_SUITE_NAME}" 't1.1' >"${CYLC_SUITE_RUN_DIR}/cylc-show.out" | ||
""" | ||
[[[job]]] | ||
execution time limit = PT30S |
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