Commit 468f7bbb authored by Rich Prohaska's avatar Rich Prohaska

add make check. addresses #74

git-svn-id: file:///svn/tokudb@853 c7de825b-a66e-492c-adef-691d508d4ae1
parent 71926b21
......@@ -23,6 +23,9 @@ install: $(LIBNAME).$(LIBEXT) $(LIBNAME).a
cp $(LIBNAME).$(LIBEXT) ../lib/
cp $(LIBNAME).a ../lib
check: $(LIBNAME).$(LIBEXT)
python tokuglobals.py $(LIBNAME).$(LIBEXT)
clean:
rm -rf $(LIBNAME).$(LIBEXT) $(LIBNAME).a *.o
......
......@@ -2,6 +2,7 @@
import sys
import os
import stat
import re
def checkglobals(libname, exceptsymbols, verbose):
......@@ -30,14 +31,23 @@ def checkglobals(libname, exceptsymbols, verbose):
def main():
verbose = 0
libname = "libdb.so"
for arg in sys.argv[1:]:
if arg == "-v":
verbose += 1
elif arg[0:3] == "lib":
libname = arg
try: st = os.stat(libname)
except: return 1
mode = st[stat.ST_MODE]
if not (mode & stat.S_IREAD): return 1
exceptsymbols = {}
for n in [ "_init", "_fini", "_end", "_edata", "__bss_start" ]:
exceptsymbols[n] = 1
for n in [ "db_env_create", "db_create", "db_strerror", "db_version", "log_compare" ]:
exceptsymbols[n] = 1
return checkglobals("libdb.so", exceptsymbols, verbose)
return checkglobals(libname, exceptsymbols, verbose)
sys.exit(main())
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