Skip to content

Commit

Permalink
templatevars: fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
oliver-sanders committed Dec 1, 2020
1 parent 1ae3087 commit 2cc26dc
Show file tree
Hide file tree
Showing 31 changed files with 139 additions and 126 deletions.
40 changes: 20 additions & 20 deletions tests/flakyfunctional/special/04-clock-triggered.t
Original file line number Diff line number Diff line change
Expand Up @@ -23,37 +23,37 @@ set_test_number 4
install_suite "${TEST_NAME_BASE}" "${TEST_NAME_BASE}"
#-------------------------------------------------------------------------------
run_ok "${TEST_NAME_BASE}-validate" cylc validate "${SUITE_NAME}" \
-s "START=$(date '+%Y%m%dT%H')" \
-s "HOUR=$(date '+%H')" \
-s 'UTC_MODE=False' \
-s 'OFFSET=PT0S' \
-s 'TIMEOUT=PT12S'
-s "START='$(date '+%Y%m%dT%H')'" \
-s "HOUR='$(date '+%H')'" \
-s 'UTC_MODE="False"' \
-s 'OFFSET="PT0S"' \
-s 'TIMEOUT="PT12S"'
#-------------------------------------------------------------------------------
run_ok "${TEST_NAME_BASE}-run-now" \
cylc run --debug --no-detach "${SUITE_NAME}" \
-s "START=$(date '+%Y%m%dT%H')" \
-s "HOUR=$(date '+%H')" \
-s 'UTC_MODE=False' \
-s 'OFFSET=PT0S' \
-s 'TIMEOUT=PT12S'
-s "START='$(date '+%Y%m%dT%H')'" \
-s "HOUR='$(date '+%H')'" \
-s 'UTC_MODE="False"' \
-s 'OFFSET="PT0S"' \
-s 'TIMEOUT="PT12S"'
#-------------------------------------------------------------------------------
NOW="$(date '+%Y%m%dT%H')"
run_ok "${TEST_NAME_BASE}-run-past" \
cylc run --debug --no-detach "${SUITE_NAME}" \
-s "START=$(cylc cycle-point "${NOW}" --offset-hour='-10')" \
-s "HOUR=$(cylc cycle-point "${NOW}" --offset-hour='-10' --print-hour)" \
-s 'UTC_MODE=False' \
-s 'OFFSET=PT0S' \
-s 'TIMEOUT=PT1M'
-s "START='$(cylc cycle-point "${NOW}" --offset-hour='-10')'" \
-s "HOUR='$(cylc cycle-point "${NOW}" --offset-hour='-10' --print-hour)'" \
-s 'UTC_MODE="False"' \
-s 'OFFSET="PT0S"' \
-s 'TIMEOUT="PT1M"'
#-------------------------------------------------------------------------------
NOW="$(date '+%Y%m%dT%H')"
run_fail "${TEST_NAME_BASE}-run-later" \
cylc run --debug --no-detach "${SUITE_NAME}" \
-s "START=$(cylc cycle-point "${NOW}" --offset-hour='10')" \
-s "HOUR=$(cylc cycle-point "${NOW}" --offset-hour='10' --print-hour)" \
-s 'UTC_MODE=False' \
-s 'OFFSET=PT0S' \
-s 'TIMEOUT=PT12S'
-s "START='$(cylc cycle-point "${NOW}" --offset-hour='10')'" \
-s "HOUR='$(cylc cycle-point "${NOW}" --offset-hour='10' --print-hour)'" \
-s 'UTC_MODE="False"' \
-s 'OFFSET="PT0S"' \
-s 'TIMEOUT="PT12S"'
#-------------------------------------------------------------------------------
purge
exit
40 changes: 20 additions & 20 deletions tests/flakyfunctional/special/05-clock-triggered-utc.t
Original file line number Diff line number Diff line change
Expand Up @@ -23,37 +23,37 @@ set_test_number 4
install_suite "${TEST_NAME_BASE}" "${TEST_NAME_BASE}"
#-------------------------------------------------------------------------------
run_ok "${TEST_NAME_BASE}-validate" cylc validate "${SUITE_NAME}" \
-s "START=$(date -u '+%Y%m%dT%H00')Z" \
-s "HOUR=$(date -u '+%H')" \
-s 'UTC_MODE=True' \
-s 'OFFSET=PT0S' \
-s 'TIMEOUT=PT12S'
-s "START='$(date -u '+%Y%m%dT%H00')Z'" \
-s "HOUR='$(date -u '+%H')'" \
-s 'UTC_MODE="True"' \
-s 'OFFSET="PT0S"' \
-s 'TIMEOUT="PT12S"'
#-------------------------------------------------------------------------------
run_ok "${TEST_NAME_BASE}-run-now" \
cylc run --debug --no-detach "${SUITE_NAME}" \
-s "START=$(date -u '+%Y%m%dT%H00')Z" \
-s "HOUR=$(date -u '+%H')" \
-s 'UTC_MODE=True' \
-s 'OFFSET=PT0S' \
-s 'TIMEOUT=PT1M'
-s "START='$(date -u '+%Y%m%dT%H00')Z'" \
-s "HOUR='$(date -u '+%H')'" \
-s 'UTC_MODE="True"' \
-s 'OFFSET="PT0S"' \
-s 'TIMEOUT="PT1M"'
#-------------------------------------------------------------------------------
NOW="$(date -u '+%Y%m%dT%H00')Z"
run_ok "${TEST_NAME_BASE}-run-past" \
cylc run --debug --no-detach "${SUITE_NAME}" \
-s "START=$(cylc cycle-point "${NOW}" --offset-hour='-10')" \
-s "HOUR=$(cylc cycle-point "${NOW}" --offset-hour='-10' --print-hour)" \
-s 'UTC_MODE=True' \
-s 'OFFSET=PT0S' \
-s 'TIMEOUT=PT12S'
-s "START='$(cylc cycle-point "${NOW}" --offset-hour='-10')'" \
-s "HOUR='$(cylc cycle-point "${NOW}" --offset-hour='-10' --print-hour)'" \
-s 'UTC_MODE="True"' \
-s 'OFFSET="PT0S"' \
-s 'TIMEOUT="PT12S"'
#-------------------------------------------------------------------------------
NOW="$(date -u '+%Y%m%dT%H00')Z"
run_fail "${TEST_NAME_BASE}-run-later" \
cylc run --debug --no-detach "${SUITE_NAME}" \
-s "START=$(cylc cycle-point "${NOW}" --offset-hour='10')" \
-s "HOUR=$(cylc cycle-point "${NOW}" --offset-hour='10' --print-hour)" \
-s 'UTC_MODE=True' \
-s 'OFFSET=PT0S' \
-s 'TIMEOUT=PT12S'
-s "START='$(cylc cycle-point "${NOW}" --offset-hour='10')'" \
-s "HOUR='$(cylc cycle-point "${NOW}" --offset-hour='10' --print-hour)'" \
-s 'UTC_MODE="True"' \
-s 'OFFSET="PT0S"' \
-s 'TIMEOUT="PT12S"'
#-------------------------------------------------------------------------------
purge
exit
40 changes: 20 additions & 20 deletions tests/flakyfunctional/special/06-clock-triggered-iso.t
Original file line number Diff line number Diff line change
Expand Up @@ -23,38 +23,38 @@ set_test_number 4
install_suite "${TEST_NAME_BASE}" "${TEST_NAME_BASE}"
#-------------------------------------------------------------------------------
run_ok "${TEST_NAME_BASE}-validate" cylc validate "${SUITE_NAME}" \
-s "START=$(date '+%Y%m%dT%H%z')" \
-s "HOUR=$(date '+%H')" \
-s 'UTC_MODE=False' \
-s 'OFFSET=PT0S' \
-s 'TIMEOUT=PT12S'
-s "START='$(date '+%Y%m%dT%H%z')'" \
-s "HOUR='$(date '+%H')'" \
-s 'UTC_MODE="False"' \
-s 'OFFSET="PT0S"' \
-s 'TIMEOUT="PT12S"'
#-------------------------------------------------------------------------------
run_ok "${TEST_NAME_BASE}-run-now" \
cylc run --debug --no-detach "${SUITE_NAME}" \
-s "START=$(date '+%Y%m%dT%H%z')" \
-s "HOUR=$(date '+%H')" \
-s 'UTC_MODE=False' \
-s 'OFFSET=PT0S' \
-s 'TIMEOUT=PT12S'
-s "START='$(date '+%Y%m%dT%H%z')'" \
-s "HOUR='$(date '+%H')'" \
-s 'UTC_MODE="False"' \
-s 'OFFSET="PT0S"' \
-s 'TIMEOUT="PT12S"'
#-------------------------------------------------------------------------------
TZSTR="$(date '+%z')"
NOW="$(date '+%Y%m%dT%H')"
run_ok "${TEST_NAME_BASE}-run-past" \
cylc run --debug --no-detach "${SUITE_NAME}" \
-s "START=$(cylc cycle-point "${NOW}" --offset-hour='-10')${TZSTR}" \
-s "HOUR=$(cylc cycle-point "${NOW}" --offset-hour='-10' --print-hour)" \
-s 'UTC_MODE=False' \
-s 'OFFSET=PT0S' \
-s 'TIMEOUT=PT1M'
-s "START='$(cylc cycle-point "${NOW}" --offset-hour='-10')${TZSTR}'" \
-s "HOUR='$(cylc cycle-point "${NOW}" --offset-hour='-10' --print-hour)'" \
-s 'UTC_MODE="False"' \
-s 'OFFSET="PT0S"' \
-s 'TIMEOUT="PT1M"'
#-------------------------------------------------------------------------------
NOW="$(date '+%Y%m%dT%H')"
run_fail "${TEST_NAME_BASE}-run-later" \
cylc run --debug --no-detach "${SUITE_NAME}" \
-s "START=$(cylc cycle-point "${NOW}" --offset-hour='10')${TZSTR}" \
-s "HOUR=$(cylc cycle-point "${NOW}" --offset-hour='10' --print-hour)" \
-s 'UTC_MODE=False' \
-s 'OFFSET=PT0S' \
-s 'TIMEOUT=PT12S'
-s "START='$(cylc cycle-point "${NOW}" --offset-hour='10')${TZSTR}'" \
-s "HOUR='$(cylc cycle-point "${NOW}" --offset-hour='10' --print-hour)'" \
-s 'UTC_MODE="False"' \
-s 'OFFSET="PT0S"' \
-s 'TIMEOUT="PT12S"'
#-------------------------------------------------------------------------------
purge
exit
12 changes: 6 additions & 6 deletions tests/flakyfunctional/special/08-clock-triggered-0.t
Original file line number Diff line number Diff line change
Expand Up @@ -24,27 +24,27 @@ set_test_number 4
install_suite "${TEST_NAME_BASE}" "${TEST_NAME_BASE}"
#-------------------------------------------------------------------------------
run_ok "${TEST_NAME_BASE}-validate" \
cylc validate "${SUITE_NAME}" -s START="$(date '+%Y%m%dT%H%z')" \
-s HOUR="$(date '+%H')" -s 'UTC_MODE=False' -s 'TIMEOUT=PT0.2M'
cylc validate "${SUITE_NAME}" -s "START='$(date '+%Y%m%dT%H%z')'" \
-s HOUR="$(date '+%H')" -s 'UTC_MODE="False"' -s 'TIMEOUT="PT0.2M"'
#-------------------------------------------------------------------------------
run_ok "${TEST_NAME_BASE}-run-now" \
cylc run --debug --no-detach "${SUITE_NAME}" \
-s START="$(date '+%Y%m%dT%H%z')" \
-s HOUR="$(date '+%H')" -s 'UTC_MODE=False' -s 'TIMEOUT=PT0.2M'
-s HOUR="$(date '+%H')" -s 'UTC_MODE="False"' -s 'TIMEOUT="PT0.2M"'
#-------------------------------------------------------------------------------
NOW="$(date '+%Y%m%dT%H')"
START="$(cylc cycle-point "${NOW}" --offset-hour='-10')$(date '+%z')"
HOUR="$(cylc cycle-point "${NOW}" --offset-hour='-10' --print-hour)"
run_ok "${TEST_NAME_BASE}-run-past" \
cylc run --debug --no-detach "${SUITE_NAME}" -s START="${START}" \
-s HOUR="${HOUR}" -s 'UTC_MODE=False' -s 'TIMEOUT=PT1M'
cylc run --debug --no-detach "${SUITE_NAME}" -s "START='${START}'" \
-s "HOUR='${HOUR}'" -s 'UTC_MODE="False"' -s 'TIMEOUT="PT1M"'
#-------------------------------------------------------------------------------
NOW="$(date '+%Y%m%dT%H')"
START="$(cylc cycle-point "${NOW}" --offset-hour='10')$(date '+%z')"
HOUR="$(cylc cycle-point "${NOW}" --offset-hour='10' --print-hour)"
run_fail "${TEST_NAME_BASE}-run-later" \
cylc run --debug --no-detach "${SUITE_NAME}" -s START="${START}" \
-s HOUR="${HOUR}" -s 'UTC_MODE=False' -s 'TIMEOUT=PT0.2M'
-s "HOUR='${HOUR}'" -s 'UTC_MODE="False"' -s 'TIMEOUT="PT0.2M"'
#-------------------------------------------------------------------------------
purge
exit
5 changes: 3 additions & 2 deletions tests/flakyfunctional/xtriggers/00-wall_clock.t
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@
. "$(dirname "$0")/test_header"

