| 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 |
#------------------------------------------------------------------------------ |
| 19 |
# Test `cylc vip` (Validate Install Play) |
| 20 |
|
| 21 |
. "$(dirname "$0")/test_header" |
| 22 |
set_test_number 5 |
| 23 |
|
| 24 |
WORKFLOW_NAME="cylctb-x$(< /dev/urandom tr -dc _A-Z-a-z-0-9 | head -c6)" |
| 25 |
|
| 26 |
cp -r "${TEST_SOURCE_DIR}/${TEST_NAME_BASE}/flow.cylc" . |
| 27 |
cp -r "${TEST_SOURCE_DIR}/${TEST_NAME_BASE}/reference.log" . |
| 28 |
|
| 29 |
run_ok "${TEST_NAME_BASE}-from-path" \ |
| 30 |
cylc vip --no-detach --debug \ |
| 31 |
--workflow-name "${WORKFLOW_NAME}" \ |
| 32 |
--initial-cycle-point=1300 \ |
| 33 |
--no-run-name \ |
| 34 |
--reference-test \ |
| 35 |
|
| 36 |
grep_ok "13000101T0000Z" "${TEST_NAME_BASE}-from-path.stdout" |
| 37 |
|
| 38 |
grep "\$" "${TEST_NAME_BASE}-from-path.stdout" > VIPOUT.txt |
| 39 |
|
| 40 |
named_grep_ok "${TEST_NAME_BASE}-it-validated" "$ cylc validate" "VIPOUT.txt" |
| 41 |
named_grep_ok "${TEST_NAME_BASE}-it-installed" "$ cylc install" "VIPOUT.txt" |
| 42 |
named_grep_ok "${TEST_NAME_BASE}-it-played" "$ cylc play" "VIPOUT.txt" |
| 43 |
|
| 44 |
purge |
| 45 |
exit 0 |