| 1 |
#!/usr/bin/env bash |
| 2 |
# THIS FILE IS PART OF THE CYLC WORKFLOW ENGINE. |
| 3 |
# Copyright (C) NIWA & British Crown (Met Office) & Contributors. |
| 4 |
# |
| 5 |
# This program is free software: you can redistribute it and/or modify |
| 6 |
# it under the terms of the GNU General Public License as published by |
| 7 |
# the Free Software Foundation, either version 3 of the License, or |
| 8 |
# (at your option) any later version. |
| 9 |
# |
| 10 |
# This program is distributed in the hope that it will be useful, |
| 11 |
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 12 |
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 13 |
# GNU General Public License for more details. |
| 14 |
# |
| 15 |
# You should have received a copy of the GNU General Public License |
| 16 |
# along with this program. If not, see <http://www.gnu.org/licenses/>. |
| 17 |
#------------------------------------------------------------------------------- |
| 18 |
# Test cylc show multiple tasks |
| 19 |
. "$(dirname "$0")/test_header" |
| 20 |
|
| 21 |
set_test_number 4 |
| 22 |
|
| 23 |
install_workflow "${TEST_NAME_BASE}" "${TEST_NAME_BASE}" |
| 24 |
|
| 25 |
run_ok "${TEST_NAME_BASE}-validate" cylc validate "${WORKFLOW_NAME}" |
| 26 |
workflow_run_ok "${TEST_NAME_BASE}-run" \ |
| 27 |
cylc play --reference-test --debug --no-detach "${WORKFLOW_NAME}" |
| 28 |
|
| 29 |
RUND="${RUN_DIR}/${WORKFLOW_NAME}" |
| 30 |
contains_ok "${RUND}/show.txt" <<'__TXT__' |
| 31 |
|
| 32 |
Task ID: 2016/t1 |
| 33 |
title: (not given) |
| 34 |
description: (not given) |
| 35 |
URL: (not given) |
| 36 |
state: running |
| 37 |
prerequisites: ('⨯': not satisfied) |
| 38 |
✓ 2015/t1 started |
| 39 |
outputs: ('⨯': not completed) |
| 40 |
⨯ 2016/t1 expired |
| 41 |
✓ 2016/t1 submitted |
| 42 |
⨯ 2016/t1 submit-failed |
| 43 |
✓ 2016/t1 started |
| 44 |
⨯ 2016/t1 succeeded |
| 45 |
⨯ 2016/t1 failed |
| 46 |
output completion: incomplete |
| 47 |
┆ ( |
| 48 |
✓ ┆ started |
| 49 |
⨯ ┆ and succeeded |
| 50 |
┆ ) |
| 51 |
|
| 52 |
Task ID: 2017/t1 |
| 53 |
title: (not given) |
| 54 |
description: (not given) |
| 55 |
URL: (not given) |
| 56 |
state: running |
| 57 |
prerequisites: ('⨯': not satisfied) |
| 58 |
✓ 2016/t1 started |
| 59 |
outputs: ('⨯': not completed) |
| 60 |
⨯ 2017/t1 expired |
| 61 |
✓ 2017/t1 submitted |
| 62 |
⨯ 2017/t1 submit-failed |
| 63 |
✓ 2017/t1 started |
| 64 |
⨯ 2017/t1 succeeded |
| 65 |
⨯ 2017/t1 failed |
| 66 |
output completion: incomplete |
| 67 |
┆ ( |
| 68 |
✓ ┆ started |
| 69 |
⨯ ┆ and succeeded |
| 70 |
┆ ) |
| 71 |
|
| 72 |
Task ID: 2018/t1 |
| 73 |
title: (not given) |
| 74 |
description: (not given) |
| 75 |
URL: (not given) |
| 76 |
state: running |
| 77 |
prerequisites: ('⨯': not satisfied) |
| 78 |
✓ 2017/t1 started |
| 79 |
outputs: ('⨯': not completed) |
| 80 |
⨯ 2018/t1 expired |
| 81 |
✓ 2018/t1 submitted |
| 82 |
⨯ 2018/t1 submit-failed |
| 83 |
✓ 2018/t1 started |
| 84 |
⨯ 2018/t1 succeeded |
| 85 |
⨯ 2018/t1 failed |
| 86 |
output completion: incomplete |
| 87 |
┆ ( |
| 88 |
✓ ┆ started |
| 89 |
⨯ ┆ and succeeded |
| 90 |
┆ ) |
| 91 |
__TXT__ |
| 92 |
|
| 93 |
contains_ok "${RUND}/show2.txt" <<'__TXT__' |
| 94 |
|
| 95 |
TASK NAME: t1 |
| 96 |
title: (not given) |
| 97 |
description: (not given) |
| 98 |
URL: (not given) |
| 99 |
|
| 100 |
TASK NAME: t2 |
| 101 |
title: beer |
| 102 |
description: better than water |
| 103 |
abv: 12% |
| 104 |
URL: beer.com |
| 105 |
__TXT__ |
| 106 |
|
| 107 |
|
| 108 |
purge |
| 109 |
exit |