run_suite() {
cylc run --no-detach --debug "$1" -s "START=$2" -s "HOUR=$3" -s "OFFSET=$4"
cylc run --no-detach --debug "$1" \
-s "START='$2'" -s "HOUR='$3'" -s "OFFSET='$4'"
}

set_test_number 5
Expand All @@ -33,7 +34,7 @@ HOUR="$(date +%H)"
OFFSET="PT0S"

run_ok "${TEST_NAME_BASE}-val" cylc validate "${SUITE_NAME}" \
-s "START=${START}" -s "HOUR=${HOUR}" -s "OFFSET=${OFFSET}"
-s "START='${START}'" -s "HOUR='${HOUR}'" -s "OFFSET='${OFFSET}'"

TEST_NAME="${TEST_NAME_BASE}-now"
run_ok "${TEST_NAME}" run_suite "${SUITE_NAME}" "${START}" "${HOUR}" "${OFFSET}"
Expand Down
4 changes: 2 additions & 2 deletions tests/functional/cylc-kill/00-multi-hosts-compat.t
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,11 @@ set_test_number 3

install_suite "${TEST_NAME_BASE}" "${TEST_NAME_BASE}"
run_ok "${TEST_NAME_BASE}-validate" \
cylc validate "${SUITE_NAME}" -s "CYLC_TEST_PLATFORM=${CYLC_TEST_PLATFORM}"
cylc validate "${SUITE_NAME}" -s "CYLC_TEST_PLATFORM='${CYLC_TEST_PLATFORM}'"

