Skip to content

Commit

Permalink
tests: Clarify dependencies between tests, 'aggregate-results' and 'c…
Browse files Browse the repository at this point in the history
…lean'

The Makefile targets 'aggregate-results' and 'clean' pretended to be
independent.  This is not true, of course, since aggregate-results
needs the results _before_ they are removed.

Likewise, the tests should have been run already when the results are
to be aggregated.

However, as it is legitimate to run only a few tests, and then aggregate
just those results, so another target is introduced, that depends on all
tests, then aggregates the results, and only then removes the results.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
  • Loading branch information
Johannes Schindelin authored and Junio C Hamano committed Aug 9, 2008
1 parent ff30fff commit e3df89a
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion t/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ SHELL_PATH_SQ = $(subst ','\'',$(SHELL_PATH))
T = $(wildcard t[0-9][0-9][0-9][0-9]-*.sh)
TSVN = $(wildcard t91[0-9][0-9]-*.sh)

all: pre-clean $(T) aggregate-results clean
all: pre-clean
$(MAKE) aggregate-results-and-cleanup

$(T):
@echo "*** $@ ***"; GIT_CONFIG=.git/config '$(SHELL_PATH_SQ)' $@ $(GIT_TEST_OPTS)
Expand All @@ -25,6 +26,10 @@ pre-clean:
clean:
$(RM) -r 'trash directory' test-results

aggregate-results-and-cleanup: $(T)
$(MAKE) aggregate-results
$(MAKE) clean

aggregate-results:
'$(SHELL_PATH_SQ)' ./aggregate-results.sh test-results/t*-*

Expand Down

0 comments on commit e3df89a

Please sign in to comment.