Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1839)

Unified Diff: third_party/sqlite/src/main.mk

Issue 1610963002: Import SQLite 3.10.2. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/sqlite/src/ext/rtree/sqlite3rtree.h ('k') | third_party/sqlite/src/manifest » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/sqlite/src/main.mk
diff --git a/third_party/sqlite/src/main.mk b/third_party/sqlite/src/main.mk
index 54b5b35bb2cdded7a82ba9f95fc882b99cb5e008..4a6d5d6afc0e1427aae6a14dafb8def8617208a4 100644
--- a/third_party/sqlite/src/main.mk
+++ b/third_party/sqlite/src/main.mk
@@ -12,6 +12,8 @@
# THREADLIB Specify any extra linker options needed to make the library
# thread safe
#
+# LIBS Extra libraries options
+#
# OPTS Extra compiler command-line options.
#
# EXE The suffix to add to executable files. ".exe" for windows
@@ -35,9 +37,6 @@
# LIBREADLINE Linker options needed by programs using readline() must
# link against.
#
-# NAWK Nawk compatible awk program. Older (obsolete?) solaris
-# systems need this to avoid using the original AT&T AWK.
-#
# Once the macros above are defined, the rest of this make script will
# build the SQLite library and testing tools.
################################################################################
@@ -47,30 +46,34 @@
TCCX = $(TCC) $(OPTS) -I. -I$(TOP)/src -I$(TOP)
TCCX += -I$(TOP)/ext/rtree -I$(TOP)/ext/icu -I$(TOP)/ext/fts3
TCCX += -I$(TOP)/ext/async -I$(TOP)/ext/userauth
+TCCX += -I$(TOP)/ext/fts5
+THREADLIB += $(LIBS)
# Object files for the SQLite library.
#
LIBOBJ+= vdbe.o parse.o \
alter.o analyze.o attach.o auth.o \
backup.o bitvec.o btmutex.o btree.o build.o \
- callback.o complete.o ctime.o date.o delete.o expr.o fault.o fkey.o \
+ callback.o complete.o ctime.o date.o dbstat.o delete.o expr.o \
+ fault.o fkey.o \
fts3.o fts3_aux.o fts3_expr.o fts3_hash.o fts3_icu.o fts3_porter.o \
fts3_snippet.o fts3_tokenizer.o fts3_tokenizer1.o \
fts3_tokenize_vtab.o \
fts3_unicode.o fts3_unicode2.o \
- fts3_write.o func.o global.o hash.o \
- icu.o insert.o journal.o legacy.o loadext.o \
+ fts3_write.o fts5.o func.o global.o hash.o \
+ icu.o insert.o journal.o json1.o legacy.o loadext.o \
main.o malloc.o mem0.o mem1.o mem2.o mem3.o mem5.o \
memjournal.o \
mutex.o mutex_noop.o mutex_unix.o mutex_w32.o \
notify.o opcodes.o os.o os_unix.o os_win.o \
pager.o pcache.o pcache1.o pragma.o prepare.o printf.o \
- random.o recover.o resolve.o rowset.o rtree.o select.o status.o \
- table.o threads.o tokenize.o trigger.o \
+ random.o recover.o resolve.o rowset.o rtree.o \
+ select.o sqlite3rbu.o status.o \
+ table.o threads.o tokenize.o treeview.o trigger.o \
update.o userauth.o util.o vacuum.o \
vdbeapi.o vdbeaux.o vdbeblob.o vdbemem.o vdbesort.o \
- vdbetrace.o wal.o walker.o where.o utf.o vtab.o
-
+ vdbetrace.o wal.o walker.o where.o wherecode.o whereexpr.o \
+ utf.o vtab.o
# All of the source code files.
@@ -91,6 +94,7 @@ SRC = \
$(TOP)/src/complete.c \
$(TOP)/src/ctime.c \
$(TOP)/src/date.c \
+ $(TOP)/src/dbstat.c \
$(TOP)/src/delete.c \
$(TOP)/src/expr.c \
$(TOP)/src/fault.c \
@@ -112,6 +116,7 @@ SRC = \
$(TOP)/src/mem3.c \
$(TOP)/src/mem5.c \
$(TOP)/src/memjournal.c \
+ $(TOP)/src/msvc.h \
$(TOP)/src/mutex.c \
$(TOP)/src/mutex.h \
$(TOP)/src/mutex_noop.c \
@@ -132,6 +137,7 @@ SRC = \
$(TOP)/src/pcache.h \
$(TOP)/src/pcache1.c \
$(TOP)/src/pragma.c \
+ $(TOP)/src/pragma.h \
$(TOP)/src/prepare.c \
$(TOP)/src/printf.c \
$(TOP)/src/random.c \
@@ -149,6 +155,7 @@ SRC = \
$(TOP)/src/tclsqlite.c \
$(TOP)/src/threads.c \
$(TOP)/src/tokenize.c \
+ $(TOP)/src/treeview.c \
$(TOP)/src/trigger.c \
$(TOP)/src/utf.c \
$(TOP)/src/update.c \
@@ -164,10 +171,13 @@ SRC = \
$(TOP)/src/vdbetrace.c \
$(TOP)/src/vdbeInt.h \
$(TOP)/src/vtab.c \
+ $(TOP)/src/vxworks.h \
$(TOP)/src/wal.c \
$(TOP)/src/wal.h \
$(TOP)/src/walker.c \
$(TOP)/src/where.c \
+ $(TOP)/src/wherecode.c \
+ $(TOP)/src/whereexpr.c \
$(TOP)/src/whereInt.h
# Source code for extensions
@@ -217,7 +227,36 @@ SRC += \
$(TOP)/ext/rtree/rtree.c
SRC += \
$(TOP)/ext/userauth/userauth.c \
- $(TOP)/ext/userauth/sqlite3userauth.h
+ $(TOP)/ext/userauth/sqlite3userauth.h
+SRC += \
+ $(TOP)/ext/rbu/sqlite3rbu.c \
+ $(TOP)/ext/rbu/sqlite3rbu.h
+SRC += \
+ $(TOP)/ext/misc/json1.c
+
+
+# FTS5 things
+#
+FTS5_HDR = \
+ $(TOP)/ext/fts5/fts5.h \
+ $(TOP)/ext/fts5/fts5Int.h \
+ fts5parse.h
+
+FTS5_SRC = \
+ $(TOP)/ext/fts5/fts5_aux.c \
+ $(TOP)/ext/fts5/fts5_buffer.c \
+ $(TOP)/ext/fts5/fts5_main.c \
+ $(TOP)/ext/fts5/fts5_config.c \
+ $(TOP)/ext/fts5/fts5_expr.c \
+ $(TOP)/ext/fts5/fts5_hash.c \
+ $(TOP)/ext/fts5/fts5_index.c \
+ fts5parse.c \
+ $(TOP)/ext/fts5/fts5_storage.c \
+ $(TOP)/ext/fts5/fts5_tokenize.c \
+ $(TOP)/ext/fts5/fts5_unicode2.c \
+ $(TOP)/ext/fts5/fts5_varint.c \
+ $(TOP)/ext/fts5/fts5_vocab.c \
+
# Generated source code files
#
@@ -235,6 +274,7 @@ SRC += \
TESTSRC = \
$(TOP)/ext/fts3/fts3_term.c \
$(TOP)/ext/fts3/fts3_test.c \
+ $(TOP)/ext/rbu/test_rbu.c \
$(TOP)/src/test1.c \
$(TOP)/src/test2.c \
$(TOP)/src/test3.c \
@@ -247,6 +287,7 @@ TESTSRC = \
$(TOP)/src/test_autoext.c \
$(TOP)/src/test_async.c \
$(TOP)/src/test_backup.c \
+ $(TOP)/src/test_blob.c \
$(TOP)/src/test_btree.c \
$(TOP)/src/test_config.c \
$(TOP)/src/test_demovfs.c \
@@ -267,13 +308,13 @@ TESTSRC = \
$(TOP)/src/test_rtree.c \
$(TOP)/src/test_schema.c \
$(TOP)/src/test_server.c \
- $(TOP)/src/test_stat.c \
$(TOP)/src/test_sqllog.c \
$(TOP)/src/test_superlock.c \
$(TOP)/src/test_syscall.c \
$(TOP)/src/test_tclvar.c \
$(TOP)/src/test_thread.c \
$(TOP)/src/test_vfs.c \
+ $(TOP)/src/test_windirent.c \
$(TOP)/src/test_wsd.c
# Extensions to be statically loaded.
@@ -281,16 +322,20 @@ TESTSRC = \
TESTSRC += \
$(TOP)/ext/misc/amatch.c \
$(TOP)/ext/misc/closure.c \
+ $(TOP)/ext/misc/eval.c \
$(TOP)/ext/misc/fileio.c \
$(TOP)/ext/misc/fuzzer.c \
$(TOP)/ext/misc/ieee754.c \
$(TOP)/ext/misc/nextchar.c \
$(TOP)/ext/misc/percentile.c \
$(TOP)/ext/misc/regexp.c \
+ $(TOP)/ext/misc/series.c \
$(TOP)/ext/misc/spellfix.c \
$(TOP)/ext/misc/totype.c \
$(TOP)/ext/misc/wholenumber.c \
- $(TOP)/ext/misc/vfslog.c
+ $(TOP)/ext/misc/vfslog.c \
+ $(TOP)/ext/fts5/fts5_tcl.c \
+ $(TOP)/ext/fts5/fts5_test_mi.c
#TESTSRC += $(TOP)/ext/fts2/fts2_tokenizer.c
@@ -302,6 +347,7 @@ TESTSRC2 = \
$(TOP)/src/btree.c \
$(TOP)/src/build.c \
$(TOP)/src/date.c \
+ $(TOP)/src/dbstat.c \
$(TOP)/src/expr.c \
$(TOP)/src/func.c \
$(TOP)/src/insert.c \
@@ -329,6 +375,8 @@ TESTSRC2 = \
$(TOP)/src/vdbe.c \
$(TOP)/src/vdbemem.c \
$(TOP)/src/where.c \
+ $(TOP)/src/wherecode.c \
+ $(TOP)/src/whereexpr.c \
parse.c \
$(TOP)/ext/fts3/fts3.c \
$(TOP)/ext/fts3/fts3_aux.c \
@@ -345,6 +393,7 @@ HDR = \
$(TOP)/src/hash.h \
$(TOP)/src/hwtime.h \
keywordhash.h \
+ $(TOP)/src/msvc.h \
$(TOP)/src/mutex.h \
opcodes.h \
$(TOP)/src/os.h \
@@ -354,12 +403,14 @@ HDR = \
$(TOP)/src/pager.h \
$(TOP)/src/pcache.h \
parse.h \
+ $(TOP)/src/pragma.h \
sqlite3.h \
$(TOP)/src/sqlite3ext.h \
$(TOP)/src/sqliteInt.h \
$(TOP)/src/sqliteLimit.h \
$(TOP)/src/vdbe.h \
$(TOP)/src/vdbeInt.h \
+ $(TOP)/src/vxworks.h \
$(TOP)/src/whereInt.h
# Header files used by extensions
@@ -382,8 +433,38 @@ EXTHDR += \
EXTHDR += \
$(TOP)/ext/icu/sqliteicu.h
EXTHDR += \
+ $(TOP)/ext/fts5/fts5Int.h \
+ fts5parse.h \
+ $(TOP)/ext/fts5/fts5.h
+EXTHDR += \
$(TOP)/ext/userauth/sqlite3userauth.h
+# executables needed for testing
+#
+TESTPROGS = \
+ testfixture$(EXE) \
+ sqlite3$(EXE) \
+ sqlite3_analyzer$(EXE) \
+ sqldiff$(EXE)
+
+# Databases containing fuzzer test cases
+#
+FUZZDATA = \
+ $(TOP)/test/fuzzdata1.db \
+ $(TOP)/test/fuzzdata2.db \
+ $(TOP)/test/fuzzdata3.db \
+ $(TOP)/test/fuzzdata4.db
+
+# Standard options to testfixture
+#
+TESTOPTS = --verbose=file --output=test-out.txt
+
+# Extra compiler options for various shell tools
+#
+SHELL_OPT = -DSQLITE_ENABLE_JSON1 -DSQLITE_ENABLE_FTS4 -DSQLITE_ENABLE_FTS5
+FUZZERSHELL_OPT = -DSQLITE_ENABLE_JSON1
+FUZZCHECK_OPT = -DSQLITE_ENABLE_JSON1 -DSQLITE_ENABLE_MEMSYS5
+
# This is the default Makefile target. The objects listed here
# are what get build when you type just "make" with no arguments.
#
@@ -394,14 +475,40 @@ libsqlite3.a: $(LIBOBJ)
$(RANLIB) libsqlite3.a
sqlite3$(EXE): $(TOP)/src/shell.c libsqlite3.a sqlite3.h
- $(TCCX) $(READLINE_FLAGS) -o sqlite3$(EXE) \
- $(TOP)/src/shell.c $(SHELL_ICU) \
- libsqlite3.a $(LIBREADLINE) $(TLIBS) $(THREADLIB)
+ $(TCCX) $(READLINE_FLAGS) -o sqlite3$(EXE) $(SHELL_OPT) \
+ $(TOP)/src/shell.c $(SHELL_ICU) libsqlite3.a $(LIBREADLINE) $(TLIBS) $(THREADLIB)
+
+sqldiff$(EXE): $(TOP)/tool/sqldiff.c sqlite3.c sqlite3.h
+ $(TCCX) -o sqldiff$(EXE) -DSQLITE_THREADSAFE=0 \
+ $(TOP)/tool/sqldiff.c sqlite3.c $(TLIBS) $(THREADLIB)
+
+fuzzershell$(EXE): $(TOP)/tool/fuzzershell.c sqlite3.c sqlite3.h
+ $(TCCX) -o fuzzershell$(EXE) -DSQLITE_THREADSAFE=0 -DSQLITE_OMIT_LOAD_EXTENSION \
+ $(FUZZERSHELL_OPT) $(TOP)/tool/fuzzershell.c sqlite3.c \
+ $(TLIBS) $(THREADLIB)
+
+fuzzcheck$(EXE): $(TOP)/test/fuzzcheck.c sqlite3.c sqlite3.h
+ $(TCCX) -o fuzzcheck$(EXE) -DSQLITE_THREADSAFE=0 -DSQLITE_OMIT_LOAD_EXTENSION \
+ -DSQLITE_ENABLE_MEMSYS5 $(FUZZCHECK_OPT) \
+ $(TOP)/test/fuzzcheck.c sqlite3.c $(TLIBS) $(THREADLIB)
mptester$(EXE): sqlite3.c $(TOP)/mptest/mptest.c
$(TCCX) -o $@ -I. $(TOP)/mptest/mptest.c sqlite3.c \
$(TLIBS) $(THREADLIB)
+MPTEST1=./mptester$(EXE) mptest.db $(TOP)/mptest/crash01.test --repeat 20
+MPTEST2=./mptester$(EXE) mptest.db $(TOP)/mptest/multiwrite01.test --repeat 20
+mptest: mptester$(EXE)
+ rm -f mptest.db
+ $(MPTEST1) --journalmode DELETE
+ $(MPTEST2) --journalmode WAL
+ $(MPTEST1) --journalmode WAL
+ $(MPTEST2) --journalmode PERSIST
+ $(MPTEST1) --journalmode PERSIST
+ $(MPTEST2) --journalmode TRUNCATE
+ $(MPTEST1) --journalmode TRUNCATE
+ $(MPTEST2) --journalmode DELETE
+
sqlite3.o: sqlite3.c
$(TCCX) -I. -c sqlite3.c
@@ -411,13 +518,14 @@ sqlite3.o: sqlite3.c
# files are automatically generated. This target takes care of
# all that automatic generation.
#
-target_source: $(SRC) $(TOP)/tool/vdbe-compress.tcl
+target_source: $(SRC) $(TOP)/tool/vdbe-compress.tcl fts5.c
rm -rf tsrc
mkdir tsrc
cp -f $(SRC) tsrc
rm tsrc/sqlite.h.in tsrc/parse.y
tclsh $(TOP)/tool/vdbe-compress.tcl $(OPTS) <tsrc/vdbe.c >vdbe.new
mv vdbe.new tsrc/vdbe.c
+ cp fts5.c fts5.h tsrc
touch target_source
sqlite3.c: target_source $(TOP)/tool/mksqlite3c.tcl
@@ -428,6 +536,9 @@ sqlite3.c: target_source $(TOP)/tool/mksqlite3c.tcl
echo '#endif /* USE_SYSTEM_SQLITE */' >>tclsqlite3.c
cat $(TOP)/src/tclsqlite.c >>tclsqlite3.c
+sqlite3ext.h: target_source
+ cp tsrc/sqlite3ext.h .
+
sqlite3.c-debug: target_source $(TOP)/tool/mksqlite3c.tcl
tclsh $(TOP)/tool/mksqlite3c.tcl --linemacros
echo '#ifndef USE_SYSTEM_SQLITE' >tclsqlite3.c
@@ -447,9 +558,9 @@ fts3amal.c: target_source $(TOP)/ext/fts3/mkfts3amal.tcl
# Rules to build the LEMON compiler generator
#
-lemon: $(TOP)/tool/lemon.c $(TOP)/src/lempar.c
+lemon: $(TOP)/tool/lemon.c $(TOP)/tool/lempar.c
$(BCC) -o lemon $(TOP)/tool/lemon.c
- cp $(TOP)/src/lempar.c .
+ cp $(TOP)/tool/lempar.c .
# Rules to build individual *.o files from generated *.c files. This
# applies to:
@@ -472,23 +583,23 @@ tclsqlite.o: $(TOP)/src/tclsqlite.c $(HDR)
# Rules to build opcodes.c and opcodes.h
#
-opcodes.c: opcodes.h $(TOP)/mkopcodec.awk
- $(NAWK) -f $(TOP)/mkopcodec.awk opcodes.h >opcodes.c
+opcodes.c: opcodes.h $(TOP)/tool/mkopcodec.tcl
+ tclsh $(TOP)/tool/mkopcodec.tcl opcodes.h >opcodes.c
-opcodes.h: parse.h $(TOP)/src/vdbe.c $(TOP)/mkopcodeh.awk
+opcodes.h: parse.h $(TOP)/src/vdbe.c $(TOP)/tool/mkopcodeh.tcl
cat parse.h $(TOP)/src/vdbe.c | \
- $(NAWK) -f $(TOP)/mkopcodeh.awk >opcodes.h
+ tclsh $(TOP)/tool/mkopcodeh.tcl >opcodes.h
# Rules to build parse.c and parse.h - the outputs of lemon.
#
parse.h: parse.c
-parse.c: $(TOP)/src/parse.y lemon $(TOP)/addopcodes.awk
+parse.c: $(TOP)/src/parse.y lemon $(TOP)/tool/addopcodes.tcl
cp $(TOP)/src/parse.y .
rm -f parse.h
- ./lemon $(OPTS) parse.y
+ ./lemon -s $(OPTS) parse.y
mv parse.h parse.h.temp
- $(NAWK) -f $(TOP)/addopcodes.awk parse.h.temp >parse.h
+ tclsh $(TOP)/tool/addopcodes.tcl parse.h.temp >parse.h
sqlite3.h: $(TOP)/src/sqlite.h.in $(TOP)/manifest.uuid $(TOP)/VERSION $(TOP)/ext/rtree/sqlite3rtree.h
tclsh $(TOP)/tool/mksqlite3h.tcl $(TOP) >sqlite3.h
@@ -561,12 +672,34 @@ fts3_unicode2.o: $(TOP)/ext/fts3/fts3_unicode2.c $(HDR) $(EXTHDR)
fts3_write.o: $(TOP)/ext/fts3/fts3_write.c $(HDR) $(EXTHDR)
$(TCCX) -DSQLITE_CORE -c $(TOP)/ext/fts3/fts3_write.c
+fts5.o: fts5.c
+ $(TCCX) -DSQLITE_CORE -c fts5.c
+
+json1.o: $(TOP)/ext/misc/json1.c
+ $(TCCX) -DSQLITE_CORE -c $(TOP)/ext/misc/json1.c
+
rtree.o: $(TOP)/ext/rtree/rtree.c $(HDR) $(EXTHDR)
$(TCCX) -DSQLITE_CORE -c $(TOP)/ext/rtree/rtree.c
+
+
+fts5parse.c: $(TOP)/ext/fts5/fts5parse.y lemon
+ cp $(TOP)/ext/fts5/fts5parse.y .
+ rm -f fts5parse.h
+ ./lemon $(OPTS) fts5parse.y
+
+fts5parse.h: fts5parse.c
+
+fts5.c: $(FTS5_SRC) $(FTS5_HDR)
+ tclsh $(TOP)/ext/fts5/tool/mkfts5c.tcl
+ cp $(TOP)/ext/fts5/fts5.h .
+
userauth.o: $(TOP)/ext/userauth/userauth.c $(HDR) $(EXTHDR)
$(TCCX) -DSQLITE_CORE -c $(TOP)/ext/userauth/userauth.c
+sqlite3rbu.o: $(TOP)/ext/rbu/sqlite3rbu.c $(HDR) $(EXTHDR)
+ $(TCCX) -DSQLITE_CORE -c $(TOP)/ext/rbu/sqlite3rbu.c
+
# Rules for building test programs and for running tests
#
@@ -574,16 +707,17 @@ tclsqlite3: $(TOP)/src/tclsqlite.c libsqlite3.a
$(TCCX) $(TCL_FLAGS) -DTCLSH=1 -o tclsqlite3 \
$(TOP)/src/tclsqlite.c libsqlite3.a $(LIBTCL) $(THREADLIB)
-sqlite3_analyzer.c: sqlite3.c $(TOP)/src/test_stat.c $(TOP)/src/tclsqlite.c $(TOP)/tool/spaceanal.tcl
+sqlite3_analyzer.c: sqlite3.c $(TOP)/src/tclsqlite.c $(TOP)/tool/spaceanal.tcl
echo "#define TCLSH 2" > $@
- cat sqlite3.c $(TOP)/src/test_stat.c $(TOP)/src/tclsqlite.c >> $@
+ echo "#define SQLITE_ENABLE_DBSTAT_VTAB 1" >> $@
+ cat sqlite3.c $(TOP)/src/tclsqlite.c >> $@
echo "static const char *tclsh_main_loop(void){" >> $@
echo "static const char *zMainloop = " >> $@
- $(NAWK) -f $(TOP)/tool/tostr.awk $(TOP)/tool/spaceanal.tcl >> $@
+ tclsh $(TOP)/tool/tostr.tcl $(TOP)/tool/spaceanal.tcl >> $@
echo "; return zMainloop; }" >> $@
sqlite3_analyzer$(EXE): sqlite3_analyzer.c
- $(TCCX) $(TCL_FLAGS) sqlite3_analyzer.c -o $@ $(LIBTCL) $(THREADLIB)
+ $(TCCX) $(TCL_FLAGS) sqlite3_analyzer.c -o $@ $(LIBTCL) $(TLIBS) $(THREADLIB)
# Rules to build the 'testfixture' application.
#
@@ -606,28 +740,66 @@ fts3-testfixture$(EXE): sqlite3.c fts3amal.c $(TESTSRC) $(TOP)/src/tclsqlite.c
$(TESTSRC) $(TOP)/src/tclsqlite.c sqlite3.c fts3amal.c \
-o testfixture$(EXE) $(LIBTCL) $(THREADLIB)
-fulltest: testfixture$(EXE) sqlite3$(EXE)
- ./testfixture$(EXE) $(TOP)/test/all.test
+fulltest: $(TESTPROGS) fuzztest
+ ./testfixture$(EXE) $(TOP)/test/all.test $(TESTOPTS)
-soaktest: testfixture$(EXE) sqlite3$(EXE)
- ./testfixture$(EXE) $(TOP)/test/all.test -soak=1
+soaktest: $(TESTPROGS)
+ ./testfixture$(EXE) $(TOP)/test/all.test -soak=1 $(TESTOPTS)
-fulltestonly: testfixture$(EXE) sqlite3$(EXE)
- ./testfixture$(EXE) $(TOP)/test/full.test
+fulltestonly: $(TESTPROGS) fuzztest
+ ./testfixture$(EXE) $(TOP)/test/full.test $(TESTOPTS)
queryplantest: testfixture$(EXE) sqlite3$(EXE)
- ./testfixture$(EXE) $(TOP)/test/permutations.test queryplanner
+ ./testfixture$(EXE) $(TOP)/test/permutations.test queryplanner $(TESTOPTS)
+
+fuzztest: fuzzcheck$(EXE) $(FUZZDATA)
+ ./fuzzcheck$(EXE) $(FUZZDATA)
-test: testfixture$(EXE) sqlite3$(EXE)
- ./testfixture$(EXE) $(TOP)/test/veryquick.test
+fastfuzztest: fuzzcheck$(EXE) $(FUZZDATA)
+ ./fuzzcheck$(EXE) --limit-mem 100M $(FUZZDATA)
+
+valgrindfuzz: fuzzcheck$(EXE) $(FUZZDATA)
+ valgrind ./fuzzcheck$(EXE) --cell-size-check --limit-mem 10M --timeout 600 $(FUZZDATA)
+
+# A very quick test using only testfixture and omitting all the slower
+# tests. Designed to run in under 3 minutes on a workstation.
+#
+quicktest: ./testfixture$(EXE)
+ ./testfixture$(EXE) $(TOP)/test/extraquick.test $(TESTOPTS)
+
+# The default test case. Runs most of the faster standard TCL tests,
+# and fuzz tests, and sqlite3_analyzer and sqldiff tests.
+#
+test: $(TESTPROGS) fastfuzztest
+ ./testfixture$(EXE) $(TOP)/test/veryquick.test $(TESTOPTS)
+
+# Run a test using valgrind. This can take a really long time
+# because valgrind is so much slower than a native machine.
+#
+valgrindtest: $(TESTPROGS) valgrindfuzz
+ OMIT_MISUSE=1 valgrind -v \
+ ./testfixture$(EXE) $(TOP)/test/permutations.test valgrind $(TESTOPTS)
+
+# A very fast test that checks basic sanity. The name comes from
+# the 60s-era electronics testing: "Turn it on and see if smoke
+# comes out."
+#
+smoketest: $(TESTPROGS) fuzzcheck$(EXE)
+ ./testfixture$(EXE) $(TOP)/test/main.test $(TESTOPTS)
# The next two rules are used to support the "threadtest" target. Building
# threadtest runs a few thread-safety tests that are implemented in C. This
# target is invoked by the releasetest.tcl script.
#
-threadtest3$(EXE): sqlite3.o $(TOP)/test/threadtest3.c $(TOP)/test/tt3_checkpoint.c
- $(TCCX) -O2 sqlite3.o $(TOP)/test/threadtest3.c \
- -o threadtest3$(EXE) $(THREADLIB)
+THREADTEST3_SRC = $(TOP)/test/threadtest3.c \
+ $(TOP)/test/tt3_checkpoint.c \
+ $(TOP)/test/tt3_index.c \
+ $(TOP)/test/tt3_vacuum.c \
+ $(TOP)/test/tt3_stress.c \
+ $(TOP)/test/tt3_lookaside1.c
+
+threadtest3$(EXE): sqlite3.o $(THREADTEST3_SRC) $(TOP)/src/test_multiplex.c
+ $(TCCX) $(TOP)/test/threadtest3.c $(TOP)/src/test_multiplex.c sqlite3.o -o $@ $(THREADLIB)
threadtest: threadtest3$(EXE)
./threadtest3$(EXE)
@@ -671,7 +843,14 @@ wordcount$(EXE): $(TOP)/test/wordcount.c sqlite3.c
$(TOP)/test/wordcount.c sqlite3.c
speedtest1$(EXE): $(TOP)/test/speedtest1.c sqlite3.o
- $(TCC) -I. -o speedtest1$(EXE) $(TOP)/test/speedtest1.c sqlite3.o $(THREADLIB)
+ $(TCC) -I. $(OTAFLAGS) -o speedtest1$(EXE) $(TOP)/test/speedtest1.c sqlite3.o $(THREADLIB)
+
+rbu$(EXE): $(TOP)/ext/rbu/rbu.c $(TOP)/ext/rbu/sqlite3rbu.c sqlite3.o
+ $(TCC) -I. -o rbu$(EXE) $(TOP)/ext/rbu/rbu.c sqlite3.o \
+ $(THREADLIB)
+
+loadfts: $(TOP)/tool/loadfts.c libsqlite3.a
+ $(TCC) $(TOP)/tool/loadfts.c libsqlite3.a -o loadfts $(THREADLIB)
# This target will fail if the SQLite amalgamation contains any exported
# symbols that do not begin with "sqlite3_". It is run as part of the
@@ -682,7 +861,7 @@ checksymbols: sqlite3.o
# Build the amalgamation-autoconf package.
#
-dist: sqlite3.c
+amalgamation-tarball: sqlite3.c
TOP=$(TOP) sh $(TOP)/tool/mkautoconfamal.sh
@@ -721,3 +900,7 @@ clean:
rm -f sqlite3_analyzer sqlite3_analyzer.exe sqlite3_analyzer.c
rm -f sqlite-*-output.vsix
rm -f mptester mptester.exe
+ rm -f fuzzershell fuzzershell.exe
+ rm -f fuzzcheck fuzzcheck.exe
+ rm -f sqldiff sqldiff.exe
+ rm -f fts5.* fts5parse.*
« no previous file with comments | « third_party/sqlite/src/ext/rtree/sqlite3rtree.h ('k') | third_party/sqlite/src/manifest » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698