suite_run_ok "${TEST_NAME_BASE}-run" \
cylc run --reference-test --debug --no-detach "${SUITE_NAME}" \
-s "CYLC_TEST_PLATFORM=${CYLC_TEST_PLATFORM}"
-s "CYLC_TEST_PLATFORM='${CYLC_TEST_PLATFORM}'"

RUN_DIR="$RUN_DIR/${SUITE_NAME}"
LOG="${RUN_DIR}/log/suite/log"
Expand Down
4 changes: 2 additions & 2 deletions tests/functional/cylc-kill/01-multi-hosts.t
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,11 @@ set_test_number 3
install_suite "${TEST_NAME_BASE}" "${TEST_NAME_BASE}"

run_ok "${TEST_NAME_BASE}-validate" \
cylc validate "${SUITE_NAME}" -s "CYLC_TEST_PLATFORM=${CYLC_TEST_PLATFORM}"
cylc validate "${SUITE_NAME}" -s "CYLC_TEST_PLATFORM='${CYLC_TEST_PLATFORM}'"

suite_run_ok "${TEST_NAME_BASE}-run" \
cylc run --reference-test --debug --no-detach "${SUITE_NAME}" \
-s "CYLC_TEST_PLATFORM=${CYLC_TEST_PLATFORM}"
-s "CYLC_TEST_PLATFORM='${CYLC_TEST_PLATFORM}'"

