diff options
Diffstat (limited to 'third_party/sqlite/test.patch')
-rw-r--r-- | third_party/sqlite/test.patch | 167 |
1 files changed, 167 insertions, 0 deletions
diff --git a/third_party/sqlite/test.patch b/third_party/sqlite/test.patch new file mode 100644 index 0000000..28c98d3 --- /dev/null +++ b/third_party/sqlite/test.patch @@ -0,0 +1,167 @@ +Index: Makefile.linux-gcc +=================================================================== +--- Makefile.linux-gcc 2009-09-03 13:32:06.000000000 -0700 ++++ Makefile.linux-gcc 2009-07-01 12:08:39.000000000 -0700 +@@ -14,7 +14,7 @@ + #### The toplevel directory of the source tree. This is the directory + # that contains this "Makefile.in" and the "configure.in" script. + # +-TOP = ../sqlite ++TOP = .. + + #### C Compiler and options for use in building executables that + # will run on the platform that is doing the build. +@@ -33,13 +33,13 @@ + # appropriately: + # + #THREADSAFE = -DTHREADSAFE=1 +-THREADSAFE = -DTHREADSAFE=0 ++THREADSAFE = -DTHREADSAFE=1 + + #### Specify any extra linker options needed to make the library + # thread safe + # + #THREADLIB = -lpthread +-THREADLIB = ++THREADLIB = -lpthread + + #### Specify any extra libraries needed to access required functions. + # +@@ -57,8 +57,28 @@ + #OPTS = -DSQLITE_DEBUG=2 + #OPTS = -DSQLITE_DEBUG=1 + #OPTS = +-OPTS = -DNDEBUG=1 +-OPTS += -DHAVE_FDATASYNC=1 ++ ++# These flags match those for SQLITE_CFLAGS in config.mk. ++ ++OPTS += -DNDEBUG ++OPTS += -DSQLITE_CORE ++OPTS += -DSQLITE_ENABLE_FTS2 -DSQLITE_ENABLE_BROKEN_FTS2 ++OPTS += -DSQLITE_DEFAULT_FILE_PERMISSIONS=0600 ++OPTS += -DHAVE_USLEEP=1 ++ ++# Additional SQLite tests. ++OPTS += -DSQLITE_MEMDEBUG=1 ++ ++# Don't include these ones, they break the SQLite tests. ++# -DSQLITE_OMIT_ATTACH=1 \ ++# -DSQLITE_OMIT_LOAD_EXTENSION=1 \ ++# -DSQLITE_OMIT_VACUUM=1 \ ++# -DSQLITE_TRANSACTION_DEFAULT_IMMEDIATE=1 \ ++ ++SHELL_ICU = $(TOP)/src/shell_icu_linux.c -licuuc ++ ++# TODO(shess) I can't see why I need this setting. ++OPTS += -DOS_UNIX=1 + + #### The suffix to add to executable files. ".exe" for windows. + # Nothing for unix. +@@ -91,16 +112,16 @@ + + #### Extra compiler options needed for programs that use the TCL library. + # +-#TCL_FLAGS = ++TCL_FLAGS = -I/usr/include/tcl8.4 + #TCL_FLAGS = -DSTATIC_BUILD=1 +-TCL_FLAGS = -I/home/drh/tcltk/8.4linux ++#TCL_FLAGS = -I/home/drh/tcltk/8.4linux + #TCL_FLAGS = -I/home/drh/tcltk/8.4win -DSTATIC_BUILD=1 + #TCL_FLAGS = -I/home/drh/tcltk/8.3hpux + + #### Linker options needed to link against the TCL library. + # +-#LIBTCL = -ltcl -lm -ldl +-LIBTCL = /home/drh/tcltk/8.4linux/libtcl8.4g.a -lm -ldl ++LIBTCL = -ltcl8.4 -lm -ldl ++#LIBTCL = /home/drh/tcltk/8.4linux/libtcl8.4g.a -lm -ldl + #LIBTCL = /home/drh/tcltk/8.4win/libtcl84s.a -lmsvcrt + #LIBTCL = /home/drh/tcltk/8.3hpux/libtcl8.3.a -ldld -lm -lc + +Index: main.mk +=================================================================== +--- main.mk 2009-09-10 12:18:17.000000000 -0700 ++++ main.mk 2009-09-15 11:45:21.000000000 -0700 +@@ -69,6 +69,12 @@ + walker.o where.o utf.o vtab.o + + ++LIBOBJ += fts2.o \ ++ fts2_hash.o \ ++ fts2_icu.o \ ++ fts2_porter.o \ ++ fts2_tokenizer.o \ ++ fts2_tokenizer1.o + + # All of the source code files. + # +@@ -243,6 +253,17 @@ + $(TOP)/src/test_thread.c \ + $(TOP)/src/test_wsd.c + ++TESTSRC += \ ++ $(TOP)/ext/fts2/fts2.c \ ++ $(TOP)/ext/fts2/fts2.h \ ++ $(TOP)/ext/fts2/fts2_hash.c \ ++ $(TOP)/ext/fts2/fts2_hash.h \ ++ $(TOP)/ext/fts2/fts2_icu.c \ ++ $(TOP)/ext/fts2/fts2_porter.c \ ++ $(TOP)/ext/fts2/fts2_tokenizer.h \ ++ $(TOP)/ext/fts2/fts2_tokenizer.c \ ++ $(TOP)/ext/fts2/fts2_tokenizer1.c ++ + #TESTSRC += $(TOP)/ext/fts2/fts2_tokenizer.c + #TESTSRC += $(TOP)/ext/fts3/fts3_tokenizer.c + +@@ -314,8 +343,8 @@ + + sqlite3$(EXE): $(TOP)/src/shell.c libsqlite3.a sqlite3.h + $(TCCX) $(READLINE_FLAGS) -o sqlite3$(EXE) \ +- $(TOP)/src/shell.c \ +- libsqlite3.a $(LIBREADLINE) $(TLIBS) $(THREADLIB) ++ $(TOP)/src/shell.c $(SHELL_ICU) \ ++ libsqlite3.a $(LIBREADLINE) $(TLIBS) $(THREADLIB) -ldl + + objects: $(LIBOBJ_ORIG) + +@@ -484,6 +527,12 @@ + test: testfixture$(EXE) sqlite3$(EXE) + ./testfixture$(EXE) $(TOP)/test/veryquick.test + ++ftstest: testfixture$(EXE) sqlite3$(EXE) ++ ./testfixture$(EXE) $(TOP)/test/fts.test ++ ++fts2test: testfixture$(EXE) sqlite3$(EXE) ++ ./testfixture$(EXE) $(TOP)/test/fts2.test ++ + sqlite3_analyzer$(EXE): $(TOP)/src/tclsqlite.c sqlite3.c $(TESTSRC) \ + $(TOP)/tool/spaceanal.tcl + sed \ +Index: src/test_autoext.c +=================================================================== +--- src/test_autoext.c 2009-09-03 13:32:06.000000000 -0700 ++++ src/test_autoext.c 2009-09-15 18:14:35.000000000 -0700 +@@ -17,7 +17,9 @@ + #include "sqlite3ext.h" + + #ifndef SQLITE_OMIT_LOAD_EXTENSION ++#ifndef SQLITE_CORE + static SQLITE_EXTENSION_INIT1 ++#endif + + /* + ** The sqr() SQL function returns the square of its input value. +Index: src/quick.test +=================================================================== +--- test/quick.test 2009-09-04 13:37:44.000000000 -0700 ++++ test/quick.test 2009-09-15 11:34:54.000000000 -0700 +@@ -58,6 +58,8 @@ + crash7.test + delete3.test + fts3.test ++ fts.test ++ fts2.test + fuzz.test + fuzz3.test + fuzz_malloc.test |