From 23af2d690077042d14ae56bad23711c481a4f4d4 Mon Sep 17 00:00:00 2001 From: WXTIM <26465611+wxtim@users.noreply.github.com> Date: Mon, 13 Nov 2023 15:06:40 +0000 Subject: [PATCH 1/2] fix broken test --- .github/workflows/test_functional.yml | 5 ++++- tests/functional/events/09-task-event-mail.t | 5 +++-- tests/functional/events/29-task-event-mail-1.t | 3 +-- tests/functional/events/30-task-event-mail-2.t | 4 ++-- 4 files changed, 10 insertions(+), 7 deletions(-) diff --git a/.github/workflows/test_functional.yml b/.github/workflows/test_functional.yml index baaad6b61f3..c17372105d5 100644 --- a/.github/workflows/test_functional.yml +++ b/.github/workflows/test_functional.yml @@ -108,7 +108,7 @@ jobs: run: | # install system deps brew update - brew install bash coreutils gnu-sed + brew install bash coreutils gnu-sed grep # add GNU coreutils and sed to the user PATH # (see instructions in brew install output) @@ -118,6 +118,9 @@ jobs: echo \ "/usr/local/opt/gnu-sed/libexec/gnubin" \ >> "${GITHUB_PATH}" + echo \ + "/usr/local/opt/grep/libexec/gnubin:$PATH" \ + >> "${GITHUB_PATH}" # add coreutils to the bashrc too (for jobs) cat >> "${HOME}/.bashrc" <<__HERE__ diff --git a/tests/functional/events/09-task-event-mail.t b/tests/functional/events/09-task-event-mail.t index a689268ea1d..9f6195feb20 100755 --- a/tests/functional/events/09-task-event-mail.t +++ b/tests/functional/events/09-task-event-mail.t @@ -55,10 +55,11 @@ succeeded: 1/t1/02 see: http://localhost/stuff/${USER}/${WORKFLOW_NAME}/ __LOG__ + run_ok "${TEST_NAME_BASE}-grep-log" \ - grep -qPizo "Subject: \[1/t1/01 retry\]\n ${WORKFLOW_NAME}" "${TEST_SMTPD_LOG}" + grep -qPizo "Subject: \[1/t1/01 retry\]\n? ${WORKFLOW_NAME}" "${TEST_SMTPD_LOG}" run_ok "${TEST_NAME_BASE}-grep-log" \ - grep -qPizo "Subject: \[1/t1/02 succeeded\]\n ${WORKFLOW_NAME}" "${TEST_SMTPD_LOG}" + grep -qPizo "Subject: \[1/t1/02 succeeded\]\n? ${WORKFLOW_NAME}" "${TEST_SMTPD_LOG}" purge mock_smtpd_kill diff --git a/tests/functional/events/29-task-event-mail-1.t b/tests/functional/events/29-task-event-mail-1.t index bef890c9c71..7ca6e76a7c2 100755 --- a/tests/functional/events/29-task-event-mail-1.t +++ b/tests/functional/events/29-task-event-mail-1.t @@ -37,14 +37,13 @@ run_ok "${TEST_NAME_BASE}-validate" \ workflow_run_ok "${TEST_NAME_BASE}-run" \ cylc play --reference-test --debug --no-detach "$WORKFLOW_NAME" - contains_ok "${TEST_SMTPD_LOG}" <<__LOG__ retry: 1/t1/01 see: http://localhost/stuff/${USER}/${WORKFLOW_NAME}/ __LOG__ run_ok "${TEST_NAME_BASE}-grep-log" \ - grep -qPizo "Subject: \[1/t1/01 retry\]\n ${WORKFLOW_NAME}" "${TEST_SMTPD_LOG}" + grep -qPizo "Subject: \[1/t1/01 retry\]\n? ${WORKFLOW_NAME}" "${TEST_SMTPD_LOG}" purge mock_smtpd_kill diff --git a/tests/functional/events/30-task-event-mail-2.t b/tests/functional/events/30-task-event-mail-2.t index 10ef0119892..85f6b301654 100755 --- a/tests/functional/events/30-task-event-mail-2.t +++ b/tests/functional/events/30-task-event-mail-2.t @@ -69,9 +69,9 @@ see: http://localhost/stuff/${USER}/${WORKFLOW_NAME}/ __LOG__ run_ok "${TEST_NAME_BASE}-grep-log" \ - grep -qPizo "Subject: \[. tasks retry\]\n ${WORKFLOW_NAME}" "${TEST_SMTPD_LOG}" + grep -qPizo "Subject: \[. tasks retry\]\n? ${WORKFLOW_NAME}" "${TEST_SMTPD_LOG}" run_ok "${TEST_NAME_BASE}-grep-log" \ - grep -qPizo "Subject: \[. tasks failed\]\n ${WORKFLOW_NAME}" "${TEST_SMTPD_LOG}" + grep -qPizo "Subject: \[. tasks failed\]\n? ${WORKFLOW_NAME}" "${TEST_SMTPD_LOG}" purge mock_smtpd_kill From 10a4981904ec7b3c9e418330c6ba560ce748475b Mon Sep 17 00:00:00 2001 From: Tim Pillinger <26465611+wxtim@users.noreply.github.com> Date: Wed, 15 Nov 2023 10:03:27 +0000 Subject: [PATCH 2/2] Update .github/workflows/test_functional.yml Co-authored-by: Ronnie Dutta <61982285+MetRonnie@users.noreply.github.com> --- .github/workflows/test_functional.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test_functional.yml b/.github/workflows/test_functional.yml index c17372105d5..d3a6a38dad3 100644 --- a/.github/workflows/test_functional.yml +++ b/.github/workflows/test_functional.yml @@ -119,7 +119,7 @@ jobs: "/usr/local/opt/gnu-sed/libexec/gnubin" \ >> "${GITHUB_PATH}" echo \ - "/usr/local/opt/grep/libexec/gnubin:$PATH" \ + "/usr/local/opt/grep/libexec/gnubin" \ >> "${GITHUB_PATH}" # add coreutils to the bashrc too (for jobs)