Commit Graph

885 Commits

Author SHA1 Message Date
stephan
f92d107242 Move some build docs around for clarity. Move the TARGET_DEBUG flags from the end of T.cc to the beginning so that -Ox flags can be passed to make for specific binaries without having to reconfigure.
FossilOrigin-Name: 240294653ceb202b847699e9691140db4fe623a03d86fa3cf7495f8831576331
2026-03-30 15:44:20 +00:00
drh
03f13d77a5 Avoid using unsigned 64-bit integer division on platforms that do not support
it in hardware.

FossilOrigin-Name: 2197677491dfc5ec87b57bbf807776875248a250f80ce9a5ce94ae385bb1d2bc
2026-03-29 19:06:36 +00:00
drh
ff8a0895d6 Fix up the floating-point speed tests so that they only need to be run once
to get a performance comparision.  Provide the fp-speed-test makefile target
to build and run them both.

FossilOrigin-Name: 09e0e78a8265c2e2bc36fef1fa88bd5bf414f9b776966c1c91a4ed4b7866331d
2026-03-27 20:18:06 +00:00
drh
0f08d9586c Changes some legacy testing targets in the makefiles into aliases for
"devtest" and "releasetest"

FossilOrigin-Name: 4c54f22f7abbf5403e554fbf3dd70ddee97352d7de1f7fe19f540bdf681f4e75
2026-03-13 15:03:55 +00:00
drh
13a494fddd Give the fuzzcheck test program access to all the same extensions that
dbsqlfuzz has access to.

FossilOrigin-Name: d9c23b49e355233bbfcdc8305dcae21640e66a0bbf1daed0dd3f9d132c1ef69f
2026-03-07 21:07:18 +00:00
drh
c1454ee833 Remove the experimental and incomplete ext/repair extension, to prevent AIs
from scanning the (incomplete) code and reporting bugs against it.

FossilOrigin-Name: 213b1c6608af4b3e9d6e0d8de6432cc6857931427baf4beac1e0a4294e4dc6ce
2026-03-02 13:44:04 +00:00
drh
c0420cd8e4 Add the showtmlog utility for decoding the tmstmpvfs log files.
Fix tmstmpvfs so that it records timestamps in milliseconds since the
Unix epoch, not in JDN milliseconds.

FossilOrigin-Name: 762d3cbf06218f1010425a98a71ebf7623b84b45a90e6419b7dec7f10ad0c5a5
2026-01-08 12:22:50 +00:00
drh
d964b8cfa3 Add the new "retest" command to testrunner.tcl, which reruns any tests that
failed or never completed in the previous invocation.  New makefile target
"retest" for both unix and Windows that runs testrunner.tcl with "retest".

FossilOrigin-Name: 9b668d56bf0eca3eb826df3edd6705cc809d920494c192a9949cafda791d83f9
2025-12-31 17:21:30 +00:00
drh
ce36cccd36 Fix the "testfixture" makefile target so that it builds with a static TCL
library on Mac-ARM.  Fix the "tool-zip" target so that it uses ordinary
tclsh rather than testfixture to run the tool/mmktoolzip.tcl script that
builds the archive.

FossilOrigin-Name: adf5d624cf109ebd05952e5df62f143f40829070cbcbe43280d371a60db7470b
2025-12-29 12:34:37 +00:00
drh
0455b793f6 Add two new makefile targets, "errors" and "status", for checking on testrunner
errors and for running testrunner status -d 2, respectively.  Add a simple
make.bat script at the top level that runs nmake for us, and thus make the
command-line to test on Windows identical to Unix.

FossilOrigin-Name: 838b7fd5d46ed65f22d1da6256fcf979385e37edc8aec4f19064c2c3dc13f2de
2025-11-25 22:38:07 +00:00
drh
d2424338b0 Incremental check-in. QRF is working, but there are many test failures
in the shell test modules.

FossilOrigin-Name: de7fc9afc43d4bd5f5995832cd698633e0e7213c190fa044856c9f82512161f9
2025-11-07 17:48:14 +00:00
drh
a6b4039050 Begin the process of integrating QRF into the CLI. Adjust makefiles.
Include the QRF code in shell.c.  But QRF is not yet used by the CLI.

FossilOrigin-Name: 7596fc32b371e5e657e830c2e80e61b0947320a7359833e915a888a438c2e935
2025-11-07 14:31:17 +00:00
drh
1301bc1f6e The qrf-tester.c program was removed in the previous check-in, but the
makefile rules to build it were not.  This check-in fixes that oversight.

