]> mj.ucw.cz Git - libucw.git/blob - build/check-customs
Replaced cf_string_node and cf_2string_node by more general simp_node
[libucw.git] / build / check-customs
1 #!/bin/bash
2 # A script for testing compilability of different configurations
3 # (c) 2004--2006 Martin Mares <mj@ucw.cz>
4
5 set -e
6
7 TEST=0
8 ERR=
9
10 function try
11 {
12         TEST=$(($TEST+1))
13         TDIR=tests/$TEST
14         mkdir $TDIR
15         echo "### Test $TEST: $@ ###" | tee $TDIR/log
16
17         (
18                 cd $TDIR
19                 if ! ../../configure $@ CC=gcc-3.4 >>log 2>&1 ; then
20                         echo "  CANNOT CONFIGURE"
21                         ERR=1
22                 elif ! make >>log 2>&1 ; then
23                         echo "  FAILED"
24                         ERR=1
25                 else
26                         echo "  PASSED"
27                 fi
28         )
29 }
30
31 rm -rf tests
32 mkdir tests
33 if [ -n "$1" ] ; then
34         try "$@"
35 else
36         try free                                                                        # the free version
37         try bare -CONFIG_INDEXER -CONFIG_SEARCH                                         # absolutely stripped version
38         try bare CONFIG_ALLOW_ANY                                                       # the bare version
39         try debug/matcher-test                                                          # bare + custom stats and matchers
40         try centrum/cz ROLE=search1-x                                                   # various Centrum.cz configurations
41         try centrum/cz ROLE=indexer
42         try centrum/cz ROLE=gather
43         try centrum/cz ROLE=reap+watson
44         try centrum/cz ROLE=all CONFIG_PARTMAP_IS_MMAP
45         try centrum/pl ROLE=all
46         try debug CONFIG_SHARED                                                         # debugging configuration with shared libs
47         try debug                                                                       # debugging configuration
48 fi
49
50 [ -z "$ERR" ]