Skip to content

Commit

Permalink
Update tests
Browse files Browse the repository at this point in the history
Respond to review feedback from RD
  • Loading branch information
datamel committed Apr 28, 2021
1 parent 4e47f9c commit fa248cd
Show file tree
Hide file tree
Showing 12 changed files with 56 additions and 51 deletions.
6 changes: 5 additions & 1 deletion CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,11 @@ version control information on installation of a workflow.

### Fixes

[#4193](https://github.com/cylc/cylc-flow/pull/4193) - Standard `cylc install`
now correctly installs from directories with a `.` in the name. Symlink dirs
now correctly expands environment variables on the remote. Fixes minor cosmetic
bugs.

[#4199](https://github.com/cylc/cylc-flow/pull/4199) -
`cylc validate` and `cylc run` now check task/family names in the `[runtime]`
section for validity.
Expand All @@ -78,7 +83,6 @@ a workflow that uses the deprecated `suite.rc` filename would symlink `flow.cylc
to the `suite.rc` in the source dir instead of the run dir. Also fixes a couple
of other, small bugs.


-------------------------------------------------------------------------------
## __cylc-8.0b1 (<span actions:bind='release-date'>Released 2021-04-21</span>)__

Expand Down
2 changes: 1 addition & 1 deletion cylc/flow/pathutil.py
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ def make_localhost_symlinks(rund, named_sub_dir):

def get_dirs_to_symlink(install_target, flow_name):
"""Returns dictionary of directories to symlink from glbcfg.
Note the paths should remain unexpanded, to be expanded on the remote.
Note the paths should remain unexpanded, to be expanded on the remote.
"""
dirs_to_symlink = {}
symlink_conf = glbl_cfg().get(['symlink dirs'])
Expand Down
18 changes: 9 additions & 9 deletions cylc/flow/workflow_files.py
Original file line number Diff line number Diff line change
Expand Up @@ -1079,8 +1079,8 @@ def reinstall_workflow(named_run, rundir, source, dry_run=False):
f"An error occurred when copying files from {source} to {rundir}")
REINSTALL_LOG.warning(f" Error: {stderr}")
check_flow_file(rundir, symlink_suiterc=True, logger=REINSTALL_LOG)
REINSTALL_LOG.info(f'REINSTALLED {named_run} from {source} -> {rundir}')
print(f'REINSTALLED {named_run} from {source} -> {rundir}')
REINSTALL_LOG.info(f'REINSTALLED {named_run} from {source}')
print(f'REINSTALLED {named_run} from {source}')
_close_install_log(REINSTALL_LOG)
return

Expand Down Expand Up @@ -1142,11 +1142,11 @@ def install_workflow(
" name, using the --run-name option.")
check_nested_run_dirs(rundir, flow_name)
symlinks_created = {}
sub_dir = flow_name
named_run = flow_name
if run_num:
sub_dir = os.path.join(sub_dir, f'run{run_num}')
named_run = os.path.join(named_run, f'run{run_num}')
if not no_symlinks:
symlinks_created = make_localhost_symlinks(rundir, sub_dir)
symlinks_created = make_localhost_symlinks(rundir, named_run)
INSTALL_LOG = _get_logger(rundir, 'cylc-install')
if not no_symlinks and bool(symlinks_created) is True:
for src, dst in symlinks_created.items():
Expand Down Expand Up @@ -1183,8 +1183,8 @@ def install_workflow(
raise WorkflowFilesError(
"Source directory between runs are not consistent.")
# check source link matches the source symlink from workflow dir.
INSTALL_LOG.info(f'INSTALLED {sub_dir} from {source} -> {rundir}')
print(f'INSTALLED {sub_dir} from {source} -> {rundir}')
INSTALL_LOG.info(f'INSTALLED {named_run} from {source}')
print(f'INSTALLED {named_run} from {source}')
_close_install_log(INSTALL_LOG)
return source, rundir, flow_name

Expand Down Expand Up @@ -1293,7 +1293,7 @@ def check_flow_file(
if flow_file_path.is_symlink():
# Symlink broken or points elsewhere - replace
flow_file_path.unlink()
flow_file_path.symlink_to(suite_rc_path)
flow_file_path.symlink_to(WorkflowFiles.SUITE_RC)
if logger:
logger.warning(f'{depr_msg}. Symlink created.')
return flow_file_path
Expand Down Expand Up @@ -1352,7 +1352,7 @@ def link_runN(latest_run: Union[Path, str]):
latest_run = Path(latest_run)
run_n = Path(latest_run.parent, WorkflowFiles.RUN_N)
try:
run_n.symlink_to(latest_run.relative_to(run_n.parent))
run_n.symlink_to(latest_run.name)
except OSError:
pass

Expand Down
20 changes: 10 additions & 10 deletions tests/functional/cylc-install/00-simple.t
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ pushd "${RND_WORKFLOW_SOURCE}" || exit 1
run_ok "${TEST_NAME}" cylc install

contains_ok "${TEST_NAME}.stdout" <<__OUT__
INSTALLED $RND_WORKFLOW_NAME/run1 from ${RND_WORKFLOW_SOURCE} -> ${RND_WORKFLOW_RUNDIR}/run1
INSTALLED $RND_WORKFLOW_NAME/run1 from ${RND_WORKFLOW_SOURCE}
__OUT__
popd || exit 1
purge_rnd_workflow
Expand All @@ -59,7 +59,7 @@ __ERR__
TEST_NAME="${TEST_NAME_BASE}-REG-install-ok"
run_ok "${TEST_NAME}" cylc install "${RND_WORKFLOW_NAME}"
contains_ok "${TEST_NAME}.stdout" <<__OUT__
INSTALLED $RND_WORKFLOW_NAME/run1 from ${RND_WORKFLOW_SOURCE} -> ${RND_WORKFLOW_RUNDIR}/run1
INSTALLED $RND_WORKFLOW_NAME/run1 from ${RND_WORKFLOW_SOURCE}
__OUT__
popd || exit 1
purge_rnd_workflow
Expand All @@ -74,7 +74,7 @@ touch "${RND_WORKFLOW_SOURCE}/suite.rc"
run_ok "${TEST_NAME}" cylc install --flow-name="${RND_WORKFLOW_NAME}" -C "${RND_WORKFLOW_SOURCE}"

contains_ok "${TEST_NAME}.stdout" <<__OUT__
INSTALLED $RND_WORKFLOW_NAME/run1 from ${RND_WORKFLOW_SOURCE} -> ${RND_WORKFLOW_RUNDIR}/run1
INSTALLED $RND_WORKFLOW_NAME/run1 from ${RND_WORKFLOW_SOURCE}
__OUT__
# test symlink not made in source dir
exists_fail "flow.cylc"
Expand All @@ -84,7 +84,7 @@ exists_ok "flow.cylc"

TEST_NAME="${TEST_NAME_BASE}-suite.rc-flow.cylc-readlink"
readlink "flow.cylc" > "${TEST_NAME}.out"
cmp_ok "${TEST_NAME}.out" <<< "${RND_WORKFLOW_RUNDIR}/run1/suite.rc"
cmp_ok "${TEST_NAME}.out" <<< "suite.rc"

INSTALL_LOG="$(find "${RND_WORKFLOW_RUNDIR}/run1/log/install" -type f -name '*.log')"
grep_ok "The filename \"suite.rc\" is deprecated in favour of \"flow.cylc\". Symlink created." "${INSTALL_LOG}"
Expand All @@ -99,7 +99,7 @@ make_rnd_workflow
pushd "${RND_WORKFLOW_SOURCE}" || exit 1
run_ok "${TEST_NAME}" cylc install --no-run-name
contains_ok "${TEST_NAME}.stdout" <<__OUT__
INSTALLED $RND_WORKFLOW_NAME from ${RND_WORKFLOW_SOURCE} -> ${RND_WORKFLOW_RUNDIR}
INSTALLED $RND_WORKFLOW_NAME from ${RND_WORKFLOW_SOURCE}
__OUT__
popd || exit 1
purge_rnd_workflow
Expand All @@ -111,7 +111,7 @@ make_rnd_workflow
pushd "${RND_WORKFLOW_SOURCE}" || exit 1
run_ok "${TEST_NAME}" cylc install --flow-name="${RND_WORKFLOW_NAME}-olaf"
contains_ok "${TEST_NAME}.stdout" <<__OUT__
INSTALLED ${RND_WORKFLOW_NAME}-olaf/run1 from ${RND_WORKFLOW_SOURCE} -> ${RUN_DIR}/${RND_WORKFLOW_NAME}-olaf/run1
INSTALLED ${RND_WORKFLOW_NAME}-olaf/run1 from ${RND_WORKFLOW_SOURCE}
__OUT__
popd || exit 1
rm -rf "${RUN_DIR}/${RND_WORKFLOW_NAME}-olaf"
Expand All @@ -124,7 +124,7 @@ make_rnd_workflow
pushd "${RND_WORKFLOW_SOURCE}" || exit 1
run_ok "${TEST_NAME}" cylc install --flow-name="${RND_WORKFLOW_NAME}-olaf" --no-run-name
contains_ok "${TEST_NAME}.stdout" <<__OUT__
INSTALLED ${RND_WORKFLOW_NAME}-olaf from ${RND_WORKFLOW_SOURCE} -> ${RUN_DIR}/${RND_WORKFLOW_NAME}-olaf
INSTALLED ${RND_WORKFLOW_NAME}-olaf from ${RND_WORKFLOW_SOURCE}
__OUT__
popd || exit 1
rm -rf "${RUN_DIR}/${RND_WORKFLOW_NAME}-olaf"
Expand All @@ -136,7 +136,7 @@ TEST_NAME="${TEST_NAME_BASE}-option--directory"
make_rnd_workflow
run_ok "${TEST_NAME}" cylc install --flow-name="${RND_WORKFLOW_NAME}" --directory="${RND_WORKFLOW_SOURCE}"
contains_ok "${TEST_NAME}.stdout" <<__OUT__
INSTALLED $RND_WORKFLOW_NAME/run1 from ${RND_WORKFLOW_SOURCE} -> ${RND_WORKFLOW_RUNDIR}/run1
INSTALLED $RND_WORKFLOW_NAME/run1 from ${RND_WORKFLOW_SOURCE}
__OUT__
purge_rnd_workflow

Expand All @@ -147,12 +147,12 @@ make_rnd_workflow
pushd "${RND_WORKFLOW_SOURCE}" || exit 1
run_ok "${TEST_NAME}" cylc install
contains_ok "${TEST_NAME}.stdout" <<__OUT__
INSTALLED $RND_WORKFLOW_NAME/run1 from ${RND_WORKFLOW_SOURCE} -> ${RND_WORKFLOW_RUNDIR}/run1
INSTALLED $RND_WORKFLOW_NAME/run1 from ${RND_WORKFLOW_SOURCE}
__OUT__
TEST_NAME="${TEST_NAME_BASE}-install-twice-2"
run_ok "${TEST_NAME}" cylc install
contains_ok "${TEST_NAME}.stdout" <<__OUT__
INSTALLED $RND_WORKFLOW_NAME/run2 from ${RND_WORKFLOW_SOURCE} -> ${RND_WORKFLOW_RUNDIR}/run2
INSTALLED $RND_WORKFLOW_NAME/run2 from ${RND_WORKFLOW_SOURCE}
__OUT__
popd || exit 1
purge_rnd_workflow
Expand Down
4 changes: 2 additions & 2 deletions tests/functional/cylc-install/01-symlinks.t
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ TEST_NAME="${TEST_NAME_BASE}-symlinks-created"
make_rnd_workflow
run_ok "${TEST_NAME}" cylc install --flow-name="${RND_WORKFLOW_NAME}" --directory="${RND_WORKFLOW_SOURCE}"
contains_ok "${TEST_NAME}.stdout" <<__OUT__
INSTALLED $RND_WORKFLOW_NAME/run1 from ${RND_WORKFLOW_SOURCE} -> ${RND_WORKFLOW_RUNDIR}/run1
INSTALLED $RND_WORKFLOW_NAME/run1 from ${RND_WORKFLOW_SOURCE}
__OUT__

TEST_SYM="${TEST_NAME_BASE}-run-symlink-exists-ok"
Expand Down Expand Up @@ -82,7 +82,7 @@ TEST_NAME="${TEST_NAME_BASE}-no-symlinks-created"
make_rnd_workflow
run_ok "${TEST_NAME}" cylc install --flow-name="${RND_WORKFLOW_NAME}" --no-symlink-dirs --directory="${RND_WORKFLOW_SOURCE}"
contains_ok "${TEST_NAME}.stdout" <<__OUT__
INSTALLED $RND_WORKFLOW_NAME/run1 from ${RND_WORKFLOW_SOURCE} -> ${RND_WORKFLOW_RUNDIR}/run1
INSTALLED $RND_WORKFLOW_NAME/run1 from ${RND_WORKFLOW_SOURCE}
__OUT__


Expand Down
6 changes: 3 additions & 3 deletions tests/functional/cylc-install/02-failures.t
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ make_rnd_workflow
pushd "${RND_WORKFLOW_SOURCE}" || exit 1
run_ok "${TEST_NAME}" cylc install --run-name=olaf
contains_ok "${TEST_NAME}.stdout" <<__OUT__
INSTALLED ${RND_WORKFLOW_NAME} from ${RND_WORKFLOW_SOURCE} -> ${RND_WORKFLOW_RUNDIR}/olaf
INSTALLED ${RND_WORKFLOW_NAME} from ${RND_WORKFLOW_SOURCE}
__OUT__
TEST_NAME="${TEST_NAME_BASE}-install-twice-mix-options-1-2nd-install"
run_fail "${TEST_NAME}" cylc install
Expand All @@ -149,7 +149,7 @@ make_rnd_workflow
pushd "${RND_WORKFLOW_SOURCE}" || exit 1
run_ok "${TEST_NAME}" cylc install
contains_ok "${TEST_NAME}.stdout" <<__OUT__
INSTALLED ${RND_WORKFLOW_NAME}/run1 from ${RND_WORKFLOW_SOURCE} -> ${RND_WORKFLOW_RUNDIR}/run1
INSTALLED ${RND_WORKFLOW_NAME}/run1 from ${RND_WORKFLOW_SOURCE}
__OUT__
TEST_NAME="${TEST_NAME_BASE}-install-twice-mix-options-2-2nd-install"
run_fail "${TEST_NAME}" cylc install --run-name=olaf
Expand All @@ -167,7 +167,7 @@ make_rnd_workflow
pushd "${RND_WORKFLOW_SOURCE}" || exit 1
run_ok "${TEST_NAME}" cylc install --run-name=olaf
contains_ok "${TEST_NAME}.stdout" <<__OUT__
INSTALLED ${RND_WORKFLOW_NAME} from ${RND_WORKFLOW_SOURCE} -> ${RND_WORKFLOW_RUNDIR}/olaf
INSTALLED ${RND_WORKFLOW_NAME} from ${RND_WORKFLOW_SOURCE}
__OUT__
TEST_NAME="${TEST_NAME_BASE}-install-twice-same-run-name-2nd-install"
run_fail "${TEST_NAME}" cylc install --run-name=olaf
Expand Down
4 changes: 2 additions & 2 deletions tests/functional/cylc-install/03-file-transfer.t
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ ${RND_WORKFLOW_RUNDIR}/
__OUT__

contains_ok "${TEST_NAME}.stdout" <<__OUT__
INSTALLED $RND_WORKFLOW_NAME from ${RND_WORKFLOW_SOURCE} -> ${RND_WORKFLOW_RUNDIR}
INSTALLED $RND_WORKFLOW_NAME from ${RND_WORKFLOW_SOURCE}
__OUT__
popd || exit 1
purge_rnd_workflow
Expand Down Expand Up @@ -87,7 +87,7 @@ ${RND_WORKFLOW_RUNDIR}/
__OUT__

contains_ok "${TEST_NAME}.stdout" <<__OUT__
INSTALLED $RND_WORKFLOW_NAME from ${RND_WORKFLOW_SOURCE} -> ${RND_WORKFLOW_RUNDIR}
INSTALLED $RND_WORKFLOW_NAME from ${RND_WORKFLOW_SOURCE}
__OUT__
popd || exit 1
purge_rnd_workflow
30 changes: 15 additions & 15 deletions tests/functional/cylc-reinstall/00-simple.t
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,11 @@ make_rnd_workflow
pushd "${RND_WORKFLOW_SOURCE}" || exit 1
run_ok "${TEST_NAME}" cylc install
contains_ok "${TEST_NAME}.stdout" <<__OUT__
INSTALLED $RND_WORKFLOW_NAME/run1 from ${RND_WORKFLOW_SOURCE} -> ${RND_WORKFLOW_RUNDIR}/run1
INSTALLED $RND_WORKFLOW_NAME/run1 from ${RND_WORKFLOW_SOURCE}
__OUT__
run_ok "basic-reinstall" cylc reinstall "${RND_WORKFLOW_NAME}/run1"
REINSTALL_LOG="$(find "${RND_WORKFLOW_RUNDIR}/run1/log/install" -type f -name '*reinstall.log')"
grep_ok "REINSTALLED ${RND_WORKFLOW_NAME}/run1 from ${RND_WORKFLOW_SOURCE} -> ${RND_WORKFLOW_RUNDIR}/run1" "${REINSTALL_LOG}"
grep_ok "REINSTALLED ${RND_WORKFLOW_NAME}/run1 from ${RND_WORKFLOW_SOURCE}" "${REINSTALL_LOG}"

popd || exit 1
purge_rnd_workflow
Expand All @@ -42,10 +42,10 @@ pushd "${RND_WORKFLOW_SOURCE}" || exit 1
run_ok "${TEST_NAME}" cylc install
run_ok "${TEST_NAME}-reinstall" cylc reinstall "${RND_WORKFLOW_NAME}/run1/flow.cylc"
contains_ok "${TEST_NAME}.stdout" <<__OUT__
INSTALLED $RND_WORKFLOW_NAME/run1 from ${RND_WORKFLOW_SOURCE} -> ${RND_WORKFLOW_RUNDIR}/run1
INSTALLED $RND_WORKFLOW_NAME/run1 from ${RND_WORKFLOW_SOURCE}
__OUT__
REINSTALL_LOG="$(find "${RND_WORKFLOW_RUNDIR}/run1/log/install" -type f -name '*reinstall.log')"
grep_ok "REINSTALLED ${RND_WORKFLOW_NAME}/run1 from ${RND_WORKFLOW_SOURCE} -> ${RND_WORKFLOW_RUNDIR}/run1" "${REINSTALL_LOG}"
grep_ok "REINSTALLED ${RND_WORKFLOW_NAME}/run1 from ${RND_WORKFLOW_SOURCE}" "${REINSTALL_LOG}"
popd || exit 1
purge_rnd_workflow

Expand All @@ -58,10 +58,10 @@ touch suite.rc
run_ok "${TEST_NAME}" cylc install
run_ok "${TEST_NAME}-reinstall-suite.rc" cylc reinstall "${RND_WORKFLOW_NAME}/run1/suite.rc"
contains_ok "${TEST_NAME}.stdout" <<__OUT__
INSTALLED $RND_WORKFLOW_NAME/run1 from ${RND_WORKFLOW_SOURCE} -> ${RND_WORKFLOW_RUNDIR}/run1
INSTALLED $RND_WORKFLOW_NAME/run1 from ${RND_WORKFLOW_SOURCE}
__OUT__
REINSTALL_LOG="$(find "${RND_WORKFLOW_RUNDIR}/run1/log/install" -type f -name '*reinstall.log')"
grep_ok "REINSTALLED ${RND_WORKFLOW_NAME}/run1 from ${RND_WORKFLOW_SOURCE} -> ${RND_WORKFLOW_RUNDIR}/run1" "${REINSTALL_LOG}"
grep_ok "REINSTALLED ${RND_WORKFLOW_NAME}/run1 from ${RND_WORKFLOW_SOURCE}" "${REINSTALL_LOG}"
popd || exit 1
purge_rnd_workflow

Expand All @@ -71,11 +71,11 @@ make_rnd_workflow
pushd "${TMPDIR}" || exit 1
run_ok "${TEST_NAME}-install" cylc install -C "${RND_WORKFLOW_SOURCE}" --flow-name="${RND_WORKFLOW_NAME}"
contains_ok "${TEST_NAME}-install.stdout" <<__OUT__
INSTALLED ${RND_WORKFLOW_NAME}/run1 from ${RND_WORKFLOW_SOURCE} -> ${RUN_DIR}/${RND_WORKFLOW_NAME}/run1
INSTALLED ${RND_WORKFLOW_NAME}/run1 from ${RND_WORKFLOW_SOURCE}
__OUT__
run_ok "${TEST_NAME}-reinstall" cylc reinstall "${RND_WORKFLOW_NAME}/run1"
contains_ok "${TEST_NAME}-reinstall.stdout" <<__OUT__
REINSTALLED $RND_WORKFLOW_NAME/run1 from ${RND_WORKFLOW_SOURCE} -> ${RUN_DIR}/${RND_WORKFLOW_NAME}/run1
REINSTALLED $RND_WORKFLOW_NAME/run1 from ${RND_WORKFLOW_SOURCE}
__OUT__
popd || exit 1
purge_rnd_workflow
Expand All @@ -88,14 +88,14 @@ rm -f "${RND_WORKFLOW_SOURCE}/flow.cylc"
touch "${RND_WORKFLOW_SOURCE}/suite.rc"
run_ok "${TEST_NAME}" cylc install --flow-name="${RND_WORKFLOW_NAME}" -C "${RND_WORKFLOW_SOURCE}"
contains_ok "${TEST_NAME}.stdout" <<__OUT__
INSTALLED $RND_WORKFLOW_NAME/run1 from ${RND_WORKFLOW_SOURCE} -> ${RND_WORKFLOW_RUNDIR}/run1
INSTALLED $RND_WORKFLOW_NAME/run1 from ${RND_WORKFLOW_SOURCE}
__OUT__
# test symlink not made in source dir
exists_fail "flow.cylc"
# test symlink correctly made in run dir
pushd "${RND_WORKFLOW_RUNDIR}/run1" || exit 1
exists_ok "flow.cylc"
if [[ $(readlink "${RND_WORKFLOW_RUNDIR}/run1/flow.cylc") == "${RND_WORKFLOW_RUNDIR}/run1/suite.rc" ]] ; then
if [[ $(readlink "${RND_WORKFLOW_RUNDIR}/run1/flow.cylc") == "suite.rc" ]] ; then
ok "symlink.suite.rc"
else
fail "symlink.suite.rc"
Expand All @@ -106,7 +106,7 @@ grep_ok "The filename \"suite.rc\" is deprecated in favour of \"flow.cylc\". Sym
rm -rf flow.cylc
run_ok "${TEST_NAME}-reinstall" cylc reinstall "${RND_WORKFLOW_NAME}/run1"
exists_ok "${RND_WORKFLOW_RUNDIR}/run1/flow.cylc"
if [[ $(readlink "${RND_WORKFLOW_RUNDIR}/run1/flow.cylc") == "${RND_WORKFLOW_RUNDIR}/run1/suite.rc" ]] ; then
if [[ $(readlink "${RND_WORKFLOW_RUNDIR}/run1/flow.cylc") == "suite.rc" ]] ; then
ok "symlink.suite.rc"
else
fail "symlink.suite.rc"
Expand All @@ -121,13 +121,13 @@ TEST_NAME="${TEST_NAME_BASE}-no-args"
make_rnd_workflow
run_ok "${TEST_NAME}-install" cylc install --flow-name="${RND_WORKFLOW_NAME}" -C "${RND_WORKFLOW_SOURCE}"
contains_ok "${TEST_NAME}-install.stdout" <<__OUT__
INSTALLED ${RND_WORKFLOW_NAME}/run1 from ${RND_WORKFLOW_SOURCE} -> ${RUN_DIR}/${RND_WORKFLOW_NAME}/run1
INSTALLED ${RND_WORKFLOW_NAME}/run1 from ${RND_WORKFLOW_SOURCE}
__OUT__
pushd "${RND_WORKFLOW_RUNDIR}/run1" || exit 1
touch "${RND_WORKFLOW_SOURCE}/new_file"
run_ok "${TEST_NAME}-reinstall" cylc reinstall
REINSTALL_LOG="$(find "${RND_WORKFLOW_RUNDIR}/run1/log/install" -type f -name '*reinstall.log')"
grep_ok "REINSTALLED ${RND_WORKFLOW_NAME}/run1 from ${RND_WORKFLOW_SOURCE} -> ${RND_WORKFLOW_RUNDIR}/run1" "${REINSTALL_LOG}"
grep_ok "REINSTALLED ${RND_WORKFLOW_NAME}/run1 from ${RND_WORKFLOW_SOURCE}" "${REINSTALL_LOG}"
exists_ok new_file
popd || exit 1
purge_rnd_workflow
Expand All @@ -138,13 +138,13 @@ make_rnd_workflow
pushd "${RND_WORKFLOW_SOURCE}" || exit 1
run_ok "${TEST_NAME}-install" cylc install --no-run-name -C "${RND_WORKFLOW_SOURCE}"
contains_ok "${TEST_NAME}-install.stdout" <<__OUT__
INSTALLED ${RND_WORKFLOW_NAME} from ${RND_WORKFLOW_SOURCE} -> ${RUN_DIR}/${RND_WORKFLOW_NAME}
INSTALLED ${RND_WORKFLOW_NAME} from ${RND_WORKFLOW_SOURCE}
__OUT__
pushd "${RND_WORKFLOW_RUNDIR}" || exit 1
touch "${RND_WORKFLOW_SOURCE}/new_file"
run_ok "${TEST_NAME}-reinstall" cylc reinstall
REINSTALL_LOG="$(find "${RND_WORKFLOW_RUNDIR}/log/install" -type f -name '*reinstall.log')"
grep_ok "REINSTALLED ${RND_WORKFLOW_NAME} from ${RND_WORKFLOW_SOURCE} -> ${RND_WORKFLOW_RUNDIR}" "${REINSTALL_LOG}"
grep_ok "REINSTALLED ${RND_WORKFLOW_NAME} from ${RND_WORKFLOW_SOURCE}" "${REINSTALL_LOG}"
exists_ok new_file
popd || exit 1
popd || exit 1
Expand Down
4 changes: 2 additions & 2 deletions tests/functional/cylc-reinstall/01-file-transfer.t
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ ${RND_WORKFLOW_RUNDIR}/run1
\`-- install
__OUT__
contains_ok "${TEST_NAME}.stdout" <<__OUT__
INSTALLED $RND_WORKFLOW_NAME/run1 from ${RND_WORKFLOW_SOURCE} -> ${RND_WORKFLOW_RUNDIR}/run1
INSTALLED $RND_WORKFLOW_NAME/run1 from ${RND_WORKFLOW_SOURCE}
__OUT__
run_ok "${TEST_NAME}" cylc install
mkdir new_dir
Expand Down Expand Up @@ -78,7 +78,7 @@ ${RND_WORKFLOW_RUNDIR}/run2
\`-- new_file2
__OUT__
contains_ok "${TEST_NAME}-reinstall.stdout" <<__OUT__
REINSTALLED $RND_WORKFLOW_NAME/run2 from ${RND_WORKFLOW_SOURCE} -> ${RND_WORKFLOW_RUNDIR}/run2
REINSTALLED $RND_WORKFLOW_NAME/run2 from ${RND_WORKFLOW_SOURCE}
__OUT__

# Test cylc reinstall affects only named run, i.e. run1 should be unaffected in this case
Expand Down
4 changes: 2 additions & 2 deletions tests/functional/deprecations/03-suiterc.t
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ init_suiterc "${TEST_NAME_BASE}" <<'__FLOW__'
R1 = foo => bar
__FLOW__

MSG='The filename "suite.rc" is deprecated in favour of "flow.cylc". Symlink created.'
MSG='The filename "suite.rc" is deprecated in favour of "flow.cylc"'

TEST_NAME="${TEST_NAME_BASE}-validate"
run_ok "${TEST_NAME}" cylc validate .
Expand All @@ -54,7 +54,7 @@ exists_ok "flow.cylc"

TEST_NAME="flow.cylc-readlink"
readlink "flow.cylc" > "${TEST_NAME}.out"
cmp_ok "${TEST_NAME}.out" <<< "${WORKFLOW_RUN_DIR}/suite.rc"
cmp_ok "${TEST_NAME}.out" <<< "suite.rc"

INSTALL_LOG="$(find "${WORKFLOW_RUN_DIR}/log/install" -type f -name '*.log')"
grep_ok "$MSG" "${INSTALL_LOG}"
Expand Down
Loading

0 comments on commit fa248cd

Please sign in to comment.