update for compatibility with recent nobug master
authorChristian Thaeter <ct@pipapo.org>
Mon, 30 Jul 2007 16:56:42 +0000 (18:56 +0200)
committerChristian Thaeter <ct@pipapo.org>
Mon, 30 Jul 2007 16:56:42 +0000 (18:56 +0200)
configure.ac
lib/acogc.c
tests/Makefile.am
tests/test.sh

index aee5349..eced92d 100644 (file)
@@ -28,27 +28,18 @@ AC_STDC_HEADERS
 AC_PROG_RANLIB
 
 
-AC_ARG_ENABLE(nobug,
-              AC_HELP_STRING([--enable-nobug=level],
-                [select NoBug build level as ALPHA, BETA or RELEASE, ALPHA is the default])
-)
-
-
-dnl --enable-alpha --enable-beta --enable-release instead?
-case "$enable_nobug" in
-A* | a*)
-        AC_DEFINE(EBUG_ALPHA)
-        ;;
-B* | b*)
-        AC_DEFINE(EBUG_BETA)
-        ;;
-R* | r*)
-        AC_DEFINE(NDEBUG)
-        ;;
-*)
-        AC_DEFINE(EBUG_ALPHA)
-        ;;
-esac
+AC_ARG_ENABLE(alpha, AC_HELP_STRING([--enable-alpha], [select NoBug ALPHA build level]),
+              AC_DEFINE(EBUG_ALPHA),
+[
+AC_ARG_ENABLE(beta, AC_HELP_STRING([--enable-beta], [select NoBug BETA build level]),
+              AC_DEFINE(EBUG_BETA),
+[
+AC_ARG_ENABLE(release, AC_HELP_STRING([--enable-release], [select NoBug RELEASE build level]),
+              AC_DEFINE(NDEBUG),
+
+dnl default case
+              AC_DEFINE(EBUG_ALPHA)
+)])])
 
 AC_CHECK_HEADER(nobug.h, break, AC_MSG_ERROR(nobug.h required))
 
index e6713ca..07a2c73 100644 (file)
 
 /* nobug init*/
 NOBUG_DEFINE_FLAG(acogc);
-NOBUG_DEFINE_FLAG(acogc_mark);
-NOBUG_DEFINE_FLAG(acogc_collect);
-NOBUG_DEFINE_FLAG(acogc_alloc);
-NOBUG_DEFINE_FLAG(acogc_weak);
+NOBUG_DEFINE_FLAG_PARENT(acogc_mark, acogc);
+NOBUG_DEFINE_FLAG_PARENT(acogc_collect, acogc);
+NOBUG_DEFINE_FLAG_PARENT(acogc_alloc, acogc);
+NOBUG_DEFINE_FLAG_PARENT(acogc_weak, acogc);
 
 void acogc_nobug_init()
 {
index 1eaaaa9..6f9e2fe 100644 (file)
@@ -16,7 +16,7 @@
 
 noinst_PROGRAMS = test-acogc
 
-test_acogc_LDADD = ../lib/libacogc.a
+test_acogc_LDADD = ../lib/libacogc.a -lnobug
 
 TESTS = test.sh
 
index dca3734..6d89f7b 100755 (executable)
@@ -84,13 +84,14 @@ function TEST()
         esac
 
         TESTCNT=$(($TESTCNT + 1))
-       if $valgrind $TESTBIN "$@" 2>&1 | tee ,tmp | grep -v 'debug:' | cmp ,cmp - &>/dev/null; then
+       if $valgrind $TESTBIN "$@" 2>&1 | tee ,tmp \
+            | grep -v ': \(TRACE\|INFO\|NOTICE\|WARNING\|ERR\):' | cmp ,cmp - &>/dev/null; then
             echo ".. OK$MSGOK"
             echo ".. OK$MSGOK" >>,testlog
         else
             echo ".. FAILED$MSGFAIL";
             echo ".. FAILED$MSGFAIL" >>,testlog
-            grep -v 'DEBUG:' <,tmp >,out
+            grep -v ': \(TRACE\|INFO\|NOTICE\|WARNING\|ERR\):' <,tmp >,out
             diff -ua ,cmp ,out >>,testlog
             # grep 'DEBUG:\|==.*==' <,tmp >>,testlog
             cat ,tmp >>,testlog