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.
- Loading branch information
Showing
15 changed files
with
189 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,30 @@ | ||
#!/usr/bin/env bash | ||
# THIS FILE IS PART OF THE CYLC WORKFLOW 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/>. | ||
#------------------------------------------------------------------------------- | ||
|
||
# Check basic separate triggering of alpha, omega, and main graphs. | ||
. "$(dirname "$0")/test_header" | ||
set_test_number 3 | ||
|
||
install_and_validate | ||
|
||
reftest_run | ||
|
||
graph_workflow "${WORKFLOW_NAME}" "${WORKFLOW_NAME}.graph" | ||
cmp_ok "${WORKFLOW_NAME}.graph" "$TEST_SOURCE_DIR/${TEST_NAME_BASE}/reference.graph" | ||
|
||
purge |
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 @@ | ||
twat |
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,12 @@ | ||
|
||
[scheduling] | ||
cycling mode = integer | ||
final cycle point = 2 | ||
[[graph]] | ||
alpha = "a => b" | ||
omega = "x => y" | ||
R1 = "foo => bar" | ||
P1 = "bar => baz" | ||
[runtime] | ||
[[a, b, x, y]] | ||
[[foo, bar, baz]] |
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,13 @@ | ||
edge "alpha/a" "alpha/b" | ||
edge "1/bar" "1/baz" | ||
edge "2/bar" "2/baz" | ||
edge "1/foo" "1/bar" | ||
graph | ||
node "alpha/a" "a\nalpha" | ||
node "alpha/b" "b\nalpha" | ||
node "1/bar" "bar\n1" | ||
node "2/bar" "bar\n2" | ||
node "1/baz" "baz\n1" | ||
node "2/baz" "baz\n2" | ||
node "1/foo" "foo\n1" | ||
stop |
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,9 @@ | ||
alpha/a -triggered off [] in flow 1 | ||
alpha/b -triggered off ['alpha/a'] in flow 1 | ||
1/foo -triggered off [] in flow 2 | ||
2/bar -triggered off [] in flow 2 | ||
1/bar -triggered off ['1/foo'] in flow 2 | ||
2/baz -triggered off ['2/bar'] in flow 2 | ||
1/baz -triggered off ['1/bar'] in flow 2 | ||
omega/x -triggered off [] in flow 3 | ||
omega/y -triggered off ['omega/x'] in flow 3 |
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,34 @@ | ||
#!/usr/bin/env bash | ||
# THIS FILE IS PART OF THE CYLC WORKFLOW 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/>. | ||
#------------------------------------------------------------------------------- | ||
|
||
# Check restart in alpha, maind, and omega graphs. | ||
|
||
. "$(dirname "$0")/test_header" | ||
set_test_number 5 | ||
|
||
install_and_validate | ||
|
||
SRC_DIR="$TEST_SOURCE_DIR/${TEST_NAME_BASE}" | ||
RUN_DIR="$WORKFLOW_RUN_DIR" | ||
|
||
for RUN in 1 2 3 4; do | ||
cp "${SRC_DIR}/reference.log.$RUN" "${RUN_DIR}/reference.log" | ||
reftest_run "${TEST_NAME_BASE}-${RUN}" | ||
done | ||
|
||
purge |
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 @@ | ||
[scheduling] | ||
cycling mode = integer | ||
final cycle point = 2 | ||
[[graph]] | ||
alpha = "a => b" | ||
omega = "x => y" | ||
R1 = "foo => bar" | ||
P1 = "bar[-P1] => bar => baz" | ||
[runtime] | ||
[[a]] | ||
script = cylc stop $CYLC_WORKFLOW_ID | ||
[[b]] | ||
[[x]] | ||
script = cylc stop $CYLC_WORKFLOW_ID | ||
[[y]] | ||
[[foo]] | ||
[[bar]] | ||
script = """ | ||
if ((CYLC_TASK_CYCLE_POINT == 1)); then | ||
cylc stop $CYLC_WORKFLOW_ID | ||
fi | ||
""" | ||
[[baz]] |
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 @@ | ||
alpha/a -triggered off [] in flow 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,3 @@ | ||
alpha/b -triggered off ['alpha/a'] in flow 1 | ||
1/foo -triggered off [] in flow 2 | ||
1/bar -triggered off ['0/bar', '1/foo'] in flow 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,4 @@ | ||
1/baz -triggered off ['1/bar'] in flow 2 | ||
2/bar -triggered off ['1/bar'] in flow 2 | ||
2/baz -triggered off ['2/bar'] in flow 2 | ||
omega/x -triggered off [] in flow 3 |
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 @@ | ||
omega/y -triggered off ['omega/x'] in flow 3 |
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 @@ | ||
#!/usr/bin/env bash | ||
# THIS FILE IS PART OF THE CYLC WORKFLOW 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/>. | ||
#------------------------------------------------------------------------------- | ||
|
||
# Check manual triggering of alpha and omega graph tasks. | ||
|
||
. "$(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,24 @@ | ||
|
||
# 1. alpha graph completes | ||
# 2. then main graph starts, and triggers alpha/a and omega/x with --flow=none | ||
# 3. then when all tasks finish, omega graph runs | ||
|
||
# TODO alpha and omega graphs need special flow number treatment? | ||
|
||
[scheduling] | ||
[[graph]] | ||
alpha = "a => b" | ||
omega = "x => y" | ||
R1 = "foo => bar => baz" | ||
[runtime] | ||
[[a]] | ||
[[b]] | ||
[[x]] | ||
[[y]] | ||
[[foo]] | ||
[[bar]] | ||
script = """ | ||
cylc trigger --flow=none $CYLC_WORKFLOW_ID//alpha/a | ||
cylc trigger --flow=none $CYLC_WORKFLOW_ID//omega/x | ||
""" | ||
[[baz]] |
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,9 @@ | ||
alpha/a -triggered off [] in flow 1 | ||
alpha/b -triggered off ['alpha/a'] in flow 1 | ||
1/foo -triggered off [] in flow 2 | ||
1/bar -triggered off ['1/foo'] in flow 2 | ||
alpha/a -triggered off [] in flow none | ||
omega/x -triggered off [] in flow none | ||
1/baz -triggered off ['1/bar'] in flow 2 | ||
omega/x -triggered off [] in flow 3 | ||
omega/y -triggered off ['omega/x'] in flow 3 |
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 |