Fix tests

This commit is contained in:
c9s 2014-05-18 13:15:53 +08:00
parent 60991c3d73
commit cde6e5de31
6 changed files with 36 additions and 26 deletions

View file

@ -427,7 +427,7 @@ $config_commands
Report bugs to the package provider."
ac_cs_config=""
ac_cs_config="'--enable-graphviz'"
ac_cs_version="\
r3 config.status 1.0.0
configured by ./configure, generated by GNU Autoconf 2.69,
@ -519,7 +519,7 @@ if $ac_cs_silent; then
fi
if $ac_cs_recheck; then
set X /bin/sh './configure' $ac_configure_extra_args --no-create --no-recursion
set X /bin/sh './configure' '--enable-graphviz' $ac_configure_extra_args --no-create --no-recursion
shift
$as_echo "running CONFIG_SHELL=/bin/sh $*" >&6
CONFIG_SHELL='/bin/sh'
@ -818,12 +818,12 @@ S["am__EXEEXT_TRUE"]="#"
S["LTLIBOBJS"]=""
S["DEPS_LIBS"]="-L/opt/local/lib -lpcre -lcheck "
S["DEPS_CFLAGS"]="-D_THREAD_SAFE -I/opt/local/include "
S["ENABLE_GRAPHVIZ_FALSE"]=""
S["ENABLE_GRAPHVIZ_TRUE"]="#"
S["ENABLE_GRAPHVIZ_FALSE"]="#"
S["ENABLE_GRAPHVIZ_TRUE"]=""
S["ENABLE_DEBUG_FALSE"]=""
S["ENABLE_DEBUG_TRUE"]="#"
S["GVC_DEPS_LIBS"]=""
S["GVC_DEPS_CFLAGS"]=""
S["GVC_DEPS_LIBS"]="-L/opt/local/lib -lgvc -lcgraph -lcdt "
S["GVC_DEPS_CFLAGS"]="-I/opt/local/include/graphviz "
S["PKG_CONFIG_LIBDIR"]=""
S["PKG_CONFIG_PATH"]=""
S["PKG_CONFIG"]="/opt/local/bin/pkg-config"

View file

