From 0f4ce397c91d826ae3cc3551ac51deb5602088fb Mon Sep 17 00:00:00 2001 From: GitLab Bot Date: Thu, 8 Dec 2022 12:07:37 +0000 Subject: Add latest changes from gitlab-org/gitlab@master --- scripts/rspec_helpers.sh | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'scripts/rspec_helpers.sh') diff --git a/scripts/rspec_helpers.sh b/scripts/rspec_helpers.sh index e0586b8efdf..923b633fcc9 100644 --- a/scripts/rspec_helpers.sh +++ b/scripts/rspec_helpers.sh @@ -269,9 +269,12 @@ function warn_on_successfully_retried_test { while read changed_file do - echoinfo "Searching flaky tests for ${changed_file}" + # include the root path in the regexp to eliminate false positives + changed_file="^\./$changed_file" + if grep -q "$changed_file" "$RETRIED_TESTS_REPORT_PATH"; then - echoinfo "Exiting with code $SUCCESSFULLY_RETRIED_TEST_EXIT_CODE because the flaky test was part of this MR." + echoinfo "Flaky test '$changed_file' was found in the list of files changed by this MR." + echoinfo "Exiting with code $SUCCESSFULLY_RETRIED_TEST_EXIT_CODE." exit $SUCCESSFULLY_RETRIED_TEST_EXIT_CODE fi done <<< "$changed_files" -- cgit v1.2.1