mirror of
https://git.savannah.gnu.org/git/coreutils.git
synced 2026-11-17 18:02:09 +03:00
maint: speed up make check (vc_exe_in_TESTS)
* tests/check.mk (vc_exe_in_TESTS): The main change is to not start a sed process for each file under tests/, which was taking around 2.5s on a 2.1GHz i3-2310M. Also adjust the rule to no longer use temporary files.
This commit is contained in:
1 parent
563bb94068
commit
ead96f9ede
1 file changed
+10
-14
+10
-14
@@ -20,21 +20,17 @@
|
||||
_v = TESTS
|
||||
_w = root_tests
|
||||
vc_exe_in_TESTS: Makefile
|
||||
$(AM_V_GEN)rm -f t1 t2; \
|
||||
if test -d $(top_srcdir)/.git && test $(srcdir) = .; then \
|
||||
{ sed -n '/^$(_v) =[ ]*\\$$/,/[^\]$$/p' \
|
||||
$(srcdir)/Makefile.am \
|
||||
| sed 's/^ *//;/^\$$.*/d;/^$(_v) =/d'; \
|
||||
sed -n '/^$(_w) =[ ]*\\$$/,/[^\]$$/p' \
|
||||
$(srcdir)/Makefile.am \
|
||||
| sed 's/^ *//;/^\$$.*/d;/^$(_w) =/d'; } \
|
||||
| tr -s '\012\\' ' ' | fmt -1 | sort -u > t1 && \
|
||||
for f in `cd $(top_srcdir) && build-aux/vc-list-files $(subdir)`; do \
|
||||
f=`echo $$f|sed 's!^$(subdir)/!!'`; \
|
||||
$(AM_V_GEN)if test -d $(top_srcdir)/.git && test $(srcdir) = .; then \
|
||||
{ \
|
||||
for list in $(_v) $(_w); do \
|
||||
sed -n "/^$$list =[ ]*\\\\$$/,/[^\]$$/p" Makefile.am | \
|
||||
sed -n 's/^ *\([^$$ ]\{1,\}\).*/\1/p'; \
|
||||
done; \
|
||||
for f in `cd $(top_srcdir) && \
|
||||
build-aux/vc-list-files $(subdir) | sed 's!^$(subdir)/!!'`; do \
|
||||
test -f "$$f" && test -x "$$f" && echo "$$f"; \
|
||||
done | sort -u > t2 && \
|
||||
diff -u t1 t2 || exit 1; \
|
||||
rm -f t1 t2; \
|
||||
done; \
|
||||
} | sort | uniq -u | grep . && exit 1 ||:; \
|
||||
else :; fi
|
||||
|
||||
check: vc_exe_in_TESTS
|
||||
|
||||
Reference in new issue
Block a user