blob: 53ae492d01f074688bc08634092153420623d606 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
|
#!/bin/bash
export XOPT XDEFS
XOPT="-ggdb -O2 -fomit-frame-pointer -DDELAY_BETWEEN_TESTS=0"
XDEFS=""
function clean() {
make clean > /dev/null
}
function compile() {
echo -n " * Building..."
if ! make > buildlog.txt
then
echo "failed"
clean
exit
fi
echo "OK"
}
function execute_test() {
echo -n " * Testing..."
if ! ./ch > testlog.txt
then
echo "failed"
clean
exit
fi
echo "OK"
clean
}
echo "Default maximum settings"
compile
execute_test
echo "CH_CFG_OPTIMIZE_SPEED=FALSE"
XDEFS=-DCH_CFG_OPTIMIZE_SPEED=FALSE
compile
execute_test
echo "CH_CFG_TIME_QUANTUM=0"
XDEFS=-DCH_CFG_TIME_QUANTUM=0
compile
execute_test
echo "CH_CFG_USE_REGISTRY=FALSE"
XDEFS=-DCH_CFG_USE_REGISTRY=FALSE
compile
execute_test
echo "CH_CFG_USE_SEMAPHORES=FALSE CH_CFG_USE_MAILBOXES=FALSE"
XDEFS="-DCH_CFG_USE_SEMAPHORES=FALSE -DCH_CFG_USE_MAILBOXES=FALSE"
compile
execute_test
echo "CH_CFG_USE_SEMAPHORES_PRIORITY=TRUE"
XDEFS=-DCH_CFG_USE_SEMAPHORES_PRIORITY=TRUE
compile
execute_test
echo "CH_CFG_USE_MUTEXES=FALSE CH_CFG_USE_CONDVARS=FALSE"
XDEFS="-DCH_CFG_USE_MUTEXES=FALSE -DCH_CFG_USE_CONDVARS=FALSE"
compile
execute_test
echo "CH_CFG_USE_MUTEXES_RECURSIVE=TRUE"
XDEFS=-DCH_CFG_USE_MUTEXES_RECURSIVE=TRUE
compile
execute_test
echo "CH_CFG_USE_CONDVARS=FALSE"
XDEFS=-DCH_CFG_USE_CONDVARS=FALSE
compile
execute_test
echo "CH_CFG_USE_CONDVARS_TIMEOUT=FALSE"
XDEFS=-DCH_CFG_USE_CONDVARS_TIMEOUT=FALSE
compile
execute_test
echo "CH_CFG_USE_EVENTS=FALSE"
XDEFS=-DCH_CFG_USE_EVENTS=FALSE
compile
execute_test
echo "CH_CFG_USE_EVENTS_TIMEOUT=FALSE"
XDEFS=-DCH_CFG_USE_EVENTS_TIMEOUT=FALSE
compile
execute_test
echo "CH_CFG_USE_MESSAGES=FALSE"
XDEFS=-DCH_CFG_USE_MESSAGES=FALSE
compile
execute_test
echo "CH_CFG_USE_MESSAGES_PRIORITY=TRUE"
XDEFS=-DCH_CFG_USE_MESSAGES_PRIORITY=TRUE
compile
execute_test
echo "CH_CFG_USE_MAILBOXES=FALSE"
XDEFS=-DCH_CFG_USE_MAILBOXES=FALSE
compile
execute_test
echo "CH_CFG_USE_MEMCORE=FALSE CH_CFG_USE_MEMPOOLS=FALSE CH_CFG_USE_HEAP=FALSE CH_CFG_USE_DYNAMIC=FALSE"
XDEFS="-DCH_CFG_USE_MEMCORE=FALSE -DCH_CFG_USE_MEMPOOLS=FALSE -DCH_CFG_USE_HEAP=FALSE -DCH_CFG_USE_DYNAMIC=FALSE"
compile
execute_test
echo "CH_CFG_USE_MEMPOOLS=FALSE CH_CFG_USE_HEAP=FALSE CH_CFG_USE_DYNAMIC=FALSE"
XDEFS="-DCH_CFG_USE_MEMPOOLS=FALSE -DCH_CFG_USE_HEAP=FALSE -DCH_CFG_USE_DYNAMIC=FALSE"
compile
execute_test
echo "CH_CFG_USE_MEMPOOLS=FALSE"
XDEFS="-DCH_CFG_USE_MEMPOOLS=FALSE"
compile
execute_test
echo "CH_CFG_USE_HEAP=FALSE"
XDEFS="-DCH_CFG_USE_HEAP=FALSE"
compile
execute_test
echo "CH_CFG_USE_DYNAMIC=FALSE"
XDEFS=-DCH_CFG_USE_DYNAMIC=FALSE
compile
execute_test
#echo "CH_DBG_STATISTICS=TRUE"
#XDEFS=-DCH_DBG_STATISTICS=TRUE
#compile
#execute_test
echo "CH_DBG_SYSTEM_STATE_CHECK=TRUE"
XDEFS=-DCH_DBG_SYSTEM_STATE_CHECK=TRUE
compile
execute_test
echo "CH_DBG_ENABLE_CHECKS=TRUE"
XDEFS=-DCH_DBG_ENABLE_CHECKS=TRUE
compile
execute_test
echo "CH_DBG_ENABLE_ASSERTS=TRUE"
XDEFS=-DCH_DBG_ENABLE_ASSERTS=TRUE
compile
execute_test
echo "CH_DBG_ENABLE_TRACE=TRUE"
XDEFS=-DCH_DBG_ENABLE_TRACE=TRUE
compile
execute_test
#echo "CH_DBG_ENABLE_STACK_CHECK=TRUE"
#XDEFS=-DCH_DBG_ENABLE_STACK_CHECK=TRUE
#compile
#execute_test
echo "CH_DBG_FILL_THREADS=TRUE"
XDEFS=-DCH_DBG_FILL_THREADS=TRUE
compile
execute_test
echo "CH_DBG_THREADS_PROFILING=FALSE"
XDEFS=-DCH_DBG_THREADS_PROFILING=FALSE
compile
execute_test
echo "CH_DBG_SYSTEM_STATE_CHECK=TRUE CH_DBG_ENABLE_CHECKS=TRUE CH_DBG_ENABLE_ASSERTS=TRUE CH_DBG_ENABLE_TRACE=TRUE CH_DBG_FILL_THREADS=TRUE"
XDEFS="-DCH_DBG_SYSTEM_STATE_CHECK=TRUE -DCH_DBG_ENABLE_CHECKS=TRUE -DCH_DBG_ENABLE_ASSERTS=TRUE -DCH_DBG_ENABLE_TRACE=TRUE -DCH_DBG_FILL_THREADS=TRUE"
compile
execute_test
|