Changeset 6810

Show
Ignore:
Timestamp:
08/09/10 18:15:37 (17 months ago)
Author:
westram
Message:
  • added global test-environment (does nothing yet)
Location:
branches/refactor/UNIT_TESTER
Files:
1 added
4 modified

Legend:

Unmodified
Added
Removed
  • branches/refactor/UNIT_TESTER

    • Property svn:ignore
      •  

        old new  
        55*.gcno 
        66logs 
         7test_environment 
  • branches/refactor/UNIT_TESTER/Makefile

    r6792 r6810  
    22.SUFFIXES: .o .cxx .depend 
    33 
    4 CPP_OBJECTS = \ 
     4TESTER_OBJECTS = \ 
    55        UnitTester.o \ 
    66 
     7GLOBAL_OBJECTS = \ 
     8        TestEnvironment.o \ 
    79 
    8 $(MAIN): $(CPP_OBJECTS) 
    9         $(LINK_STATIC_LIB) $(MAIN) $(CPP_OBJECTS) 
     10CPP_OBJECTS = $(TESTER_OBJECTS) $(GLOBAL_OBJECTS) 
     11 
     12$(MAIN): $(TESTER_OBJECTS) test_environment 
     13        $(LINK_STATIC_LIB) $(MAIN) $(TESTER_OBJECTS) 
     14 
     15test_environment: $(GLOBAL_OBJECTS) $(TESTER_OBJECTS) 
     16        $(LINK_EXECUTABLE) test_environment $(GLOBAL_OBJECTS) $(TESTER_OBJECTS) $(LIBPATH) $(ARBDB_LIB)   
     17 
    1018.cxx.o: 
    1119        $(CPP) $(cflags) -c $<  $(CPPINCLUDES) 
    1220 
    1321clean: 
    14         rm -f $(CPP_OBJECTS)  
     22        rm -f $(CPP_OBJECTS) *.a test_environment  
    1523        $(MAKE) -f Makefile.test clean 
     24 
    1625 
    1726DEPENDS = $(CPP_OBJECTS:.o=.depend) 
     
    3241# For formatting issues see SOURCE_TOOLS/fix_depends.pl 
    3342 
     43TestEnvironment.o: test_global.h 
     44TestEnvironment.o: test_unit.h 
     45TestEnvironment.o: UnitTester.hxx 
     46TestEnvironment.o: $(ARBHOME)/INCLUDE/ad_k_prot.h 
     47TestEnvironment.o: $(ARBHOME)/INCLUDE/ad_prot.h 
     48TestEnvironment.o: $(ARBHOME)/INCLUDE/arb_assert.h 
     49TestEnvironment.o: $(ARBHOME)/INCLUDE/arb_core.h 
     50TestEnvironment.o: $(ARBHOME)/INCLUDE/arb_defs.h 
     51TestEnvironment.o: $(ARBHOME)/INCLUDE/arb_error.h 
     52TestEnvironment.o: $(ARBHOME)/INCLUDE/arbdb.h 
     53TestEnvironment.o: $(ARBHOME)/INCLUDE/arbdb_base.h 
     54TestEnvironment.o: $(ARBHOME)/INCLUDE/arbtools.h 
     55TestEnvironment.o: $(ARBHOME)/INCLUDE/attributes.h 
     56TestEnvironment.o: $(ARBHOME)/INCLUDE/dupstr.h 
     57TestEnvironment.o: $(ARBHOME)/INCLUDE/smartptr.h 
     58 
    3459UnitTester.o: test_global.h 
    3560UnitTester.o: test_unit.h 
  • branches/refactor/UNIT_TESTER/UnitTester.cxx

    r6809 r6810  
    5151// -------------------------------------------------------------------------------- 
    5252 
    53 enum UnitTestResult { 
    54     TEST_OK, 
    55     TEST_TRAPPED, 
    56 }; 
    57  
    5853static const char *readable_result[] = { 
    5954    "OK", 
     
    7974#define SECOND 1000000 
    8075 
    81 static UnitTestResult execute_guarded(UnitTest_function fun, long *duration_usec) { 
     76UnitTestResult execute_guarded(UnitTest_function fun, long *duration_usec) { 
    8277    SigHandler old_handler = INSTALL_SIGHANDLER(SIGSEGV, UNITTEST_sigsegv_handler, "execute_guarded"); 
    8378     
  • branches/refactor/UNIT_TESTER/UnitTester.hxx

    r6746 r6810  
    2424    const char        *location; 
    2525}; 
     26enum UnitTestResult { 
     27    TEST_OK, 
     28    TEST_TRAPPED, 
     29}; 
    2630 
    2731struct UnitTester { 
     
    2933}; 
    3034 
     35UnitTestResult execute_guarded(UnitTest_function fun, long *duration_usec); 
     36 
    3137#else 
    3238#error UnitTester.hxx included twice