]> mj.ucw.cz Git - libucw.git/blobdiff - build/check-customs
added sh_stat_t
[libucw.git] / build / check-customs
index 237437a5c88fdc2b7e8ed969579ebe0307c3c26c..5656f242db222779120a2f6f447ad3a5aac9b998 100755 (executable)
@@ -1,6 +1,6 @@
 #!/bin/bash
 # A script for testing compilability of different configurations
-# (c) 2004 Martin Mares <mj@ucw.cz>
+# (c) 2004--2005 Martin Mares <mj@ucw.cz>
 
 set -e
 
@@ -9,56 +9,39 @@ TEST=0
 function try
 {
        TEST=$(($TEST+1))
-       LOG=test$TEST.log
-       echo "### Test $TEST: $@ ###" | tee $LOG
-
-       CUST=$1
-       shift
-       SUBST=
-       APP="!!### Added by check-customs:"
-       while [ -n "$1" ] ; do
-               X=$1
-               Y=${X#!}
-               if [ "$X" != "$Y" ] ; then
-                       SUBST="${S}/^$Y/s/^/# /;"
-               else
-                       APP="$APP!$X"
+       TDIR=tests/$TEST
+       mkdir $TDIR
+       echo "### Test $TEST: $@ ###" | tee $TDIR/log
+
+       (
+               cd $TDIR
+               if ! ../../configure $@ CC=gcc-3.0 >>log 2>&1 ; then
+                       echo "  CANNOT CONFIGURE"
+                       exit 1
                fi
-               shift
-       done
-       rm -rf custom
-       cp -a $CUST custom
-       sed "$SUBST;p;d" <$CUST/config.mk >custom/config.mk
-       echo $APP | tr ! '\n' >>custom/config.mk
-
-       make clean >>$LOG 2>&1
-       rm run/cf/*
-       if ! make >>$LOG 2>&1 ; then
-               echo "  FAILED"
-               exit 1
-       fi
-       echo "  PASSED"
+               if ! make >>log 2>&1 ; then
+                       echo "  FAILED"
+                       exit 1
+               fi
+               echo "  PASSED"
+       )
 }
 
-if [ -e custom -a ! -e custom.old ] ; then
-       mv custom custom.old
-fi
-
-rm -f test*.log
+rm -rf tests
+mkdir tests
 if [ -n "$1" ] ; then
        try "$@"
 else
        try free                                                                        # the free version
-       try bare !CONFIG_INDEXER !CONFIG_SEARCH                                         # absolutely stripped version
+       try bare -CONFIG_INDEXER -CONFIG_SEARCH                                         # absolutely stripped version
        try bare                                                                        # the bare version
-       try centrum !CONFIG_GATHERER !CONFIG_GATHERD !CONFIG_SHEPHERD !CONFIG_REAPD !CONFIG_INDEXER !CONFIG_MUX !CONFIG_WATSON  # search servers
-       try centrum !CONFIG_GATHERER !CONFIG_GATHERD !CONFIG_SHEPHERD !CONFIG_REAPD !CONFIG_MUX !CONFIG_WATSON  # indexing server
-       try centrum !CONFIG_GATHERD !CONFIG_SHEPHERD !CONFIG_INDEXER !CONFIG_SEARCH !CONFIG_MUX !CONFIG_WATSON  # reapd server
-       try centrum                                                                     # full Centrum config
-       try debug/custom                                                                # debugging configuration
-fi
-
-rm -rf custom
-if [ -e custom.old ] ; then
-       mv custom.old custom
+       try debug/matcher-test                                                          # bare + custom stats and matchers
+       try centrum/cz ROLE=search                                                      # various Centrum.cz configurations
+       try centrum/cz ROLE=indexer
+       try centrum/cz ROLE=gather
+       try centrum/cz ROLE=reap+watson
+       try centrum/cz ROLE=all
+       try centrum/pl
+       try debug CONFIG_SHARED                                                         # debugging configuration with shared libs
+       try debug                                                                       # debugging configuration
 fi