RUN_DIR="$RUN_DIR/${SUITE_NAME}"
LOG="${RUN_DIR}/log/suite/log"
Expand Down
4 changes: 2 additions & 2 deletions tests/functional/cylc-ping/04-check-keys-remote.t
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,9 @@ init_suite "${TEST_NAME_BASE}" <<'__FLOW_CONFIG__'
__FLOW_CONFIG__

run_ok "${TEST_NAME_BASE}-validate" cylc validate "${SUITE_NAME}" \
-s "CYLC_TEST_PLATFORM=${CYLC_TEST_PLATFORM}"
-s "CYLC_TEST_PLATFORM='${CYLC_TEST_PLATFORM}'"
suite_run_ok "${TEST_NAME_BASE}-run" cylc run "${SUITE_NAME}" \
-s "CYLC_TEST_PLATFORM=${CYLC_TEST_PLATFORM}"
-s "CYLC_TEST_PLATFORM='${CYLC_TEST_PLATFORM}'"
RRUND="cylc-run/${SUITE_NAME}"
RSRVD="${RRUND}/.service"
poll_grep_suite_log 'Holding all waiting or queued tasks now'
Expand Down
4 changes: 2 additions & 2 deletions tests/functional/cylc-ping/05-check-keys-sharedfs.t
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,9 @@ init_suite "${TEST_NAME_BASE}" <<'__FLOW_CYLC__'
__FLOW_CYLC__

