summaryrefslogtreecommitdiff
path: root/contrib
diff options
context:
space:
mode:
authorEd Santiago <santiago@redhat.com>2021-02-22 05:30:56 -0700
committerEd Santiago <santiago@redhat.com>2021-02-22 07:21:04 -0700
commitd9655b0f014bd6b5ad6ebb2b9c11b409cbcb4a22 (patch)
tree604ae87e0ea0085d19f615f159fab16eef2a3556 /contrib
parent6fbf73ed8bd34738f3f901df1e5d3b592a9c3354 (diff)
downloadpodman-d9655b0f014bd6b5ad6ebb2b9c11b409cbcb4a22.tar.gz
podman-d9655b0f014bd6b5ad6ebb2b9c11b409cbcb4a22.tar.bz2
podman-d9655b0f014bd6b5ad6ebb2b9c11b409cbcb4a22.zip
pr-should-include-tests: recognized "renamed" tests
git tries to recognize renamed files. This isn't always as helpful as intended. Turn it off, so we'll always see files as 'A'dded. Signed-off-by: Ed Santiago <santiago@redhat.com>
Diffstat (limited to 'contrib')
-rwxr-xr-xcontrib/cirrus/pr-should-include-tests3
-rwxr-xr-xcontrib/cirrus/pr-should-include-tests.t1
2 files changed, 3 insertions, 1 deletions
diff --git a/contrib/cirrus/pr-should-include-tests b/contrib/cirrus/pr-should-include-tests
index a3b4847a7..e3c5d5da1 100755
--- a/contrib/cirrus/pr-should-include-tests
+++ b/contrib/cirrus/pr-should-include-tests
@@ -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
diff --git a/contrib/cirrus/pr-should-include-tests.t b/contrib/cirrus/pr-should-include-tests.t
index 4618060a3..965a3b574 100755
--- a/contrib/cirrus/pr-should-include-tests.t
+++ b/contrib/cirrus/pr-should-include-tests.t
@@ -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