Show
Ignore:
Timestamp:
08/09/10 15:57:32 (21 months ago)
Author:
westram
Message:
  • unit-tester switches to run directory itself
    • eliminates path hack for valgrind
  • control leak-check by variable
Files:
1 modified

Legend:

Unmodified
Added
Removed
  • branches/refactor/UNIT_TESTER/Makefile.test

    r6758 r6809  
    1515# ---------------------------------------------------------- 
    1616 
     17# @@@ valgrind makes tests fail atm 
     18# (most likely two pt-servers try to start parallel on the same port) 
     19 
    1720VALGRIND=0# only test 
    1821#VALGRIND=1# run valgrind after sucessful test 
    1922#VALGRIND=2# run valgrind before test (useful if test traps w/o any helpful information) 
     23 
     24#CHECK_LEAKS=0# check no leaks 
     25CHECK_LEAKS=1# check definite leaks 
     26#CHECK_LEAKS=2# check reachable leaks 
    2027 
    2128# ---------------------------------------------------------- 
     
    2936# 
    3037RESTRICT_LIB=# run all tests 
     38#RESTRICT_LIB=AWTC# test only this library 
    3139#RESTRICT_LIB=mkptypes# test only these libraries 
    3240#RESTRICT_LIB=client:arb_probe:AWTC# test only these libraries 
     
    8189 
    8290DESTDIR=tests 
    83 RUNDIR=run 
    84 RUN2HERE=..# prefix from RUNDIR to here (UNIT_TESTER) 
     91RUNDIR=run# see also UnitTester.cxx@chdir 
    8592 
    8693SYMLIST=$(DESTDIR)/$(UNIQUE_NAME).sym 
     
    152159        @echo "LINKDEPS       ='$(LINKDEPS)'" 
    153160 
     161ifeq ($(CHECK_LEAKS),0) 
     162        LEAKS:= 
     163else 
     164ifeq ($(CHECK_LEAKS),1) 
     165        LEAKS:=-l 
     166else 
     167        LEAKS:=-l -r 
     168endif 
     169endif 
     170 
    154171valgrind: 
    155172        echo "Valgrinding.." 
    156         cd $(RUNDIR);$(ARBHOME)/SOURCE_TOOLS/arb_valgrind -q -l -r -c 15 $(RUN2HERE)/$(TEST_EXE) 
     173        $(ARBHOME)/SOURCE_TOOLS/arb_valgrind -q $(LEAKS) -c 15 $(TEST_EXE) 
    157174 
    158175perform_test: $(TEST_EXE) 
     
    161178        $(MAKE) -f Makefile.test valgrind 
    162179endif 
    163         cd $(RUNDIR);$(RUN2HERE)/$(TEST_EXE) 
     180        $(TEST_EXE)  
    164181ifeq ($(COVERAGE),1) 
    165182        @echo "-------------------- test-coverage for $(UNITLIBNAME)"