@ -566,7 +566,7 @@ int route_cmp(route *r1, match_entry *r2) {
/**
* Create a data only node.
*
*/
void r3_node_append_route(node * n, route * route) {
if (!n->routes) {

View file

@ -5,15 +5,18 @@
# TESTS =
# endif
TESTS = check_tree
AM_CFLAGS = $(DEPS_CFLAGS) -I$(top_builddir) -I$(top_builddir)/include @CHECK_CFLAGS@
if ENABLE_GRAPHVIZ
TESTS += check_gvc
check_gvc_SOURCES = check_gvc.c bench.c
check_gvc_LDADD=$(DEPS_LIBS) -L$(top_builddir)/src -lr3 @CHECK_LIBS@
check_gvc_CFLAGS=$(DEPS_CFLAGS) -I$(top_builddir) -I$(top_builddir)/include @CHECK_CFLAGS@
check_gvc_LDADD = $(GVC_DEPS_LIBS) $(DEPS_LIBS) -L$(top_builddir)/src -lr3 @CHECK_LIBS@
check_gvc_CFLAGS = $(GVC_DEPS_CFLAGS) $(DEPS_CFLAGS) -I$(top_builddir) -I$(top_builddir)/include @CHECK_CFLAGS@
AM_CFLAGS += $(GVC_DEPS_CFLAGS)
endif
# noinst_PROGRAMS = $(TESTS)
check_tree_SOURCES = check_tree.c bench.c
check_tree_LDADD=$(DEPS_LIBS) -L$(top_builddir)/src -lr3 @CHECK_LIBS@

View file

@ -79,6 +79,7 @@ build_triplet = @build@
host_triplet = @host@
TESTS = check_tree$(EXEEXT) $(am__EXEEXT_1)
@ENABLE_GRAPHVIZ_TRUE@am__append_1 = check_gvc
@ENABLE_GRAPHVIZ_TRUE@am__append_2 = $(GVC_DEPS_CFLAGS)
check_PROGRAMS = $(am__EXEEXT_2)
subdir = tests
DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
@ -102,7 +103,8 @@ am__check_gvc_SOURCES_DIST = check_gvc.c bench.c
@ENABLE_GRAPHVIZ_TRUE@ check_gvc-bench.$(OBJEXT)
check_gvc_OBJECTS = $(am_check_gvc_OBJECTS)
am__DEPENDENCIES_1 =
@ENABLE_GRAPHVIZ_TRUE@check_gvc_DEPENDENCIES = $(am__DEPENDENCIES_1)
@ENABLE_GRAPHVIZ_TRUE@check_gvc_DEPENDENCIES = $(am__DEPENDENCIES_1) \
@ENABLE_GRAPHVIZ_TRUE@ $(am__DEPENDENCIES_1)
AM_V_lt = $(am__v_lt_@AM_V@)
am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@)
am__v_lt_0 = --silent
@ -505,9 +507,11 @@ target_alias = @target_alias@
top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
AM_CFLAGS = $(DEPS_CFLAGS) -I$(top_builddir) -I$(top_builddir)/include \
@CHECK_CFLAGS@ $(am__append_2)
@ENABLE_GRAPHVIZ_TRUE@check_gvc_SOURCES = check_gvc.c bench.c
@ENABLE_GRAPHVIZ_TRUE@check_gvc_LDADD = $(DEPS_LIBS) -L$(top_builddir)/src -lr3 @CHECK_LIBS@
@ENABLE_GRAPHVIZ_TRUE@check_gvc_CFLAGS = $(DEPS_CFLAGS) -I$(top_builddir) -I$(top_builddir)/include @CHECK_CFLAGS@
@ENABLE_GRAPHVIZ_TRUE@check_gvc_LDADD = $(GVC_DEPS_LIBS) $(DEPS_LIBS) -L$(top_builddir)/src -lr3 @CHECK_LIBS@
@ENABLE_GRAPHVIZ_TRUE@check_gvc_CFLAGS = $(GVC_DEPS_CFLAGS) $(DEPS_CFLAGS) -I$(top_builddir) -I$(top_builddir)/include @CHECK_CFLAGS@
# noinst_PROGRAMS = $(TESTS)
check_tree_SOURCES = check_tree.c bench.c

View file

@ -156,3 +156,6 @@
1400389287,11080291.51
1400389343,11017300.69
1400389511,11126324.77
1400389609,8967125.06
1400389649,10123246.54
1400390151,9210167.19

1 1400242718 5649455.80
156 1400389287 11080291.51
157 1400389343 11017300.69
158 1400389511 11126324.77
159 1400389609 8967125.06
160 1400389649 10123246.54
161 1400390151 9210167.19

View file

@ -18,13 +18,13 @@ START_TEST (test_gvc_render_dot)
{
node * n = r3_tree_create(1);
r3_tree_insert_path(n, "/foo/bar/baz", NULL);
r3_tree_insert_path(n, "/foo/bar/qux", NULL);
r3_tree_insert_path(n, "/foo/bar/quux", NULL);
r3_tree_insert_path(n, "/foo/bar/corge", NULL);
r3_tree_insert_path(n, "/foo/bar/grault", NULL);
r3_tree_insert_path(n, "/garply/grault/foo", NULL);
r3_tree_insert_path(n, "/garply/grault/bar", NULL);
r3_tree_insert_path(n, "/foo/bar/baz", NULL, NULL);
r3_tree_insert_path(n, "/foo/bar/qux", NULL, NULL);
r3_tree_insert_path(n, "/foo/bar/quux", NULL, NULL);
r3_tree_insert_path(n, "/foo/bar/corge", NULL, NULL);
r3_tree_insert_path(n, "/foo/bar/grault", NULL, NULL);
r3_tree_insert_path(n, "/garply/grault/foo", NULL, NULL);
r3_tree_insert_path(n, "/garply/grault/bar", NULL, NULL);
r3_tree_compile(n);
@ -39,13 +39,13 @@ START_TEST (test_gvc_render_file)
node * n = r3_tree_create(1);
r3_tree_insert_path(n, "/foo/bar/baz", NULL);
r3_tree_insert_path(n, "/foo/bar/qux", NULL);
r3_tree_insert_path(n, "/foo/bar/quux", NULL);
r3_tree_insert_path(n, "/foo/bar/corge", NULL);
r3_tree_insert_path(n, "/foo/bar/grault", NULL);
r3_tree_insert_path(n, "/garply/grault/foo", NULL);
r3_tree_insert_path(n, "/garply/grault/bar", NULL);
r3_tree_insert_path(n, "/foo/bar/baz", NULL, NULL);
r3_tree_insert_path(n, "/foo/bar/qux", NULL, NULL);
r3_tree_insert_path(n, "/foo/bar/quux", NULL, NULL);
r3_tree_insert_path(n, "/foo/bar/corge", NULL, NULL);
r3_tree_insert_path(n, "/foo/bar/grault", NULL, NULL);
r3_tree_insert_path(n, "/garply/grault/foo", NULL, NULL);
r3_tree_insert_path(n, "/garply/grault/bar", NULL, NULL);
r3_tree_compile(n);