[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[FYI] {master} build: fix cleaning of test directories in contrib (and i
From: |
Stefano Lattarini |
Subject: |
[FYI] {master} build: fix cleaning of test directories in contrib (and in t/perf) |
Date: |
Tue, 3 Jul 2012 22:59:12 +0200 |
* Makefile.am (clean-local-check): Update recipe to cater to the fact
that some tests using a temporary directory have been placed in other
directories that the 't/' directory (for the moment, at least 't/perf'
and 'contrib/t').
Signed-off-by: Stefano Lattarini <address@hidden>
---
Makefile.am | 17 ++++++++++-------
1 file changed, 10 insertions(+), 7 deletions(-)
diff --git a/Makefile.am b/Makefile.am
index f05e82d..d28f3c7 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -432,13 +432,16 @@ installcheck-testsuite:
clean-local: clean-local-check
.PHONY: clean-local-check
clean-local-check:
- -set x t/*.dir; shift; \
- if test "$$#,$$1" = "1,*.dir"; then \
- : there is no test directory to clean; \
- else \
- find "$$@" -type d ! -perm -700 -exec chmod u+rwx {} ';'; \
- rm -rf "$$@"; \
- fi;
+## Directries candidate to be test directories match this wildcard.
+ @globs='t/*.dir t/*/*.dir */t/*.dir */t/*/*.dir'; \
+## The 'nullglob' bash option is not portable, so use perl.
+ dirs=`$(PERL) -e "print join(' ', glob('$$globs'));"` || exit 1; \
+ if test -n "$$dirs"; then \
+## Errors in find are acceptable, errors in rm are not.
+ find $$dirs -type d ! -perm -700 -exec chmod u+rwx {} ';'; \
+ echo " rm -rf $$dirs"; \
+ rm -rf $$dirs || exit 1; \
+ fi
## ---------------- ##
--
1.7.9.5
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [FYI] {master} build: fix cleaning of test directories in contrib (and in t/perf),
Stefano Lattarini <=