summaryrefslogtreecommitdiff
path: root/scripts/rspec_helpers.sh
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2022-12-08 12:07:37 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2022-12-08 12:07:37 +0000
commit0f4ce397c91d826ae3cc3551ac51deb5602088fb (patch)
tree97c66f8efeaf7101e046b7b1ce83c41f1bd4219e /scripts/rspec_helpers.sh
parentef44feb7fa697e96b7011aa45ea3ca7e5087a490 (diff)
downloadgitlab-ce-0f4ce397c91d826ae3cc3551ac51deb5602088fb.tar.gz
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'scripts/rspec_helpers.sh')
-rw-r--r--scripts/rspec_helpers.sh7
1 files changed, 5 insertions, 2 deletions
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"