FossilOrigin-Name: d1542696409b67635d0f172042642709452118d62102ebfab2ad3ff2b5732687
2025-11-05 18:35:54 +00:00
drh
9ff8a73ba4 New build product "tclsqlite-ex.c" is the tclsqlite.c file with QRF added.
This is now used whereever tclsqlite.c was used.  Hence QRF is now in the
testfixture and in the tclextension.  The sqlite3 method is "format".  That
method is currently just a non-functional stub.

FossilOrigin-Name: e08d21fe1365176f268f1dcca4048fb5ff043356e5817c8622b4ed9a1a5a58cf
2025-11-05 12:37:42 +00:00
drh
35cc5176e0 Merge the latest trunk enhancements into the qrf branch
FossilOrigin-Name: bed60e9be6d7f33c9f20dbb98bebdfaa7226a949a8e06691aea4d1e7c1af9507
2025-11-04 22:19:21 +00:00
stephan
23e4ae2121 Move the hard-coded SHELL_OPT makefile values from the two main makefiles into their shared configure script.
FossilOrigin-Name: 900885c4fb3071e461bf868e9e68d0d8f3d3e83a1bcbf5c9c68179c701c1fb92
2025-11-04 00:15:51 +00:00
drh
41b5ded8d0 Refactor: Name change to "query result formatter" or "QRF". Simplify names.
put all the code into its own subdirectory of ext/

FossilOrigin-Name: 8646a2ee224819cf459989aa03bd1b9e1a77fc1f8bee8fd45dba778c63467d61
2025-10-22 12:33:59 +00:00
drh
a1f32824e2 Add test program for resfmt.c. Now compiles and runs.
FossilOrigin-Name: 7aaaeea319c7165284028ff8cf1b3448a818c5029de02e7199614bb45aa304c5
2025-10-20 17:19:30 +00:00
drh
8c1670642d Makefile updates to suppose carray() and percentile(). Add Carray to
the CLI and fuzzcheck to support debugging.

FossilOrigin-Name: fe9cf68b513d1e8cfcde90f1982a7f4123f54e3ebb004d961a99bdf6bec03a32
2025-10-10 14:22:05 +00:00
drh
01f5e6e757 Add ENABLE compile-time options to enable carray() and median(). Hence
there is no new code and no increase in library size without the ENABLE
macros.

FossilOrigin-Name: 7dec290b413ca1bc67694743d8b771e1634fd85251f1a23d60aaf36c63f0f366
2025-10-08 18:11:37 +00:00
drh
ba5cce9f08 This is how the percentile() family of functions might be integrated into
the amalgamation, should we elect to do such a thing.

FossilOrigin-Name: c2cfc9c92e35105e26a4c0887b0401ace15a874fd18046135de4b375ba968795
2025-10-08 16:29:14 +00:00
drh
cdaff852bf Were we to choose to integrate the carray() table-valued function into the
amalgamation, that integration might look something like this.

FossilOrigin-Name: 2b43d5d7dcc5aee14a050c824a5e09b6a38a9c78ddcc25a994eba5d4c5ad9ba2
2025-10-08 15:32:55 +00:00
drh
9444c29094 Fix the makefile so that "<tt>test/testrunner.tcl release --buildonly</tt>"
works on mac.  Apparently broken by [b7751d144330593b].

FossilOrigin-Name: 023365228f3264c53263b649365e7c133d8633010baf6e050fdee044a40454dd
2025-09-24 20:44:33 +00:00
drh
419b93adbf Add --enable-dbstat and --enable-dbpage options to configure. Fix the
".dbtotxt" command in the CLI so that it uses the correct filename of
the database it is rendering as text.

