/ Check-in [1b83f2e7dd]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Build the sqlite3_analyzer.exe and sqldiff.exe programs on "make test" and "make smoketest" and other similar test targets.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 1b83f2e7ddfdb488e732731f7a184d37edcad5af
User & Date: drh 2015-05-11 12:15:45
Context
2015-05-11
16:27
Fix minor Makefile typos. Improve consistency of MSVC makefile. Add new targets to clean. check-in: f84fbe9899 user: mistachkin tags: trunk
12:15
Build the sqlite3_analyzer.exe and sqldiff.exe programs on "make test" and "make smoketest" and other similar test targets. check-in: 1b83f2e7dd user: drh tags: trunk
11:59
Revamp the way the DBSTAT virtual table is registered. check-in: 4e6520159e user: drh tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to Makefile.in.

   505    505     $(TOP)/ext/fts3/fts3_tokenizer.h
   506    506   EXTHDR += \
   507    507     $(TOP)/ext/rtree/rtree.h
   508    508   EXTHDR += \
   509    509     $(TOP)/ext/icu/sqliteicu.h
   510    510   EXTHDR += \
   511    511     $(TOP)/ext/rtree/sqlite3rtree.h
          512  +
          513  +# executabled needed for testing
          514  +#
          515  +TESTPROGS = \
          516  +  testfixture$(TEXE) \
          517  +  sqlite3$(TEXE) \
          518  +  sqlite3_analyzer$(TEXE) \
          519  +  sqldiff$(TEXE)
          520  +
   512    521   
   513    522   # This is the default Makefile target.  The objects listed here
   514    523   # are what get build when you type just "make" with no arguments.
   515    524   #
   516    525   all:	sqlite3.h libsqlite3.la sqlite3$(TEXE) $(HAVE_TCL:1=libtclsqlite3.la)
   517    526   
   518    527   Makefile: $(TOP)/Makefile.in
................................................................................
   951    960   TESTFIXTURE_SRC += $(TESTFIXTURE_SRC$(USE_AMALGAMATION))
   952    961   
   953    962   testfixture$(TEXE):	$(TESTFIXTURE_SRC)
   954    963   	$(LTLINK) -DSQLITE_NO_SYNC=1 $(TEMP_STORE) $(TESTFIXTURE_FLAGS) \
   955    964   		-o $@ $(TESTFIXTURE_SRC) $(LIBTCL) $(TLIBS)
   956    965   
   957    966   # A very detailed test running most or all test cases
   958         -fulltest:	testfixture$(TEXE) sqlite3$(TEXE) fuzztest
          967  +fulltest:	$(TESTPROGS) fuzztest
   959    968   	./testfixture$(TEXE) $(TOP)/test/all.test
   960    969   
   961    970   # Really really long testing
   962         -soaktest:	testfixture$(TEXE) sqlite3$(TEXE) fuzzoomtest
          971  +soaktest:	$(TESTPROGS) fuzzoomtest
   963    972   	./testfixture$(TEXE) $(TOP)/test/all.test -soak=1
   964    973   
   965    974   # Do extra testing but not aeverything.
   966    975   fulltestonly:	testfixture$(TEXE) sqlite3$(TEXE)
   967    976   	./testfixture$(TEXE) $(TOP)/test/full.test
   968    977   
   969    978   # Fuzz testing
................................................................................
   972    981   
   973    982   fuzzoomtest:	fuzzershell$(TEXE)
   974    983   	./fuzzershell$(TEXE) -f $(TOP)/test/fuzzdata1.txt --oom
   975    984   
   976    985   # This is the common case.  Run many tests but not those that take
   977    986   # a really long time.
   978    987   #
   979         -test:	testfixture$(TEXE) sqlite3$(TEXE) fuzztest
          988  +test:	$(TESTPROGS) fuzztest
   980    989   	./testfixture$(TEXE) $(TOP)/test/veryquick.test
   981    990   
   982    991   # Run a test using valgrind.  This can take a really long time
   983    992   # because valgrind is so much slower than a native machine.
   984    993   #
   985         -valgrindtest:	testfixture$(TEXE) sqlite3$(TEXE) fuzzershell$(TEXE)
          994  +valgrindtest:	$(TESTPROGS) fuzzershell$(TEXE)
   986    995   	valgrind -v ./fuzzershell$(TEXE) -f $(TOP)/test/fuzzdata1.txt
   987    996   	OMIT_MISUSE=1 valgrind -v ./testfixture$(TEXE) $(TOP)/test/permutations.test valgrind
   988    997   
   989    998   # A very fast test that checks basic sanity.  The name comes from
   990    999   # the 60s-era electronics testing:  "Turn it on and see if smoke
   991   1000   # comes out."
   992   1001   #
   993         -smoketest:	testfixture$(TEXE) fuzzershell$(TEXE)
         1002  +smoketest:	$(TESTPROGS) fuzzershell$(TEXE)
   994   1003   	./testfixture$(TEXE) $(TOP)/test/main.test
   995   1004   
   996   1005   sqlite3_analyzer.c: sqlite3.c $(TOP)/src/tclsqlite.c $(TOP)/tool/spaceanal.tcl
   997   1006   	echo "#define TCLSH 2" > $@
   998   1007   	echo "#define SQLITE_ENABLE_DBSTAT_VTAB 1" >> $@
   999   1008   	cat sqlite3.c $(TOP)/src/tclsqlite.c >> $@
  1000   1009   	echo "static const char *tclsh_main_loop(void){" >> $@

