1 | ############################################################################## |
---|
2 | # Copyright 2005-2006 Andreas Huber Doenni |
---|
3 | # Distributed under the Boost Software License, Version 1.0. (See accompany- |
---|
4 | # ing file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) |
---|
5 | ############################################################################## |
---|
6 | |
---|
7 | project libs/statechart/test ; |
---|
8 | |
---|
9 | local test_monitor = |
---|
10 | ../../../libs/test/build//boost_test_exec_monitor/<link>static ; |
---|
11 | # Some platforms have either problems with the automatic detection of the |
---|
12 | # threading mode (e.g. vc-7_1 & gcc >= 3.4.0) or don't support single- |
---|
13 | # threaded mode (e.g. vc-8_0). We therefore manually turn MT off here |
---|
14 | local st-requirements = <define>BOOST_DISABLE_THREADS ; |
---|
15 | local dll = <define>BOOST_STATECHART_TEST_DYNAMIC_LINK ; |
---|
16 | local dll-export = $(dll) <define>BOOST_STATECHART_TEST_DLL_EXPORT ; |
---|
17 | |
---|
18 | local normal = ; |
---|
19 | local native = <define>BOOST_STATECHART_USE_NATIVE_RTTI ; |
---|
20 | local relaxed = <define>BOOST_STATECHART_RELAX_TRANSITION_CONTEXT ; |
---|
21 | local both = $(native) $(relaxed) ; |
---|
22 | |
---|
23 | rule independent-obj-build ( name : cpp-sources + : requirements * ) |
---|
24 | { |
---|
25 | local objs ; |
---|
26 | |
---|
27 | for local cpp-source in $(cpp-sources) |
---|
28 | { |
---|
29 | obj $(name)$(cpp-source) : $(cpp-source).cpp : $(requirements) ; |
---|
30 | objs += $(name)$(cpp-source) ; |
---|
31 | } |
---|
32 | |
---|
33 | return $(objs) ; |
---|
34 | } |
---|
35 | |
---|
36 | rule statechart-st-lib ( name : cpp-sources + : requirements * ) |
---|
37 | { |
---|
38 | lib $(name) |
---|
39 | : [ independent-obj-build $(name) |
---|
40 | : $(cpp-sources) |
---|
41 | : <threading>single $(st-requirements) |
---|
42 | <link>shared:$(dll-export) $(requirements) ] ; |
---|
43 | |
---|
44 | return $(name) ; |
---|
45 | } |
---|
46 | |
---|
47 | rule statechart-run ( name : sources + : requirements * ) |
---|
48 | { |
---|
49 | return [ run $(sources) $(test_monitor) : : : $(requirements) : $(name) ] ; |
---|
50 | } |
---|
51 | |
---|
52 | rule statechart-st-run ( name : sources + : requirements * ) |
---|
53 | { |
---|
54 | return [ statechart-run $(name) : $(sources) |
---|
55 | : <threading>single $(st-requirements) $(requirements) ] ; |
---|
56 | } |
---|
57 | |
---|
58 | rule statechart-st-run-variants ( cpp-source ) |
---|
59 | { |
---|
60 | local result ; |
---|
61 | |
---|
62 | result += [ statechart-st-run $(cpp-source)Normal |
---|
63 | : $(cpp-source).cpp : $(normal) ] ; |
---|
64 | result += [ statechart-st-run $(cpp-source)Native |
---|
65 | : $(cpp-source).cpp : $(native) ] ; |
---|
66 | result += [ statechart-st-run $(cpp-source)Relaxed |
---|
67 | : $(cpp-source).cpp : $(relaxed) ] ; |
---|
68 | result += [ statechart-st-run $(cpp-source)Both |
---|
69 | : $(cpp-source).cpp : $(both) ] ; |
---|
70 | |
---|
71 | return $(result) ; |
---|
72 | } |
---|
73 | |
---|
74 | rule statechart-compile-fail ( name : cpp-sources + : requirements * ) |
---|
75 | { |
---|
76 | return [ compile-fail $(cpp-sources).cpp : $(requirements) : $(name) ] ; |
---|
77 | } |
---|
78 | |
---|
79 | rule statechart-compile-fail-variants ( cpp-source ) |
---|
80 | { |
---|
81 | local result ; |
---|
82 | |
---|
83 | result += [ statechart-compile-fail $(cpp-source)Normal |
---|
84 | : $(cpp-source) : $(normal) ] ; |
---|
85 | result += [ statechart-compile-fail $(cpp-source)Native |
---|
86 | : $(cpp-source) : $(native) ] ; |
---|
87 | result += [ statechart-compile-fail $(cpp-source)Relaxed |
---|
88 | : $(cpp-source) : $(relaxed) ] ; |
---|
89 | result += [ statechart-compile-fail $(cpp-source)Both |
---|
90 | : $(cpp-source) : $(both) ] ; |
---|
91 | |
---|
92 | return $(result) ; |
---|
93 | } |
---|
94 | |
---|
95 | rule statechart-st-lib-run ( |
---|
96 | name : exe-cpp-sources + : lib-cpp-sources + : requirements * ) |
---|
97 | { |
---|
98 | return [ statechart-st-run $(name) |
---|
99 | : $(exe-cpp-sources).cpp |
---|
100 | [ statechart-st-lib $(name)Lib |
---|
101 | : $(lib-cpp-sources) : $(requirements) ] |
---|
102 | : <link>shared:$(dll) $(requirements) ] ; |
---|
103 | } |
---|
104 | |
---|
105 | rule statechart-st-compile-example ( name : directory : cpp-sources + ) |
---|
106 | { |
---|
107 | return [ link ../example/$(directory)/$(cpp-sources).cpp |
---|
108 | : <threading>single $(st-requirements) : $(name)Example ] ; |
---|
109 | } |
---|
110 | |
---|
111 | test-suite statechart |
---|
112 | : [ statechart-compile-fail-variants InvalidChartTest1 ] |
---|
113 | [ statechart-compile-fail-variants InvalidChartTest2 ] |
---|
114 | [ statechart-compile-fail-variants InvalidChartTest3 ] |
---|
115 | [ statechart-st-run-variants TransitionTest ] |
---|
116 | [ statechart-compile-fail-variants InvalidTransitionTest1 ] |
---|
117 | [ statechart-compile-fail-variants InvalidTransitionTest2 ] |
---|
118 | [ statechart-st-run-variants InStateReactionTest ] |
---|
119 | [ statechart-st-run-variants TerminationTest ] |
---|
120 | [ statechart-st-run-variants DeferralTest ] |
---|
121 | [ statechart-st-run-variants CustomReactionTest ] |
---|
122 | [ statechart-compile-fail-variants InvalidResultAssignTest ] |
---|
123 | [ statechart-compile-fail-variants InvalidResultDefCtorTest ] |
---|
124 | [ statechart-st-run-variants InvalidResultCopyTest ] |
---|
125 | [ statechart-st-run-variants UnconsumedResultTest ] |
---|
126 | [ statechart-st-run-variants HistoryTest ] |
---|
127 | [ statechart-compile-fail-variants InconsistentHistoryTest1 ] |
---|
128 | [ statechart-compile-fail-variants InconsistentHistoryTest2 ] |
---|
129 | [ statechart-compile-fail-variants InconsistentHistoryTest3 ] |
---|
130 | [ statechart-compile-fail-variants InconsistentHistoryTest4 ] |
---|
131 | [ statechart-compile-fail-variants InconsistentHistoryTest5 ] |
---|
132 | [ statechart-compile-fail-variants InconsistentHistoryTest6 ] |
---|
133 | [ statechart-compile-fail-variants InconsistentHistoryTest7 ] |
---|
134 | [ statechart-compile-fail-variants InconsistentHistoryTest8 ] |
---|
135 | [ statechart-compile-fail-variants UnsuppDeepHistoryTest ] |
---|
136 | [ statechart-st-run-variants StateCastTest ] |
---|
137 | [ statechart-st-run-variants TypeInfoTest ] |
---|
138 | [ statechart-st-run-variants StateIterationTest ] |
---|
139 | [ statechart-st-run-variants FifoSchedulerTest ] |
---|
140 | [ statechart-st-lib-run LibTestNormal |
---|
141 | : TuTestMain : TuTest : <link>static $(normal) ] |
---|
142 | [ statechart-st-lib-run LibTestNative |
---|
143 | : TuTestMain : TuTest : <link>static $(native) ] |
---|
144 | [ statechart-st-lib-run DllTestNormal |
---|
145 | : TuTestMain : TuTest : <link>shared $(normal) ] |
---|
146 | [ statechart-st-lib-run DllTestNative |
---|
147 | : TuTestMain : TuTest : <link>shared $(native) ] |
---|
148 | [ statechart-st-compile-example BitMachine : BitMachine : BitMachine ] |
---|
149 | [ statechart-st-compile-example Camera |
---|
150 | : Camera : Camera Configuring Main Shooting ] |
---|
151 | [ statechart-st-compile-example Handcrafted : Handcrafted : Handcrafted ] |
---|
152 | [ statechart-st-compile-example Keyboard : Keyboard : Keyboard : ] |
---|
153 | [ statechart-st-compile-example Performance : Performance : Performance ] |
---|
154 | [ statechart-st-compile-example PingPong : PingPong : PingPong ] |
---|
155 | [ statechart-st-compile-example StopWatch : StopWatch : StopWatch ] |
---|
156 | [ statechart-st-compile-example StopWatch2 : StopWatch : StopWatch2 ] ; |
---|