run_ok "${TEST_NAME_BASE}-validate" cylc validate "${SUITE_NAME}" \
-s "CYLC_TEST_PLATFORM=${CYLC_TEST_PLATFORM}"
-s "CYLC_TEST_PLATFORM='${CYLC_TEST_PLATFORM}'"
suite_run_ok "${TEST_NAME_BASE}-run" cylc run "${SUITE_NAME}" \
-s "CYLC_TEST_PLATFORM=${CYLC_TEST_PLATFORM}"
-s "CYLC_TEST_PLATFORM='${CYLC_TEST_PLATFORM}'"
RRUND="cylc-run/${SUITE_NAME}"
RSRVD="${RRUND}/.service"
poll_grep_suite_log 'Holding all waiting or queued tasks now'
Expand Down
4 changes: 2 additions & 2 deletions tests/functional/events/10-task-event-job-logs-retrieve.t
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,11 @@ install_suite "${TEST_NAME_BASE}" "${TEST_NAME_BASE}"
# shellcheck disable=SC2086
run_ok "${TEST_NAME_BASE}-validate" \
cylc validate ${OPT_SET} \
-s "PLATFORM=${CYLC_TEST_PLATFORM}" "${SUITE_NAME}"
-s "PLATFORM='${CYLC_TEST_PLATFORM}'" "${SUITE_NAME}"
# shellcheck disable=SC2086
suite_run_ok "${TEST_NAME_BASE}-run" \
cylc run --reference-test --debug --no-detach ${OPT_SET} \
-s "PLATFORM=${CYLC_TEST_PLATFORM}" "${SUITE_NAME}"
-s "PLATFORM='${CYLC_TEST_PLATFORM}'" "${SUITE_NAME}"

