Files
statechart/test/Jamfile

166 lines
6.6 KiB
Plaintext

##############################################################################
# (c) Copyright Andreas Huber Doenni 2004-2006
# Distributed under the Boost Software License, Version 1.0. (See accompany-
# ing file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
##############################################################################
subproject libs/statechart/test ;
import testing ; # bring in rules for testing
DEPENDS all : test ; # Make tests run by default.
template statechart-common-options : : <include>$(BOOST_ROOT) ;
local test_monitor = <lib>../../../libs/test/build/boost_test_exec_monitor ;
# Some platforms have either problems with the automatic detection of the
# threading mode (e.g. vc-7_1 & gcc >= 3.4.0) or don't support single-
# threaded mode (e.g. vc-8_0). We therefore manually turn MT off here
local st-requirements = <threading>single <define>BOOST_DISABLE_THREADS ;
local dll = <define>BOOST_STATECHART_TEST_DYNAMIC_LINK ;
local dll-export = $(dll) <define>BOOST_STATECHART_TEST_DLL_EXPORT ;
local normal = ;
local native = <define>BOOST_STATECHART_USE_NATIVE_RTTI ;
local relaxed = <define>BOOST_STATECHART_RELAX_TRANSITION_CONTEXT ;
local both = $(native) $(relaxed) ;
rule statechart-st-lib ( name : cpp-sources + : requirements * )
{
lib $(name)
: $(cpp-sources).cpp <template>statechart-common-options
: $(st-requirements) $(requirements) ;
return <lib>$(name) ;
}
rule statechart-st-dll ( name : cpp-sources + : requirements * )
{
dll $(name)
: $(cpp-sources).cpp <template>statechart-common-options
: $(st-requirements) $(dll-export) $(requirements) ;
return <dll>$(name) ;
}
rule statechart-run ( name : sources + : requirements * )
{
return [ run $(sources) $(test_monitor) <template>statechart-common-options
: : : $(requirements) : $(name) ] ;
}
rule statechart-st-run ( name : sources + : requirements * )
{
return [ statechart-run $(name)
: $(sources) : $(st-requirements) $(requirements) ] ;
}
rule statechart-st-run-variants ( cpp-source )
{
local result ;
result += [ statechart-st-run $(cpp-source)Normal
: $(cpp-source).cpp : $(normal) ] ;
result += [ statechart-st-run $(cpp-source)Native
: $(cpp-source).cpp : $(native) ] ;
result += [ statechart-st-run $(cpp-source)Relaxed
: $(cpp-source).cpp : $(relaxed) ] ;
result += [ statechart-st-run $(cpp-source)Both
: $(cpp-source).cpp : $(both) ] ;
return $(result) ;
}
rule statechart-compile-fail ( name : cpp-sources + : requirements * )
{
return
[ compile-fail $(cpp-sources).cpp <template>statechart-common-options
: $(requirements) : $(name) ] ;
}
rule statechart-compile-fail-variants ( cpp-source )
{
local result ;
result += [ statechart-compile-fail $(cpp-source)Normal
: $(cpp-source) : $(normal) ] ;
result += [ statechart-compile-fail $(cpp-source)Native
: $(cpp-source) : $(native) ] ;
result += [ statechart-compile-fail $(cpp-source)Relaxed
: $(cpp-source) : $(relaxed) ] ;
result += [ statechart-compile-fail $(cpp-source)Both
: $(cpp-source) : $(both) ] ;
return $(result) ;
}
rule statechart-st-lib-run (
name : exe-cpp-sources + : lib-cpp-sources + : requirements * )
{
return [ statechart-st-run $(name)
: $(exe-cpp-sources).cpp
[ statechart-st-lib $(name)Lib
: $(lib-cpp-sources) : $(requirements) ]
: $(requirements) ] ;
}
rule statechart-st-dll-run (
name : exe-cpp-sources + : dll-cpp-sources + : requirements * )
{
return [ statechart-st-run $(name)
: $(exe-cpp-sources).cpp
[ statechart-st-dll $(name)Dll
: $(dll-cpp-sources) : $(requirements) ]
: $(dll) $(requirements) ] ;
}
rule statechart-st-compile-example ( name : directory : cpp-sources + )
{
return [ link ../example/$(directory)/$(cpp-sources).cpp
<template>statechart-common-options
: $(st-requirements) : $(name)Example ] ;
}
test-suite statechart
: [ statechart-compile-fail-variants InvalidChartTest1 ]
[ statechart-compile-fail-variants InvalidChartTest2 ]
[ statechart-compile-fail-variants InvalidChartTest3 ]
[ statechart-st-run-variants TransitionTest ]
[ statechart-compile-fail-variants InvalidTransitionTest1 ]
[ statechart-compile-fail-variants InvalidTransitionTest2 ]
[ statechart-st-run-variants InStateReactionTest ]
[ statechart-st-run-variants TerminationTest ]
[ statechart-st-run-variants DeferralTest ]
[ statechart-st-run-variants CustomReactionTest ]
[ statechart-compile-fail-variants InvalidResultAssignTest ]
[ statechart-compile-fail-variants InvalidResultDefCtorTest ]
[ statechart-st-run-variants InvalidResultCopyTest ]
[ statechart-st-run-variants UnconsumedResultTest ]
[ statechart-st-run-variants HistoryTest ]
[ statechart-compile-fail-variants InconsistentHistoryTest1 ]
[ statechart-compile-fail-variants InconsistentHistoryTest2 ]
[ statechart-compile-fail-variants InconsistentHistoryTest3 ]
[ statechart-compile-fail-variants InconsistentHistoryTest4 ]
[ statechart-compile-fail-variants InconsistentHistoryTest5 ]
[ statechart-compile-fail-variants InconsistentHistoryTest6 ]
[ statechart-compile-fail-variants InconsistentHistoryTest7 ]
[ statechart-compile-fail-variants InconsistentHistoryTest8 ]
[ statechart-compile-fail-variants UnsupportedDeepHistoryTest ]
[ statechart-st-run-variants StateCastTest ]
[ statechart-st-run-variants TypeInfoTest ]
[ statechart-st-run-variants StateIterationTest ]
[ statechart-st-run-variants FifoSchedulerTest ]
[ statechart-st-lib-run LibTestNormal : TuTestMain : TuTest : $(normal) ]
[ statechart-st-lib-run LibTestNative : TuTestMain : TuTest : $(native) ]
[ statechart-st-dll-run DllTestNormal : TuTestMain : TuTest : $(normal) ]
[ statechart-st-dll-run DllTestNative : TuTestMain : TuTest : $(native) ]
[ statechart-st-compile-example BitMachine : BitMachine : BitMachine ]
[ statechart-st-compile-example Camera
: Camera : Camera Configuring Main Shooting ]
[ statechart-st-compile-example Handcrafted : Handcrafted : Handcrafted ]
[ statechart-st-compile-example Keyboard : Keyboard : Keyboard : ]
[ statechart-st-compile-example Performance : Performance : Performance ]
[ statechart-st-compile-example PingPong : PingPong : PingPong ]
[ statechart-st-compile-example StopWatch : StopWatch : StopWatch ]
[ statechart-st-compile-example StopWatch2 : StopWatch : StopWatch2 ] ;