Skip to content

Commit

Permalink
Merge pull request containers#9468 from edsantiago/new_test_checker
Browse files Browse the repository at this point in the history
pr-should-include-tests: recognized "renamed" tests
  • Loading branch information
openshift-merge-robot authored Feb 22, 2021
2 parents cb3af5b + d9655b0 commit f8ff172
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
3 changes: 2 additions & 1 deletion contrib/cirrus/pr-should-include-tests
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@ base=$(git merge-base ${DEST_BRANCH:-master} $head)
# A foo.c
# M bar.c
# We look for Added or Modified (not Deleted!) files under 'test'.
if git diff --name-status $base $head | egrep -q '^[AM]\s+(test/|.*_test\.go)'; then
# --no-renames ensures that renamed tests (#9420) show up as 'A'dded.
if git diff --name-status --no-renames $base $head | egrep -q '^[AM]\s+(test/|.*_test\.go)'; then
exit 0
fi

Expand Down
1 change: 1 addition & 0 deletions contrib/cirrus/pr-should-include-tests.t
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ tests="
0 c342583da 12f835d12 PR 8523, version.go + podman.spec.in
0 c342583da db1d2ff11 version bump to v2.2.0
0 8f75ed958 7b3ad6d89 PR 8835, only a README.md change
0 b6db60e58 f06dd45e0 PR 9420, a test rename
"

# The script we're testing
Expand Down

0 comments on commit f8ff172

Please sign in to comment.