sed "/'job-logs-retrieve'/!d" \
"${SUITE_RUN_DIR}/log/job/1/t1/"{01,02,03}"/job-activity.log" \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ set_test_number 3
install_suite "${TEST_NAME_BASE}" "${TEST_NAME_BASE}"

run_ok "${TEST_NAME_BASE}-validate" \
cylc validate -s "HOST=${CYLC_TEST_HOST}" "${SUITE_NAME}"
cylc validate -s "HOST='${CYLC_TEST_HOST}'" "${SUITE_NAME}"
suite_run_ok "${TEST_NAME_BASE}-run" \
cylc run --reference-test --debug --no-detach "${SUITE_NAME}"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,11 @@ chmod +x "${TEST_DIR}/${SUITE_NAME}/bin/my-rsync"

# shellcheck disable=SC2086
run_ok "${TEST_NAME_BASE}-validate" \
cylc validate ${OPT_SET} -s "PLATFORM=${CYLC_TEST_PLATFORM}" "${SUITE_NAME}"
cylc validate ${OPT_SET} -s "PLATFORM='${CYLC_TEST_PLATFORM}'" "${SUITE_NAME}"
# shellcheck disable=SC2086
suite_run_ok "${TEST_NAME_BASE}-run" \
cylc run --reference-test --debug --no-detach ${OPT_SET} \
-s "PLATFORM=${CYLC_TEST_PLATFORM}" "${SUITE_NAME}"
-s "PLATFORM='${CYLC_TEST_PLATFORM}'" "${SUITE_NAME}"

SUITE_LOG_D="$RUN_DIR/${SUITE_NAME}/log"
sed 's/^.* -v //' "${SUITE_LOG_D}/suite/my-rsync.log" >'my-rsync.log.edited'
Expand Down
5 changes: 3 additions & 2 deletions tests/functional/events/32-task-event-job-logs-retrieve-2.t
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,10 @@ set_test_number 5
install_suite "${TEST_NAME_BASE}" "${TEST_NAME_BASE}"

run_ok "${TEST_NAME_BASE}-validate" \
cylc validate -s "PLATFORM=${CYLC_TEST_PLATFORM}" "${SUITE_NAME}"
cylc validate -s "PLATFORM='${CYLC_TEST_PLATFORM}'" "${SUITE_NAME}"
suite_run_ok "${TEST_NAME_BASE}-run" \
cylc run --reference-test --debug --no-detach -s "PLATFORM=${CYLC_TEST_PLATFORM}" "${SUITE_NAME}"
cylc run --reference-test --debug --no-detach \
-s "PLATFORM='${CYLC_TEST_PLATFORM}'" "${SUITE_NAME}"

sed "/'job-logs-retrieve'/!d" \
"${SUITE_RUN_DIR}/log/job/1/t1/01/job-activity.log" \
Expand Down
4 changes: 2 additions & 2 deletions tests/functional/events/33-task-event-job-logs-retrieve-3.t
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@ set_test_number 5
install_suite "${TEST_NAME_BASE}" "${TEST_NAME_BASE}"

run_ok "${TEST_NAME_BASE}-validate" \
cylc validate -s "PLATFORM=${CYLC_TEST_PLATFORM}" "${SUITE_NAME}"
cylc validate -s "PLATFORM='${CYLC_TEST_PLATFORM}'" "${SUITE_NAME}"
suite_run_fail "${TEST_NAME_BASE}-run" \
cylc run --reference-test --debug --no-detach \
-s "PLATFORM=${CYLC_TEST_PLATFORM}" "${SUITE_NAME}"
-s "PLATFORM='${CYLC_TEST_PLATFORM}'" "${SUITE_NAME}"

sed "/'job-logs-retrieve'/!d" \
"${SUITE_RUN_DIR}/log/job/1/t1/01/job-activity.log" \
Expand Down
3 changes: 2 additions & 1 deletion tests/functional/events/37-suite-event-bad-custom-template.t
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@ LOG="${SUITE_RUN_DIR}/log/suite/log"
MESSAGE="('suite-event-handler-00', 'startup') bad template: 'rubbish'"
run_ok "${TEST_NAME_BASE}-run1-log" grep -q -F "ERROR - ${MESSAGE}" "${LOG}"
suite_run_fail "${TEST_NAME_BASE}-run2" \
cylc run --reference-test --debug --no-detach -s 'ABORT=True' "${SUITE_NAME}"
cylc run --reference-test --debug --no-detach \
-s 'ABORT="True"' "${SUITE_NAME}"
run_ok "${TEST_NAME_BASE}-run2-err" \
grep -q -F "Suite shutting down - ${MESSAGE}" \
"${TEST_NAME_BASE}-run2.stderr"
Expand Down
12 changes: 7 additions & 5 deletions tests/functional/jinja2/10-builtin-functions.t
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,16 @@ set_test_number 5
install_suite "${TEST_NAME_BASE}" "${TEST_NAME_BASE}"
#-------------------------------------------------------------------------------
TEST_NAME="${TEST_NAME_BASE}"-pass
run_ok "${TEST_NAME}" cylc validate "${SUITE_NAME}" -s 'FOO=True' \
-s 'ANSWER=42'
run_ok "${TEST_NAME}" cylc validate "${SUITE_NAME}" \
-s 'FOO="True"' \
-s 'ANSWER="42"'
TEST_NAME="${TEST_NAME_BASE}"-fail-assert
run_fail "${TEST_NAME}" cylc validate "${SUITE_NAME}" -s 'FOO=True' \
-s 'ANSWER=43'
run_fail "${TEST_NAME}" cylc validate "${SUITE_NAME}" \
-s 'FOO="True"' \
-s 'ANSWER="43"'
grep_ok 'Jinja2 Assertation Error: Universal' "${TEST_NAME}.stderr"
TEST_NAME="${TEST_NAME_BASE}"-fail-raise
run_fail "${TEST_NAME}" cylc validate "${SUITE_NAME}" -s 'ANSWER=42'
run_fail "${TEST_NAME}" cylc validate "${SUITE_NAME}" -s 'ANSWER="42"'
grep_ok 'Jinja2 Error: FOO must be defined' "${TEST_NAME}.stderr"
#-------------------------------------------------------------------------------
purge
2 changes: 1 addition & 1 deletion tests/functional/job-submission/02-job-nn-remote-host.t
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ run_ok "${TEST_NAME_BASE}-validate" cylc validate "${SUITE_NAME}"
sqlite3 "${SUITE_RUN_DIR}/.service/db" <'db.sqlite3'
suite_run_ok "${TEST_NAME_BASE}-restart" \
cylc restart --reference-test --debug --no-detach \
-s "CYLC_TEST_PLATFORM=${CYLC_TEST_PLATFORM}" "${SUITE_NAME}"
-s "CYLC_TEST_PLATFORM='${CYLC_TEST_PLATFORM}'" "${SUITE_NAME}"

purge
exit
5 changes: 3 additions & 2 deletions tests/functional/job-submission/07-multi.t
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,10 @@ set_test_number 3
install_suite "${TEST_NAME_BASE}" "${TEST_NAME_BASE}"

run_ok "${TEST_NAME_BASE}-validate" \
cylc validate "${SUITE_NAME}" -s "CYLC_TEST_PLATFORM=${CYLC_TEST_PLATFORM}"
cylc validate "${SUITE_NAME}" -s "CYLC_TEST_PLATFORM='${CYLC_TEST_PLATFORM}'"
suite_run_ok "${TEST_NAME_BASE}-run" \
cylc run --debug --no-detach --reference-test -s "CYLC_TEST_PLATFORM=${CYLC_TEST_PLATFORM}" \
cylc run --debug --no-detach --reference-test \
-s "CYLC_TEST_PLATFORM='${CYLC_TEST_PLATFORM}'" \
"${SUITE_NAME}"

RUN_DIR="$RUN_DIR/${SUITE_NAME}"
Expand Down
Loading

0 comments on commit 2cc26dc

Please sign in to comment.