diff options
author | Ed Santiago <santiago@redhat.com> | 2022-04-20 13:30:31 -0600 |
---|---|---|
committer | Ed Santiago <santiago@redhat.com> | 2022-04-21 11:02:57 -0600 |
commit | 55a5bd8a00577a91fb381364bcfc61e50a8e505a (patch) | |
tree | 2b0d6d1d2f4329662b8c9dc8da32e3344c774c1b /contrib/cirrus/pr-should-include-tests | |
parent | cb09c26c6519c2fff8be7285d585672a9066f2da (diff) | |
download | podman-55a5bd8a00577a91fb381364bcfc61e50a8e505a.tar.gz podman-55a5bd8a00577a91fb381364bcfc61e50a8e505a.tar.bz2 podman-55a5bd8a00577a91fb381364bcfc61e50a8e505a.zip |
Optimization: skip tests in some circumstances
A common pattern is to submit PRs that update only tests or docs.
When the only changes are to test/e2e, there is no point in running
test/system or test/upgrade or test/buildah-bud. Likewise, reciprocally,
and similarly for a bunch of other tests (alt, cross, apiv2, ...)
And when the only changes are under docs/ , there is no point in
running any of the above.
Exception: if $CIRRUS_<mumble> are undefined (e.g., cron), never skip
Signed-off-by: Ed Santiago <santiago@redhat.com>
Diffstat (limited to 'contrib/cirrus/pr-should-include-tests')
-rwxr-xr-x | contrib/cirrus/pr-should-include-tests | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/contrib/cirrus/pr-should-include-tests b/contrib/cirrus/pr-should-include-tests index 8103df41d..0d39047a6 100755 --- a/contrib/cirrus/pr-should-include-tests +++ b/contrib/cirrus/pr-should-include-tests @@ -30,8 +30,7 @@ fi # Nothing changed under test subdirectory. # # This is OK if the only files being touched are "safe" ones. -filtered_changes=$(git diff --name-status $base $head | - awk '{print $2}' | +filtered_changes=$(git diff --name-only $base $head | fgrep -vx .cirrus.yml | fgrep -vx .gitignore | fgrep -vx Makefile | |