From 55a5bd8a00577a91fb381364bcfc61e50a8e505a Mon Sep 17 00:00:00 2001 From: Ed Santiago Date: Wed, 20 Apr 2022 13:30:31 -0600 Subject: 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_ are undefined (e.g., cron), never skip Signed-off-by: Ed Santiago --- contrib/cirrus/pr-should-include-tests | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'contrib/cirrus/pr-should-include-tests') 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 | -- cgit v1.2.3-54-g00ecf