FossilOrigin-Name: e04e6e681891020f78237fa6dc11bc2e2022c569b04ac96cb333bf59f1662cd1
2025-09-13 18:15:26 +00:00
stephan
dca1f04f07 Remove sqlite3expert.h from the compiler invocation for that tool, as it (A) doesn't need to be there and (B) it causes some compilers problems (as reported in [forum:a1085109e7db4cf3 | forum post a1085109e7]). This bug was faithfully carried over from the legacy build.
FossilOrigin-Name: 9f0a16f6e893d51f760a8c1e2cb4709fdd16ccb2c0258695767f8305f407f4ac
2025-08-28 15:04:52 +00:00
stephan
1702244d2e Remove some resolved TODOs from the makefile. Ensure that testfixture links against TCL_LIBS.
FossilOrigin-Name: b7751d144330593b5d41cb50e44b5134baad722be65173a7f55887f5e86a8c9d
2025-08-21 17:39:44 +00:00
stephan
16478dbfdd Doc cleanups in main.mk. No functional changes.
FossilOrigin-Name: 839c998443880161af06b9f7470ebfc828251c3c1accdae5f0fbbcc13408474c
2025-08-13 11:46:05 +00:00
stephan
5d06c6b3f1 Add *.obj to the make clean target for the sake of the Unix-on-Windows environments.
FossilOrigin-Name: da07e0c02fe7de7b67f2564c29f49f251ae2374c0e269d246bd13e68a9a73328
2025-08-06 16:51:12 +00:00
drh
97e6368abc Add the snapshot-zip makefile targets for both Windows and Posix.
FossilOrigin-Name: 8c73c0c5935431556f687556bfdb459754609f07c6366c810a55bf7583ee303d
2025-07-14 18:27:32 +00:00
stephan
d961d49971 Eliminate configure/build discrepancies in how 'make tclextension-...' works vs other makefile-side handling of the extension, conforming to the former.
FossilOrigin-Name: 7ca545fd3b460fcf92e117baef42655eb6e78ebb5bdc6302f8f1b5b8446c0a06
2025-06-18 14:17:18 +00:00
stephan
12bd8ea09a Add the --tclConfig.sh FILE flag to buildtclext.tcl to eliminate the discrepancy between the configure-time-detected tclConfig.sh and the one auto-detected by the tclextension family of makefile targets. Add the tclextension-all target to run all of the various tclextension-... targets in their natural order to facilitate testing changes like this one. Update the --help text to note that --with-tclsh should only be used if there's a specific need, and that --with-tcl is generall preferred. This is in response to [https://github.com/termux/termux-packages/issues/23268 | Termux ticket 23268].
FossilOrigin-Name: 928976abcb11f9d5abe1f7631002592c4af7bf83ecadba5b0763866d039c2270
2025-06-18 11:11:30 +00:00
drh
b1929b7117 Remove the clunky test_windirent.h and test_windirent.c files from src/
and replace them with a much cleaner and more compact ext/misc/windirent.h.

FossilOrigin-Name: acc978df52ec41ffdb5c27764f30d53efa1f25a314b7d98983dc0d211a36b570
2025-06-05 20:12:41 +00:00
drh
0d3e5ca28e New makefile target "xdevtest" works like "releasetest" except that it
omits the "verify-source" dependency so that it can be run with uncommitted
changes in the source tree.

FossilOrigin-Name: 1afb1ac3e9f0a122f1374799c09b60a0dd5443434d4567d94385096ada91bf12
2025-05-31 18:26:37 +00:00
drh
81a2f7ba8f Amend the previous: Set SQLITE_JSON_MAX_DEPTH to 500 on *all* builds
of fuzzcheck.

FossilOrigin-Name: c266e38c5b61f47b920027aad418b641ab32cb8a3360dbcfd9f9f29b14fd5375
2025-05-24 01:34:41 +00:00
drh
85f37eba16 Limit JSON recursion depth to 500 when running ASAN in fuzzcheck, to prevent
stack overflow on ARM64.

FossilOrigin-Name: 5e96e177a040b46aa55492037ce5dc71ab49d66b45659d739f2ee6c3042f16ef
2025-05-23 20:50:49 +00:00
drh
5a9a2d8526 Remove the run-fuzzcheck makefile targets, since testrunner now
accomplishes that for us, and does a better job of it.

