[prev in list] [next in list] [prev in thread] [next in thread] 

List:       boost-build
Subject:    Re: [Boost-build] =?iso-8859-1?q?Trying_to_create_CxxTest_support?=
From:       Zhon Johansen <zhon.johansen () oakleynetworks ! com>
Date:       2007-01-26 1:00:53
Message-ID: 45B952C5.3010902 () oakleynetworks ! com
[Download RAW message or body]

Hi Scott,

Here is my naive implementation to building and running cxxtests:
# Jamroot
import testing ;
path-constant ROOT_DIR : . ;
CXX_TEST_GEN_PL = $(ROOT_DIR)/cxxtest/cxxtestgen.pl ;

actions make-test-runner {
    perl -w $(CXX_TEST_GEN_PL) --error-printer --template
cxxtest/testmain.tpl -o $(<) $(2)
}

rule make-runner ( name * : tested-sources * : tests * : requirements * ) {
    if ! $(tests)     {
        tests = [ sequence.insertion-sort [ glob *Test.h ] ] ;
    }
    make runner.cpp : $(tests) : $(__name__).make-test-runner ;
    unit-test runner : runner.cpp $(tested-sources) : $(requirements) ;
}

# Jamfile in my test directory
TESTED_SOURCES =
        # put for source files or projects here, I recommend projects to
avoid compiling file multiple times 
    ;

make-runner :
    $(TESTED_SOURCES)
    ;

This creates a test runner for each directory.

HTH,

Zhon

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic