-
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.
job.sh: fix ERR trap in semicolon commands
Turn on `set -e` so that if `cmd1` fails in a `cmd1; cmd2` syntax, the failure is trapped.
- Loading branch information
1 parent
0e646ae
commit 59ce9cd
Showing
7 changed files
with
52 additions
and
4 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 |
---|---|---|
@@ -1,4 +1,5 @@ | ||
[cylc] | ||
UTC mode = True | ||
[[reference test]] | ||
required run mode = live | ||
live mode suite timeout = 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
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 error trapping in cmd1; cmd2 syntax. If cmd1 fails, the error trap | ||
# should trigger. | ||
. "$(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}-run" cylc run "${SUITE_NAME}" --reference-test --debug | ||
|
||
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 @@ | ||
2017-02-09T16:45:37Z INFO - Initial point: 1 | ||
2017-02-09T16:45:37Z INFO - Final point: 1 | ||
2017-02-09T16:45:37Z INFO - [foo.1] -triggered off [] | ||
2017-02-09T16:45:37Z INFO - [foo.1] -triggered off [] |
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,17 @@ | ||
[cylc] | ||
[[reference test]] | ||
expected task failures = foo.1 | ||
[[events]] | ||
abort on stalled = True | ||
[scheduling] | ||
[[dependencies]] | ||
graph = foo | ||
[runtime] | ||
[[foo]] | ||
script = """ | ||
if ((${CYLC_TASK_SUBMIT_NUMBER} == 1)); then | ||
false; true | ||
fi | ||
""" | ||
[[[job]]] | ||
execution retry delays = PT0S |