Exclude resource dirs from search for tests.
authorPhillip Lord <phillip.lord@russet.org.uk>
Fri, 27 Nov 2015 21:41:14 +0000 (21:41 +0000)
committerPhillip Lord <phillip.lord@russet.org.uk>
Fri, 27 Nov 2015 21:41:14 +0000 (21:41 +0000)
* test/Makefile.in: Test file locations are now found with find
  rather than using finds native functions.

test/Makefile.in

index 545a0e110fb9a28846762ca0b7bf23ccd287e387..d3a8eb90420226ce0b8a11a9085a1ac10445f450 100644 (file)
@@ -99,10 +99,11 @@ WRITE_LOG = > $@ 2>&1 || { stat=ERROR; cat $@; }; echo $$stat: $@
        $(emacs) -l ert -l $$loadfile \
          -f ert-run-tests-batch-and-exit ${WRITE_LOG}
 
-ELFILES = $(filter-out ./manual%,\
-       $(sort $(wildcard ${srcdir}/*.el) $(wildcard ${srcdir}/*/*.el) \
-       $(wildcard ${srcdir}/*/*/*.el) $(wildcard ${srcdir}/*/*/*/*.el)))
+ELFILES = $(shell find ${srcdir} -path "./manual" -prune -o \
+               -path "*resources" -prune -o -name "*el" -print)
+ELCFILES = $(patsubst %.el,%.elc,${ELFILES})
 LOGFILES = $(patsubst %.el,%.log,${ELFILES})
+LOGSAVEFILES  = $(patsubst %.el,%.log~,${ELFILES})
 TESTS = $(subst ${srcdir}/,,$(LOGFILES:.log=))
 
 ## If we have to interrupt a hanging test, preserve the log so we can
@@ -138,12 +139,10 @@ check-maybe: ${LOGFILES}
 .PHONY: mostlyclean clean bootstrap-clean distclean maintainer-clean
 
 clean mostlyclean:
-       -rm -f ${srcdir}/*.log ${srcdir}/*.log~ ${srcdir}/*/*.log \
-               ${srcdir}/*/*.log~ ${srcdir}/*/*/*.log \
-               ${srcdir}/*/*/*.log~
+       -rm -f ${LOGFILES} ${LOGSAVEFILES}
 
 bootstrap-clean: clean
-       -rm -f ${srcdir}/*.elc ${srcdir}/*/*.elc ${srcdir}/*/*/*.elc
+       -rm -f ${ELCFILES}
 
 distclean: clean
        rm -f Makefile