Changes to Makefile.msc.

  1167   1167     $(TOP)\ext\fts3\fts3_tokenizer.h
  1168   1168   EXTHDR = $(EXTHDR) \
  1169   1169     $(TOP)\ext\rtree\rtree.h
  1170   1170   EXTHDR = $(EXTHDR) \
  1171   1171     $(TOP)\ext\icu\sqliteicu.h
  1172   1172   EXTHDR = $(EXTHDR) \
  1173   1173     $(TOP)\ext\rtree\sqlite3rtree.h
         1174  +
         1175  +# executabled needed for testing
         1176  +#
         1177  +TESTPROGS = \
         1178  +  testfixture.exe \
         1179  +  sqlite3.exe \
         1180  +  sqlite3_analyzer.exe \
         1181  +  sqldiff.exe
         1182  +
  1174   1183   
  1175   1184   # This is the default Makefile target.  The objects listed here
  1176   1185   # are what get build when you type just "make" with no arguments.
  1177   1186   #
  1178   1187   all:	dll libsqlite3.lib sqlite3.exe libtclsqlite3.lib
  1179   1188   
  1180   1189   libsqlite3.lib:	$(LIBOBJ)
................................................................................
  1631   1640   		-DBUILD_sqlite -I$(TCLINCDIR) \
  1632   1641   		$(TESTFIXTURE_SRC) \
  1633   1642   		/link $(LTLINKOPTS) $(LTLIBPATHS) $(LIBRESOBJS) $(LTLIBS) $(TLIBS)
  1634   1643   
  1635   1644   extensiontest: testfixture.exe testloadext.dll
  1636   1645   	.\testfixture.exe $(TOP)\test\loadext.test
  1637   1646   
  1638         -fulltest:	testfixture.exe sqlite3.exe fuzztest
         1647  +fulltest:	$(TESTPROGS) fuzztest
  1639   1648   	.\testfixture.exe $(TOP)\test\all.test
  1640   1649   
  1641         -soaktest:	testfixture.exe sqlite3.exe fuzzoomtest
         1650  +soaktest:	$(TESTPROGS) fuzzoomtest
  1642   1651   	.\testfixture.exe $(TOP)\test\all.test -soak=1
  1643   1652   
  1644         -fulltestonly:	testfixture.exe sqlite3.exe fuzztest
         1653  +fulltestonly:	$(TESTPROGS) fuzztest
  1645   1654   	.\testfixture.exe $(TOP)\test\full.test
  1646   1655   
  1647   1656   queryplantest:	testfixture.exe sqlite3.exe
  1648   1657   	.\testfixture.exe $(TOP)\test\permutations.test queryplanner
  1649   1658   
  1650   1659   fuzztest:	fuzzershell.exe
  1651   1660   	.\fuzzershell.exe $(TOP)\test\fuzzdata1.txt $(TOP)\test\fuzzdata2.txt
  1652   1661   
  1653   1662   fuzzoomtest:	fuzzershell.exe
  1654   1663   	.\fuzzershell.exe -f $(TOP)\test\fuzzdata1.txt --oom
  1655   1664   
  1656         -test:	testfixture.exe sqlite3.exe fuzztest
         1665  +test:	$(TESTPROGS) fuzztest
  1657   1666   	.\testfixture.exe $(TOP)\test\veryquick.test
  1658   1667   
  1659         -smoketest:	testfixture.exe
         1668  +smoketest:	$(TESTPROGS)
  1660   1669   	.\testfixture.exe $(TOP)\test\main.test
  1661   1670   
  1662   1671   sqlite3_analyzer.c: $(SQLITE3C) $(TOP)\src\tclsqlite.c $(TOP)\tool\spaceanal.tcl
  1663   1672   	copy $(SQLITE3C) + $(TOP)\src\tclsqlite.c $@
  1664   1673   	echo static const char *tclsh_main_loop(void){ >> $@
  1665   1674   	echo static const char *zMainloop = >> $@
  1666   1675   	$(NAWK) -f $(TOP)\tool\tostr.awk $(TOP)\tool\spaceanal.tcl >> $@

Changes to main.mk.

   386    386     $(TOP)/ext/fts3/fts3_tokenizer.h
   387    387   EXTHDR += \
   388    388     $(TOP)/ext/rtree/rtree.h
   389    389   EXTHDR += \
   390    390     $(TOP)/ext/icu/sqliteicu.h
   391    391   EXTHDR += \
   392    392     $(TOP)/ext/userauth/sqlite3userauth.h
          393  +
          394  +# executabled needed for testing
          395  +#
          396  +TESTPROGS = \
          397  +  testfixture$(EXE) \
          398  +  sqlite3$(EXE) \
          399  +  sqlite3_analyzer$(EXE) \
          400  +  sqldiff$(EXE)
   393    401   
   394    402   # This is the default Makefile target.  The objects listed here
   395    403   # are what get build when you type just "make" with no arguments.
   396    404   #
   397    405   all:	sqlite3.h libsqlite3.a sqlite3$(EXE)
   398    406   
   399    407   libsqlite3.a:	$(LIBOBJ)
................................................................................
   631    639   
   632    640   fts3-testfixture$(EXE): sqlite3.c fts3amal.c $(TESTSRC) $(TOP)/src/tclsqlite.c
   633    641   	$(TCCX) $(TCL_FLAGS) -DTCLSH=1 $(TESTFIXTURE_FLAGS)                  \
   634    642   	-DSQLITE_ENABLE_FTS3=1                                               \
   635    643   		$(TESTSRC) $(TOP)/src/tclsqlite.c sqlite3.c fts3amal.c       \
   636    644   		-o testfixture$(EXE) $(LIBTCL) $(THREADLIB)
   637    645   
   638         -fulltest:	testfixture$(EXE) sqlite3$(EXE) fuzztest
          646  +fulltest:	$(TESTPROGS) fuzztest
   639    647   	./testfixture$(EXE) $(TOP)/test/all.test
   640    648   
   641         -soaktest:	testfixture$(EXE) sqlite3$(EXE) fuzzoomtest
          649  +soaktest:	$(TESTPROGS) fuzzoomtest
   642    650   	./testfixture$(EXE) $(TOP)/test/all.test -soak=1
   643    651   
   644         -fulltestonly:	testfixture$(EXE) sqlite3$(EXE) fuzztest
          652  +fulltestonly:	$(TESTPROGS) fuzztest
   645    653   	./testfixture$(EXE) $(TOP)/test/full.test
   646    654   
   647    655   queryplantest:	testfixture$(EXE) sqlite3$(EXE)
   648    656   	./testfixture$(EXE) $(TOP)/test/permutations.test queryplanner
   649    657   
   650    658   fuzztest:	fuzzershell$(EXE)
   651    659   	./fuzzershell$(EXE) $(TOP)/test/fuzzdata1.txt $(TOP)/test/fuzzdata2.txt
   652    660   
   653    661   fuzzoomtest:	fuzzershell$(EXE)
   654    662   	./fuzzershell$(EXE) -f $(TOP)/test/fuzzdata1.txt --oom
   655    663   
   656         -test:	testfixture$(EXE) sqlite3$(EXE) fuzztest
          664  +test:	$(TESTPROGS) fuzztest
   657    665   	./testfixture$(EXE) $(TOP)/test/veryquick.test
   658    666   
   659    667   # Run a test using valgrind.  This can take a really long time
   660    668   # because valgrind is so much slower than a native machine.
   661    669   #
   662         -valgrindtest:	testfixture$(EXE) sqlite3$(EXE) fuzzershell$(EXE)
          670  +valgrindtest:	$(TESTPROGS) fuzzershell$(EXE)
   663    671   	valgrind -v ./fuzzershell$(EXE) -f $(TOP)/test/fuzzdata1.txt
   664    672   	OMIT_MISUSE=1 valgrind -v ./testfixture$(EXE) $(TOP)/test/permutations.test valgrind
   665    673   
   666    674   # The next two rules are used to support the "threadtest" target. Building
   667    675   # threadtest runs a few thread-safety tests that are implemented in C. This
   668    676   # target is invoked by the releasetest.tcl script.
   669    677   #