1
0
mirror of https://github.com/sqlite/sqlite.git synced 2026-01-06 08:01:16 +03:00

Add new tcl-extension-testing.md document. The Windows side is not yet

working.

FossilOrigin-Name: 9dc805df1b1c26196ca53baa6b1b8c2f7e59e0150d02ead53228c77a63ad40f4
This commit is contained in:
drh
2025-01-04 14:10:45 +00:00
parent ded37f337b
commit 8f1bdc0f73
3 changed files with 152 additions and 6 deletions

View File

@@ -0,0 +1,142 @@
# Test Procedures For The SQLite TCL Extension
## 1.0 Testing On Unix-like Systems (Including Mac)
### 1.1 Setup
<ol type="1">
<li value="1">
[Fossil](https://fossil-scm.org/) installed.
<li>
A Fossil check-out of the TCL source tree. Let the directory
of this check-out be called **$TCLCO** (mnemonic: "TCL Check-Out").
<li>
A Fossil check-out of the SQLite source tree. Let the directory
of this check-out be called **$SRCCO** (mnemonic: "SouRCe Check-Out").
<li>
Let **$TCLTD** (mnemonic: "TCL Test Directory") be the name of a directory
that does not exist at the start of the test, and which will be
deleted at the end of the test, that will contain the test builds
of the TCL libraries and the SQLite TCL Extensions.
</ol>
### 1.2 Building the TCL libraries and tclsh executables
<ol type="1">
<li value="5"> `mkdir $TCLTD $TCLTD/tcl86 $TCLTD/tcl90`
<li> `cd $TCLCO/unix`
<li> `fossil up core-8-6-16` &larr; or some other version of Tcl8.6.
<li> `fossil clean -x`
<li> `./configure --prefix=$TCLTD/tcl86`
<li> `make install`
<li> `fossil up core-9-0-0` &larr; or some other version of Tcl9
<li> `fossil clean -x`
<li> `./configure --prefix=$TCLTD/tcl90`
<li> `make install`
</ol>
### 1.3 Building the SQLite TCL extension
<ol type="1">
<li value="15"> `cd $SRCCO`
<li> `fossil clean -x`
<li> `./configure --with-tclsh=$TCLTD/tcl86/bin/tclsh8.6`
<li> `make tclextension-install`
<li> &rarr; Verify extension installed at $TCLTD/tcl86/lib/tcl8.6/sqlite3.*
<li> `fossil clean -x`
<li> `./configure --with-tclsh=$TCLTD/tcl90/bin/tclsh9.0`
<li> `make tclextension-install`
<li> &rarr; Verify extension installed at $TCLTD/tcl90/lib/sqlite3.*
</ol>
### 1.4 Testing the extension
<ol type="1">
<li value="24">
`$TCLTD/tcl86/bin/tclsh8.6 test/testrunner.tcl release --explain`
<li> &uarr; Verify thousands of lines of output with no errors
<li> `$TCLTD/tcl90/bin/tclsh9.0 test/testrunner.tcl release --explain`
<li> &uarr; Verify thousands of lines of output with no errors
</ol>
### 1.5 Cleanup
<ol type="1">
<li value="28"> `rm -rf $TCLTD`
</ol>
## 2.0 Testing On Windows
### 2.1 Setup for Windows
<ol type="1">
<li value="1">
[Fossil](https://fossil-scm.org/) installed.
<li>
A Fossil check-out of the TCL source tree. Let the directory
of this check-out be called **%TCLCO%** (mnemonic: "TCL Check-Out").
<li>
A Fossil check-out of the SQLite source tree. Let the directory
of this check-out be called **%SRCCO%** (mnemonic: "SouRCe Check-Out").
<li>
Let **%TCLTD%** (mnemonic: "TCL Test Directory") be the name of a directory
that does not exist at the start of the test, and which will be
deleted at the end of the test, that will contain the test builds
of the TCL libraries and the SQLite TCL Extensions.
<li>
Unix-like command-line tools installed. Example:
[unxutils](https://unxutils.sourceforge.net/)
<li> [Visual Studio](https://visualstudio.microsoft.com/vs/community/)
installed. VS2015 or later required.
<li> `set ORIGINALPATH=%PATH%` &larr; remember the original %PATH% value
</ol>
### 2.2 Building the TCL libraries and tclsh.exe executables on Windows
<ol type="1">
<li value="8"> `mkdir %TCLTD% %TCLTD%\tcl86 %TCLTD%\tcl90`
<li> `cd %TCLCO%\win`
<li> `fossil up core-8-6-16` &larr; or some other version of Tcl8.6.
<li> `fossil clean -x`
<li> `nmake /f makefile.vc INSTALLDIR=%TCLTD%\tcl86 release install`
<li> `fossil up core-9-0-0` &larr; or some other version of Tcl9
<li> `fossil clean -x`
<li> `nmake /f makefile.vc INSTALLDIR=%TCLTD%\tcl86 release install`
</ol>
### 2.3 Building the SQLite TCL extension on Windows
<ol type="1">
<li value="16"> `cd %SRCCO%`
<li> `fossil clean -x`
<li> `set TCLDIR=%TCLTD%\tcl86`
<li> `set PATH=%TCLTD%\tcl86\bin;%ORIGINALPATH%`
<li> `set TCLSH_CMD=%TCLTD%\tcl86\bin\tclsh86t.exe`
<li> `nmake /f Makefile.msc tclextension-install`
<li> &rarr; Verify extension installed at %TCLTD%\tcl86\lib\tcl8.6\sqlite3.*
<li> `fossil clean -x`
<li> `set TCLDIR=%TCLTD%\tcl90`
<li> `set PATH=%TCLTD%\tcl90\bin;%ORIGINALPATH%`
<li> `set TCLSH_CMD=%TCLTD%\tcl90\bin\tclsh90.exe`
<li> `nmake /f Makefile.msc tclextension-install`
<li> &rarr; Verify extension installed at %TCLTD%\tcl906\lib\sqlite3.*
</ol>
### 2.4 Testing on Windows
<ol type="1">
<li value="29">
`set PATH=%TCLTD%\tcl86\bin;%ORIGINALPATH%`
<li>`tclsh86t test/testrunner.tcl release --explain`
<li> &uarr; Verify thousands of lines of output with no errors
<li> `set PATH=%TCLTD%\tcl90\bin;%ORIGINALPATH%`
<li> `tclsh90 test/testrunner.tcl release --explain`
<li> &uarr; Verify thousands of lines of output with no errors
</ol>
### 2.5 Cleanup
<ol type="1">
<li value="35"> `rm -rf %TCLTD%`
</ol>

View File

@@ -1,5 +1,5 @@
C Add\scomment\sto\sthe\scolumnIsGoodIndexCandidate()\sroutine\sto\srecord\sthe\sresults\nof\sa\sfailed\sexperiment.\s\sNo\schanges\sto\scode.
D 2025-01-03T11:51:50.103
C Add\snew\stcl-extension-testing.md\sdocument.\s\sThe\sWindows\sside\sis\snot\syet\nworking.
D 2025-01-04T14:10:45.730
F .fossil-settings/empty-dirs dbb81e8fc0401ac46a1491ab34a7f2c7c0452f2f06b54ebb845d024ca8283ef1
F .fossil-settings/ignore-glob 35175cdfcf539b2318cb04a9901442804be81cd677d8b889fcc9149c21f239ea
F LICENSE.md e108e1e69ae8e8a59e93c455654b8ac9356a11720d3345df2a4743e9590fb20d
@@ -61,6 +61,7 @@ F doc/json-enhancements.md e356fc834781f1f1aa22ee300027a270b2c960122468499bf347b
F doc/jsonb.md 5fab4b8613aa9153fbeb6259297bd4697988af8b3d23900deba588fa7841456b
F doc/lemon.html 8b266ff711d2ec7f867c3dca37634963f48a630329908cc282beebfa8c708706
F doc/pager-invariants.txt 27fed9a70ddad2088750c4a2b493b63853da2710
F doc/tcl-extension-testing.md e7ce7dbd7394c411d5d3c1d29b86455e81203d750af1765304d603fd12973a27
F doc/testrunner.md 15583cf8c7d8a1c3378fd5d4319ca769a14c4d950a5df9b015d01d5be290dc69
F doc/trusted-schema.md 33625008620e879c7bcfbbfa079587612c434fa094d338b08242288d358c3e8a
F doc/vdbesort-memory.md 4da2639c14cd24a31e0af694b1a8dd37eaf277aff3867e9a8cc14046bc49df56
@@ -2204,8 +2205,11 @@ F tool/version-info.c 3b36468a90faf1bbd59c65fd0eb66522d9f941eedd364fabccd7227350
F tool/warnings-clang.sh bbf6a1e685e534c92ec2bfba5b1745f34fb6f0bc2a362850723a9ee87c1b31a7
F tool/warnings.sh 49a486c5069de041aedcbde4de178293e0463ae9918ecad7539eedf0ec77a139
F tool/win/sqlite.vsix deb315d026cc8400325c5863eef847784a219a2f
P 1291b013a8c93e7001fe25783bc98d12f5f7c341d1f728e6852632e18a38af58
R 0507e66ed59bfa5a55bc14583a9d765f
P 9ee57a30a49d9813bf2669a5d8346f7e018e3fbf1792739951311a8d3a249d45
R 33caf2e9f23e286037be195e768a7a16
T *branch * test-procedures
T *sym-test-procedures *
T -sym-trunk *
U drh
Z 3304d535a779543ccf066c65753e6b08
Z a6ccc4c86b9da5c35c8534fa7413feee
# Remove this line to create a well-formed Fossil manifest.

View File

@@ -1 +1 @@
9ee57a30a49d9813bf2669a5d8346f7e018e3fbf1792739951311a8d3a249d45
9dc805df1b1c26196ca53baa6b1b8c2f7e59e0150d02ead53228c77a63ad40f4