-
Notifications
You must be signed in to change notification settings - Fork 96
tests/f: fix remote tests & improve portability #6882
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: 8.5.x
Are you sure you want to change the base?
Conversation
if cylc.flow.flags.verbosity > 1: | ||
print(f'$ ln -s "{target}" "{path}"') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Make symlink dir issues easier to debug.
[[_retrieve]] | ||
$(cylc config -i "[platforms][$CYLC_TEST_PLATFORM]") | ||
[[_retrieve]] | ||
retrieve job logs = True | ||
install target = $CYLC_TEST_PLATFORM | ||
[[_no_retrieve]] | ||
$(cylc config -i "[platforms][$CYLC_TEST_PLATFORM]") | ||
[[_no_retrieve]] | ||
retrieve job logs = False | ||
install target = $CYLC_TEST_PLATFORM | ||
" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- Allow default
[directives]
to be specified in the test config. install target
should already be set correctly.
sed -i -E 's/--max-size=[^ ]* //' 'my-rsync.log.edited' # strip "retrieve job logs max size" arg | ||
sort -u 'my-rsync.log.edited' # stip out duplicates (can result from PBS log file spooling) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- Strip
--max-size
options which may or may not be added based on config. - Tolerate job log retrieval retries (needed when PBS output spooling is in play).
[[goodhostplatform]] | ||
hosts = ${CYLC_TEST_HOST} | ||
install target = ${CYLC_TEST_INSTALL_TARGET} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can't define platforms like this because they don't inherit any config from $CYLC_TEST_PLATFORM
.
named_grep_ok "job kill retries & succeeds" \ | ||
"\[jobs-kill out\] \[TASK JOB SUMMARY\].*1/mixedhosttask/01" \ | ||
"${LOGFILE}" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This test turned out to be fragile. Replaced with more targetted checks.
[[goodhosttask]] | ||
script = sleep 60 | ||
platform = goodhostplatform | ||
|
||
[[mixedhosttask]] | ||
script = sleep 60 | ||
platform = mixedhostplatform |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ensure both tasks are running when the kill command is sent.
@@ -37,14 +40,16 @@ create_test_global_config "" " | |||
share/cycle = \$TMPDIR/\$USER/cylctb_tmp_share_dir | |||
work = \$TMPDIR/\$USER | |||
[[[$CYLC_TEST_INSTALL_TARGET]]] | |||
run = \$TMPDIR/\$USER/test_cylc_symlink/ctb_tmp_run_dir |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
$TMPDIR/$USER
does not exist on our new machine and $TMPDIR
path changes from node to node :/
Switched to a permanent directory $HOME/cylctb-symlinks
with one subdir for each test.
|
||
create_test_global_config "" " | ||
[install] | ||
[[symlink dirs]] | ||
[[[${CYLC_TEST_INSTALL_TARGET}]]] | ||
run = \$TMPDIR/\$USER/sym-run | ||
run = \$HOME/cylctb-symlinks/$TEST_NAME/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ditto
f1ba4c3
to
1d0563e
Compare
cylc message -- 'echo done' | ||
|
||
# wait up to PT1M for the cat-log task to succeed | ||
# (the workflow will shut down if cat-log fails) | ||
sleep 60 | ||
|
||
# fail if the task was not orphaned by this point | ||
false |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This test was supposed to be testing cat-log
against running tasks:
Test "cylc cat-log" of currently-running local and remote jobs.
However, there was nothing to keep the task running, so it was actually testing succeeded jobs.
I've changed the approach, the tasks now sleep for 60s, then fail.
If the cat-log
works, it will cylc set
the task, orphaning the sleep and triggering fin
which is used to diagnose test success.
Pre-release testing for 8.5.0 flagged several test issues.
Check List
CONTRIBUTING.md
and added my name as a Code Contributor.setup.cfg
(andconda-environment.yml
if present).?.?.x
branch.