source: trunk/test/testcompile.sh@ 3

Last change on this file since 3 was 1, checked in by katerina, 19 years ago

Initial import

File size: 9.5 KB
Line 
1#! /bin/sh
2
3
4# The following two are the ANSI sequences for start and end embolden
5case $TERM in
6vt*|ansi*|con*|xterm*|linux*|screen*)
7 S=[1m
8 E=[m
9 ;;
10*)
11 S=
12 E=
13 ;;
14esac
15
16PW_DIR=`pwd`
17
18if test x$UID != x; then
19 TRUST="--with-trusted=0,2,$UID"
20else
21 TRUST="--with-trusted=0,2"
22fi
23
24#echo; echo "${S}__ STARTING TEST COMPILE __${E}"; echo;
25#echo Working directory: $PW_DIR
26
27MAKE=`which gmake`
28if test "x$?" = x1 ; then
29 MAKE="make -s"
30else
31 MAKE=`which gmake | sed -e "s%\([a-z:]\) .*%\1%g"`
32 if test "x$MAKE" = x; then
33 MAKE="make -s"
34 elif test "x$MAKE" = xno; then
35 MAKE="make -s"
36 else
37 if test "x$MAKE" = "xwhich:"; then
38 MAKE="make -s"
39 else
40 MAKE="gmake -s"
41 gmake -v >/dev/null 2>&1 || MAKE="make -s"
42 fi
43 fi
44fi
45
46#echo MAKE is $MAKE
47#echo
48
49testmake ()
50{
51
52 if test x$1 = x0; then
53 echo "PASS: configure ${TEST}";
54 $MAKE > /dev/null 2>> test_log
55 if test x$? = x0; then
56 echo "PASS: $MAKE ${TEST}";
57 else
58 echo "FAIL: $MAKE ${TEST} (see ./test_log)";
59 fi
60 else
61 echo "FAIL: configure ${TEST} (see ./test_log)";
62 fi
63}
64
65testcompile ()
66{
67 rm -f ./test_log
68
69 #
70 # test standalone compilation
71 #
72 TEST="${S}standalone agent w/suidcheck${E}"
73 #
74 if test -r "Makefile"; then
75 $MAKE distclean
76 fi
77 #
78 ${TOP_SRCDIR}/configure --quiet --prefix=$PW_DIR --localstatedir=$PW_DIR --with-config-file=$PW_DIR/samhainrc.test --enable-suidcheck > /dev/null 2>> test_log
79 #
80 testmake $?
81
82 #
83 # test standalone compilation
84 #
85 TEST="${S}standalone agent w/mounts-check and w/userfiles${E}"
86 #
87 if test -r "Makefile"; then
88 $MAKE distclean
89 fi
90 #
91 ${TOP_SRCDIR}/configure --quiet --prefix=$PW_DIR --localstatedir=$PW_DIR --with-config-file=$PW_DIR/samhainrc.test --enable-mounts-check --enable-userfiles > /dev/null 2>> test_log
92 #
93 testmake $?
94
95
96 #
97 # test standalone compilation
98 #
99 TEST="${S}standalone agent w/timeserver and w/message-queue${E}"
100 #
101 if test -r "Makefile"; then
102 $MAKE clean
103 fi
104 #
105 ${TOP_SRCDIR}/configure --quiet --prefix=$PW_DIR --localstatedir=$PW_DIR --with-config-file=$PW_DIR/samhainrc.test --enable-message-queue --with-timeserver=127.0.0.1 > /dev/null 2>> test_log
106 #
107 testmake $?
108
109 #
110 # test standalone compilation with --with-nocl=PW
111 #
112 TEST="${S}standalone agent w/nocl${E}"
113 #
114 if test -r "Makefile"; then
115 $MAKE clean
116 fi
117 #
118 ${TOP_SRCDIR}/configure --quiet --prefix=$PW_DIR --enable-nocl="owl" --localstatedir=$PW_DIR --with-config-file=$PW_DIR/samhainrc.test > /dev/null 2>> test_log
119 #
120 testmake $?
121
122 #
123 # test standalone compilation w/ debug
124 #
125 TEST="${S}standalone agent w/debug${E}"
126 #
127 if test -r "Makefile"; then
128 $MAKE clean
129 fi
130 #
131 ${TOP_SRCDIR}/configure --quiet --enable-debug --prefix=$PW_DIR --localstatedir=$PW_DIR --with-config-file=$PW_DIR/samhainrc.test > /dev/null 2>> test_log
132 #
133 testmake $?
134
135 #
136 # test standalone compilation w/ gpg
137 #
138 TEST="${S}standalone agent w/gpg${E}"
139 #
140 if test -r "Makefile"; then
141 $MAKE clean
142 fi
143 #
144 ${TOP_SRCDIR}/configure --quiet --with-gpg=/usr/bin/gpg --prefix=$PW_DIR --localstatedir=$PW_DIR --with-config-file=$PW_DIR/samhainrc.test > /dev/null 2>> test_log
145 #
146 testmake $?
147
148 #
149 # test standalone compilation w/stealth
150 #
151 TEST="${S}standalone agent w/stealth${E}"
152 #
153 if test -r "Makefile"; then
154 $MAKE clean
155 fi
156 #
157 ${TOP_SRCDIR}/configure --quiet --enable-stealth=128 --prefix=$PW_DIR --localstatedir=$PW_DIR --with-config-file=$PW_DIR/samhainrc.test > /dev/null 2>> test_log
158 #
159 testmake $?
160
161 #
162 # test standalone compilation w/logwatch
163 #
164 TEST="${S}standalone agent w/login-watch${E}"
165 #
166 if test -r "Makefile"; then
167 $MAKE clean
168 fi
169 #
170 ${TOP_SRCDIR}/configure --quiet --enable-login-watch --prefix=$PW_DIR --localstatedir=$PW_DIR --with-config-file=$PW_DIR/samhainrc.test > /dev/null 2>> test_log
171 #
172 testmake $?
173
174 #
175 # test standalone compilation
176 #
177 TEST="${S}standalone agent w/o mail${E}"
178 #
179 if test -r "Makefile"; then
180 $MAKE clean
181 fi
182 #
183 ${TOP_SRCDIR}/configure --quiet --disable-mail --prefix=$PW_DIR --localstatedir=$PW_DIR --with-config-file=$PW_DIR/samhainrc.test > /dev/null 2>> test_log
184 #
185 testmake $?
186
187 #
188 # test standalone compilation
189 #
190 TEST="${S}standalone agent w/o external scripts${E}"
191 #
192 if test -r "Makefile"; then
193 $MAKE clean
194 fi
195 #
196 ${TOP_SRCDIR}/configure --quiet --disable-external-scripts --prefix=$PW_DIR --localstatedir=$PW_DIR --with-config-file=$PW_DIR/samhainrc.test > /dev/null 2>> test_log
197 #
198 testmake $?
199
200 # echo; echo "${S}__ TEST CLIENT/SERVER __${E}"; echo;
201
202 #
203 # test client/server compilation
204 #
205 TEST="${S}client/server application w/timeserver${E}"
206 #
207 if test -r "Makefile"; then
208 $MAKE clean
209 fi
210 #
211 ${TOP_SRCDIR}/configure --quiet --enable-network=client --enable-srp --prefix=$PW_DIR --localstatedir=$PW_DIR --with-config-file=$PW_DIR/samhainrc.test --with-timeserver=127.0.0.1 > /dev/null 2>> test_log
212 #
213 testmake $?
214 #
215 if test -r "Makefile"; then
216 $MAKE clean
217 fi
218 #
219 ${TOP_SRCDIR}/configure --quiet --enable-network=server --enable-srp --prefix=$PW_DIR --localstatedir=$PW_DIR --with-config-file=$PW_DIR/samhainrc.test --with-timeserver=127.0.0.1 > /dev/null 2>> test_log
220 #
221 testmake $?
222
223 #
224 # test c/s compilation w/ gpg
225 #
226 TEST="${S}client/server application w/gpg${E}"
227 #
228 if test -r "Makefile"; then
229 $MAKE clean
230 fi
231 #
232 ${TOP_SRCDIR}/configure --quiet --enable-network=server --enable-srp --with-gpg=/usr/bin/gpg --prefix=$PW_DIR --localstatedir=$PW_DIR --with-config-file=$PW_DIR/samhainrc.test > /dev/null 2>> test_log
233 #
234 testmake $?
235 #
236 if test -r "Makefile"; then
237 $MAKE clean
238 fi
239 #
240 ${TOP_SRCDIR}/configure --quiet --enable-network=client --enable-srp --with-gpg=/usr/bin/gpg --prefix=$PW_DIR --localstatedir=$PW_DIR --with-config-file=$PW_DIR/samhainrc.test > /dev/null 2>> test_log
241 #
242 testmake $?
243
244
245 #
246 # test client/server compilation
247 #
248 TEST="${S}client/server application w/o srp${E}"
249 #
250 if test -r "Makefile"; then
251 $MAKE clean
252 fi
253 #
254 ${TOP_SRCDIR}/configure --quiet --enable-network=server --disable-srp --prefix=$PW_DIR --localstatedir=$PW_DIR --with-config-file=$PW_DIR/samhainrc.test > /dev/null 2>> test_log
255 #
256 testmake $?
257 #
258 if test -r "Makefile"; then
259 $MAKE clean
260 fi
261 #
262 ${TOP_SRCDIR}/configure --quiet --enable-network=client --disable-srp --prefix=$PW_DIR --localstatedir=$PW_DIR --with-config-file=$PW_DIR/samhainrc.test > /dev/null 2>> test_log
263 #
264 testmake $?
265
266 #
267 # test client/server compilation w/ debug
268 #
269 TEST="${S}client/server application w/debug${E}"
270 #
271 if test -r "Makefile"; then
272 $MAKE clean
273 fi
274 #
275 ${TOP_SRCDIR}/configure --quiet --enable-network=server --enable-debug --prefix=$PW_DIR --localstatedir=$PW_DIR --with-config-file=$PW_DIR/samhainrc.test > /dev/null 2>> test_log
276 #
277 testmake $?
278 #
279 if test -r "Makefile"; then
280 $MAKE clean
281 fi
282 #
283 ${TOP_SRCDIR}/configure --quiet --enable-network=client --enable-debug --prefix=$PW_DIR --localstatedir=$PW_DIR --with-config-file=$PW_DIR/samhainrc.test > /dev/null 2>> test_log
284 #
285 testmake $?
286
287 #
288 # test client/server compilation w/stealth
289 #
290 TEST="${S}client/server application w/stealth${E}"
291 #
292 if test -r "Makefile"; then
293 $MAKE clean
294 fi
295 #
296 ${TOP_SRCDIR}/configure --quiet --enable-network=server --enable-srp --enable-stealth=128 --prefix=$PW_DIR --localstatedir=$PW_DIR --with-config-file=$PW_DIR/samhainrc.test > /dev/null 2>> test_log
297 #
298 testmake $?
299 #
300 if test -r "Makefile"; then
301 $MAKE clean
302 fi
303 #
304 ${TOP_SRCDIR}/configure --quiet --enable-network=client --enable-srp --enable-stealth=128 --prefix=$PW_DIR --localstatedir=$PW_DIR --with-config-file=$PW_DIR/samhainrc.test > /dev/null 2>> test_log
305 #
306 testmake $?
307
308 #
309 # test client/server compilation w/logwatch
310 #
311 TEST="${S}client/server application w/login-watch${E}"
312 #
313 if test -r "Makefile"; then
314 $MAKE clean
315 fi
316 #
317 ${TOP_SRCDIR}/configure --quiet --enable-network=server --enable-srp --enable-login-watch --prefix=$PW_DIR --localstatedir=$PW_DIR --with-config-file=$PW_DIR/samhainrc.test > /dev/null 2>> test_log
318 #
319 testmake $?
320 #
321 if test -r "Makefile"; then
322 $MAKE clean
323 fi
324 #
325 ${TOP_SRCDIR}/configure --quiet --enable-network=client --enable-srp --enable-login-watch --prefix=$PW_DIR --localstatedir=$PW_DIR --with-config-file=$PW_DIR/samhainrc.test > /dev/null 2>> test_log
326 #
327 testmake $?
328
329 #
330 # test client/server compilation
331 #
332 TEST="${S}client/server application w/o mail${E}"
333 #
334 if test -r "Makefile"; then
335 $MAKE clean
336 fi
337 #
338 ${TOP_SRCDIR}/configure --quiet --enable-network=server --disable-mail --enable-srp --enable-stealth=128 --enable-debug --prefix=$PW_DIR --localstatedir=$PW_DIR --with-config-file=$PW_DIR/samhainrc.test > /dev/null 2>> test_log
339 #
340 testmake $?
341 #
342 if test -r "Makefile"; then
343 $MAKE clean
344 fi
345 #
346 ${TOP_SRCDIR}/configure --quiet --enable-network=client --disable-mail --enable-srp --enable-stealth=128 --enable-debug --prefix=$PW_DIR --localstatedir=$PW_DIR --with-config-file=$PW_DIR/samhainrc.test > /dev/null 2>> test_log
347 #
348 testmake $?
349
350 #
351 # test client/server compilation
352 #
353 TEST="${S}client/server application w/o external scripts${E}"
354 #
355 if test -r "Makefile"; then
356 $MAKE clean
357 fi
358 #
359 ${TOP_SRCDIR}/configure --quiet --enable-network=server --disable-srp --disable-external-scripts --prefix=$PW_DIR --localstatedir=$PW_DIR --with-config-file=$PW_DIR/samhainrc.test > /dev/null 2>> test_log
360 #
361 testmake $?
362 #
363 if test -r "Makefile"; then
364 $MAKE clean
365 fi
366 #
367 ${TOP_SRCDIR}/configure --quiet --enable-network=client --disable-srp --disable-external-scripts --prefix=$PW_DIR --localstatedir=$PW_DIR --with-config-file=$PW_DIR/samhainrc.test > /dev/null 2>> test_log
368 #
369 testmake $?
370}
371
372
373
374 testcompile
375
376
377# echo; echo "${S}__ END TEST COMPILE __${E}"; echo;
378
379exit
380
Note: See TracBrowser for help on using the repository browser.