t / Makefileon commit Merge branch 'ps/gitweb--browse-chrome' (2ad6b14)
   1# Run tests
   2#
   3# Copyright (c) 2005 Junio C Hamano
   4#
   5
   6-include ../config.mak
   7
   8#GIT_TEST_OPTS=--verbose --debug
   9SHELL_PATH ?= $(SHELL)
  10TAR ?= $(TAR)
  11RM ?= rm -f
  12
  13# Shell quote;
  14SHELL_PATH_SQ = $(subst ','\'',$(SHELL_PATH))
  15
  16T = $(wildcard t[0-9][0-9][0-9][0-9]-*.sh)
  17TSVN = $(wildcard t91[0-9][0-9]-*.sh)
  18
  19all: pre-clean
  20        $(MAKE) aggregate-results-and-cleanup
  21
  22$(T):
  23        @echo "*** $@ ***"; GIT_CONFIG=.git/config '$(SHELL_PATH_SQ)' $@ $(GIT_TEST_OPTS)
  24
  25pre-clean:
  26        $(RM) -r test-results
  27
  28clean:
  29        $(RM) -r 'trash directory'.* test-results
  30        $(RM) t????/cvsroot/CVSROOT/?*
  31        $(RM) -r valgrind/bin
  32
  33aggregate-results-and-cleanup: $(T)
  34        $(MAKE) aggregate-results
  35        $(MAKE) clean
  36
  37aggregate-results:
  38        '$(SHELL_PATH_SQ)' ./aggregate-results.sh test-results/t*-*
  39
  40# we can test NO_OPTIMIZE_COMMITS independently of LC_ALL
  41full-svn-test:
  42        $(MAKE) $(TSVN) GIT_SVN_NO_OPTIMIZE_COMMITS=1 LC_ALL=C
  43        $(MAKE) $(TSVN) GIT_SVN_NO_OPTIMIZE_COMMITS=0 LC_ALL=en_US.UTF-8
  44
  45valgrind:
  46        GIT_TEST_OPTS=--valgrind $(MAKE)
  47
  48.PHONY: pre-clean $(T) aggregate-results clean valgrind