FossilOrigin-Name: 3ffd867ed31cd0779aa92b5e8b71592a8e7224977f9da8e5d6793a78bbb80070
2025-04-29 16:30:58 +00:00
stephan
86527e84e6 Rename makefile var libtclsqlite3.SO to libtclsqlite3.DLL for consistency.
FossilOrigin-Name: 6fb364c853be84c8d1f20497a2cae6e8f06a1d10ae364e3b011cadeaa3e0244b
2025-04-04 23:12:32 +00:00
stephan
16aa90bba4 Make the --static-cli-shell flag available in the autoconf build mode.
FossilOrigin-Name: b78a474ecba6cae4f0e867a515c214fbfe229808145df1870315328d4e13d462
2025-04-04 03:16:47 +00:00
stephan
2a5694910a Add the --static-cli-shell configure flag to the canonical build, which works like --static-tclsqlite3 but applies to the CLI shell (statically linking it, which only works if all requisite libs are available in static form). It is not called --static-shell because that flag has a completely different legacy meaning in the autoconf build and this flight might eventually be added to that build, so would collide there.
FossilOrigin-Name: fd2c1638ecc38617f5de0380ad23f233d1159be0712ae2ca4cae5c99e841f1b1
2025-04-03 13:24:38 +00:00
stephan
2636632cae Add the --static-tclsqlite3 configure flag (canonical build only) to build tclsqlite3 as a static binary. This will only work on systems which have static versions of all requisite libraries.
FossilOrigin-Name: 61836324369e3213841295911aed4f8439a4b2b0f24820c2cf45bb68a0e2cd04
2025-04-03 00:46:34 +00:00
stephan
20f534708a Minor cleanups to the --static-tclsqlite3 support.
FossilOrigin-Name: 06f1143870280d335daf4e7027fe8771e34415aa1234fe72c0c450c347b8146c
2025-04-03 00:40:33 +00:00
stephan
0993fc62f2 Add experimental --static-tclsqlite3 configure flag to build tclsqlite3 statically, which only works if static libtcl/etc. are available. Currently intended for docker builds via Alpine Linux.
FossilOrigin-Name: bef3c8b1b9fd188ee9f941f93bac4567795fea51cee0830abf1ebc1999e1604f
2025-04-02 23:34:35 +00:00
stephan
0a0367f387 Ensure that the compilation of extensions get the same CFLAGS as the core lib. Move the feature flags enabled by --dev out of TARGET_DEBUG and into OPT_FEATURE_FLAGS (for consistency). Rename the make-internal gcov-related flags to be more descriptive. At the end of the configure script, if SQLITE_DEBUG is active then emit a note reminding the builder that performance will suffer.
FossilOrigin-Name: e64c6a3856b839e4e8c0a1cb1713b0d2f1d3cb9b915dd215b0d3cb229502d539
2025-03-31 13:08:29 +00:00
stephan
227df626e9 Ensure that extension sources also inherit the debugging-related flags from --debug or --dev.
FossilOrigin-Name: 3e96b772a46638bc25e036de053d620ded3350871ee10e06fd6fe51429934b0d
2025-03-31 10:54:09 +00:00
stephan
13a9fb0d21 Configure/make doc tweaks. No functional changes.
FossilOrigin-Name: dbcc03bd7a727f4643f18a814bb9fd9071c0355f98dd064286240f2af361ee7f
2025-03-28 14:32:01 +00:00
stephan
d877b56688 Configure script internal cleanups and re-orgs. No functional changes.
FossilOrigin-Name: f619e40fb05d3e09dca2ad9d9bbf38c66b4b93dd3d4e7c2071db28e671ee6a9c
2025-03-22 12:43:22 +00:00
stephan
ccda0f008a Very slight simplification of the run-fuzzcheck rules.
FossilOrigin-Name: c858a39fad30c46aec6a1f81b2d4e56c18ecf7f5cb6d2fe4a32c4b3bb1a6ed64
2025-03-18 12:31:09 +00:00
stephan
ab68965794 Add --asan-fsanitize=... configure flag to the canonical build to optionally set -fsantize flags for the fuzzcheck-asan tool. Teach proj-check-fsanitiz to fail for flags which the compiler emits any warning for, for reasons described in its comments.
FossilOrigin-Name: 013730e9b92af39cb7fd2871df9b4bc81b8990f918892bd79370704421672da0
2025-03-16 13:09:21 +00:00
stephan
bafddb17d7 Consolidate some much-duplicated run-fuzzcheck recipe code in main.mk.
FossilOrigin-Name: c0d9b9fad3a2f23941927f1be2abded3bde2f2b04f7a5f3cc0a54a978020ebaa
2025-03-16 11:24:32 +00:00
drh
fc293f7c0e Rework the run-fuzzcheck makefile target so that it better exploit parallelism.
Test case "<tt>make -j16 run-fuzzcheck FUZZDB=20250222.db</tt>"
went from 596 seconds down to 107 seconds.

FossilOrigin-Name: 18bda13e197e4b4ec7464b3e70012f71edc05f73d8b14bb48bad452f81c7e185
2025-03-16 00:13:29 +00:00