From 3a42770b3ca498d03f6fa5fdfc66fc581bb88808 Mon Sep 17 00:00:00 2001 From: Bryce Kwon Date: Sat, 7 Nov 2026 08:17:30 -1000 Subject: Clean a trash directory a stopped test locked A script stopped by -i or --debug inside one of the SANITY tests leaves a directory without permissions, and make clean then failed on it. --- tests/Makefile | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/Makefile b/tests/Makefile index 362ed45..bd6aad9 100644 --- a/tests/Makefile +++ b/tests/Makefile @@ -42,6 +42,9 @@ $(TESTS): pre-clean @'$(SHELL_PATH_SQ)' $@ $(CGIT_TEST_OPTS); \ status=$$?; echo $$status >test-results/$(@:.sh=.exit); exit $$status +# A script stopped by -i or --debug inside a test that takes permissions +# away can leave a directory that rm cannot descend into. .PHONY: clean clean: + @if test -d trash; then chmod -R u+rwx trash; fi $(RM) -r trash test-results -- cgit 2.12.1