From ead96f9ede398eb34f23ee75317062963b460942 Mon Sep 17 00:00:00 2001 From: Pádraig Brady Date: Mon, 17 Oct 2011 11:20:01 +0100 Subject: 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. --- tests/check.mk | 24 ++++++++++-------------- 1 file changed, 10 insertions(+), 14 deletions(-) (limited to 'tests') diff --git a/tests/check.mk b/tests/check.mk index d45c2885f..557d41a7a 100644 --- a/tests/check.mk +++ b/tests/check.mk @@ -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 -- cgit v1.2.3-70-g09d2