Commit 526beea5 authored by Yoni Fogel's avatar Yoni Fogel

Addresses #1607 Static utilities now call initializers/destroyers. src/tests...

Addresses #1607 Static utilities now call initializers/destroyers.  src/tests now use static utilities

git-svn-id: file:///svn/toku/tokudb@10662 c7de825b-a66e-492c-adef-691d508d4ae1
parent a223e28a
......@@ -196,6 +196,9 @@ endif
%.tdbrun: %.tdb$(BINSUF) $(DEPEND_COMPILE) $(DEPEND_LINK) $(notdir $(LIBTDB))
$(TDBVGRIND) ./$< $(VERBVERBOSE) $(MAYBEINVERTER) $(SUMMARIZE_CMD)
TDBDUMP=$(TOKUROOT)utils/tokudb_dump_static$(BINSUF)
TDBLOAD=$(TOKUROOT)utils/tokudb_load_static$(BINSUF)
%.recover: %.tdb$(BINSUF)
echo doing ./$< &&\
$(VGRIND) ./$< && \
......@@ -204,8 +207,8 @@ endif
echo doing recovery &&\
$(VGRIND) ../../newbrt/tdb-recover dir.$*.c.tdb.recover dir.$*.c.tdb && \
echo dump and compare &&\
../../utils/tokudb_dump -h dir.$*.c.tdb foo.db > dir.$*.c.tdb/foo.dump && \
../../utils/tokudb_dump -h dir.$*.c.tdb.recover foo.db > dir.$*.c.tdb.recover/foo.dump && \
$(TDBDUMP) -h dir.$*.c.tdb foo.db > dir.$*.c.tdb/foo.dump && \
$(TDBDUMP) -h dir.$*.c.tdb.recover foo.db > dir.$*.c.tdb.recover/foo.dump && \
diff -q dir.$*.c.tdb/foo.dump dir.$*.c.tdb.recover/foo.dump \
$(MAYBEINVERTER) $(SUMMARIZE_CMD)
......@@ -361,7 +364,7 @@ test1426.tdbrun: test1426.tdb$(BINSUF) test1426.bdb$(BINSUF)
(./test1426.tdb -q && \
./test1426.bdb -q && \
$(BDBDIR)/bin/db_dump -p -h dir.test1426.c.bdb main > dump.bdb.1426 && \
../../utils/tokudb_dump$(BINSUF) -p -h dir.test1426.c.tdb main > dump.tdb.1426 && \
$(TDBDUMP) -p -h dir.test1426.c.tdb main > dump.tdb.1426 && \
diff -q -I db_pagesize=4096 dump.bdb.1426 dump.tdb.1426 ) \
$(MAYBEINVERTER) $(SUMMARIZE_CMD)
......
......@@ -74,6 +74,8 @@ $(BDB_UTILS): CPPFLAGS+=-DTOKU_ALLOW_DEPRECATED
#empty on purpose
$(BDB_UTILS): CPPFLAGS+=-DIS_TDB=0
$(UTILS) $(STATIC_UTILS): CPPFLAGS+=-DIS_TDB=1
$(STATIC_UTILS): CPPFLAGS+=-DTDB_IS_STATIC=1
$(UTILS): CPPFLAGS+=-DTDB_IS_STATIC=0
HERE=utils
......
......@@ -231,15 +231,15 @@ resend_signals(void) {
}
#include <memory.h>
#if IS_TDB && (defined(_WIN32) || defined(_WIN64))
#if IS_TDB && !defined(_WIN32) && !defined(_WIN64) && TDB_IS_STATIC
#include <ydb.h>
#endif
static int test_main (int argc, char *argv[]);
int
main(int argc, char *argv[]) {
int r;
#if IS_TDB && (defined(_WIN32) || defined(_WIN64))
//toku_ydb_init();
#if IS_TDB && !defined(_WIN32) && !defined(_WIN64) && TDB_IS_STATIC
toku_ydb_init();
#endif
#if !IS_TDB && DB_VERSION_MINOR==4 && DB_VERSION_MINOR == 7
r = db_env_set_func_malloc(toku_malloc); assert(r==0);
......@@ -247,8 +247,8 @@ main(int argc, char *argv[]) {
r = db_env_set_func_realloc(toku_realloc); assert(r==0);
#endif
r = test_main(argc, argv);
#if IS_TDB && (defined(_WIN32) || defined(_WIN64))
//toku_ydb_destroy();
#if IS_TDB && !defined(_WIN32) && !defined(_WIN64) && TDB_IS_STATIC
toku_ydb_destroy();
#endif
return r;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment