1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-08-05 15:55:57 +03:00

Allow a pattern to filter test scripts to be appended to testrunner.tcl "mdevtest", "sdevtest" and "release" commands. e.g. "tclsh test/testrunner.tcl sdevtest fts5%".

FossilOrigin-Name: f8ea0b58b37f4052ded448e595d6d2992988a33b8ecfe58d68f20532f8cb5a37
This commit is contained in:
dan
2023-11-24 18:33:40 +00:00
parent f5232b3a97
commit 88a61ff8ba
4 changed files with 51 additions and 30 deletions

View File

@@ -114,6 +114,12 @@ a specified pattern (e.g. all tests that start with "fts5"), either of:
./testfixture $TESTDIR/testrunner.tcl 'fts5*' ./testfixture $TESTDIR/testrunner.tcl 'fts5*'
``` ```
Strictly speaking, for a test to be run the pattern must match the script
filename, not including the directory, using the rules of Tcl's
\[string match\] command. Except that before the matching is done, any "%"
characters specified as part of the pattern are transformed to "\*".
To run "all" tests (full + permutations): To run "all" tests (full + permutations):
``` ```
@@ -141,6 +147,7 @@ Or, if the failure occured as part of a permutation:
TODO: An example instead of "$PERMUTATION" and $PATH\_TO\_SCRIPT? TODO: An example instead of "$PERMUTATION" and $PATH\_TO\_SCRIPT?
<a name=source_code_tests></a>
# 3. Source Code Tests # 3. Source Code Tests
The commands described in this section invoke the C compiler to build The commands described in this section invoke the C compiler to build
@@ -201,6 +208,16 @@ of the specific tests run.
tclsh $TESTDIR/testrunner.tcl release tclsh $TESTDIR/testrunner.tcl release
``` ```
As with <a href=#source code tests>source code tests</a>, one or more patterns
may be appended to any of the above commands (mdevtest, sdevtest or release).
In that case only Tcl tests (no fuzz or other tests) that match the specified
pattern are run. For example, to run the just the Tcl rtree tests in all
builds and configurations supported by "release":
```
tclsh $TESTDIR/testrunner.tcl release rtree%
```
## Running ZipVFS Tests ## Running ZipVFS Tests
testrunner.tcl can build a zipvfs-enabled testfixture and use it to run testrunner.tcl can build a zipvfs-enabled testfixture and use it to run
@@ -277,8 +294,3 @@ testrunner.log and testrunner.db files:

View File

@@ -1,5 +1,5 @@
C Get\sall\sCLI\sprint\scalls\swhich\swent\sto\sstdout\sin\s3.44.0\sto\scontinue\sgoing\sto\sstdout. C Allow\sa\spattern\sto\sfilter\stest\sscripts\sto\sbe\sappended\sto\stestrunner.tcl\s"mdevtest",\s"sdevtest"\sand\s"release"\scommands.\se.g.\s"tclsh\stest/testrunner.tcl\ssdevtest\sfts5%".
D 2023-11-24T15:58:14.760 D 2023-11-24T18:33:40.234
F .fossil-settings/empty-dirs dbb81e8fc0401ac46a1491ab34a7f2c7c0452f2f06b54ebb845d024ca8283ef1 F .fossil-settings/empty-dirs dbb81e8fc0401ac46a1491ab34a7f2c7c0452f2f06b54ebb845d024ca8283ef1
F .fossil-settings/ignore-glob 35175cdfcf539b2318cb04a9901442804be81cd677d8b889fcc9149c21f239ea F .fossil-settings/ignore-glob 35175cdfcf539b2318cb04a9901442804be81cd677d8b889fcc9149c21f239ea
F LICENSE.md df5091916dbb40e6e9686186587125e1b2ff51f022cc334e886c19a0e9982724 F LICENSE.md df5091916dbb40e6e9686186587125e1b2ff51f022cc334e886c19a0e9982724
@@ -41,7 +41,7 @@ F doc/compile-for-windows.md 50b27d77be96195c66031a3181cb8684ed822327ea834e07f9c
F doc/json-enhancements.md e356fc834781f1f1aa22ee300027a270b2c960122468499bf347bb123ce1ea4f F doc/json-enhancements.md e356fc834781f1f1aa22ee300027a270b2c960122468499bf347bb123ce1ea4f
F doc/lemon.html 44a53a1d2b42d7751f7b2f478efb23c978e258d794bfd172442307a755b9fa44 F doc/lemon.html 44a53a1d2b42d7751f7b2f478efb23c978e258d794bfd172442307a755b9fa44
F doc/pager-invariants.txt 27fed9a70ddad2088750c4a2b493b63853da2710 F doc/pager-invariants.txt 27fed9a70ddad2088750c4a2b493b63853da2710
F doc/testrunner.md 2434864be2219d4f0b6ffc99d0a2172d531c4ca4345340776f67ad4edd90dc90 F doc/testrunner.md 727ef3877f5cea152a56f04566d0e095e0761918e9d771fc914db233a91bdd2e
F doc/trusted-schema.md 33625008620e879c7bcfbbfa079587612c434fa094d338b08242288d358c3e8a F doc/trusted-schema.md 33625008620e879c7bcfbbfa079587612c434fa094d338b08242288d358c3e8a
F doc/vdbesort-memory.md 4da2639c14cd24a31e0af694b1a8dd37eaf277aff3867e9a8cc14046bc49df56 F doc/vdbesort-memory.md 4da2639c14cd24a31e0af694b1a8dd37eaf277aff3867e9a8cc14046bc49df56
F doc/vfs-shm.txt e101f27ea02a8387ce46a05be2b1a902a021d37a F doc/vfs-shm.txt e101f27ea02a8387ce46a05be2b1a902a021d37a
@@ -1653,7 +1653,7 @@ F test/temptable2.test 76821347810ecc88203e6ef0dd6897b6036ac788e9dd3e6b04fd4d163
F test/temptable3.test d11a0974e52b347e45ee54ef1923c91ed91e4637 F test/temptable3.test d11a0974e52b347e45ee54ef1923c91ed91e4637
F test/temptrigger.test 38f0ca479b1822d3117069e014daabcaacefffcc F test/temptrigger.test 38f0ca479b1822d3117069e014daabcaacefffcc
F test/tester.tcl 68454ef88508c196d19e8694daa27bff7107a91857799eaa12f417188ae53ede F test/tester.tcl 68454ef88508c196d19e8694daa27bff7107a91857799eaa12f417188ae53ede
F test/testrunner.tcl 8a6721213bce1cfd3b33e1588cc6431143d96b98819206bf91f5a205fbb150d4 F test/testrunner.tcl 3ce1f7d0541bcb60f23e843fcde6c66f76acd907bbfa0192620f40ad78a4c9c3
F test/testrunner_data.tcl e4d5017290a6d5c11785e36cc94c67d8bb950c8cdc2dbe4c1db2a3a583812560 F test/testrunner_data.tcl e4d5017290a6d5c11785e36cc94c67d8bb950c8cdc2dbe4c1db2a3a583812560
F test/thread001.test a0985c117eab62c0c65526e9fa5d1360dd1cac5b03bde223902763274ce21899 F test/thread001.test a0985c117eab62c0c65526e9fa5d1360dd1cac5b03bde223902763274ce21899
F test/thread002.test c24c83408e35ba5a952a3638b7ac03ccdf1ce4409289c54a050ac4c5f1de7502 F test/thread002.test c24c83408e35ba5a952a3638b7ac03ccdf1ce4409289c54a050ac4c5f1de7502
@@ -2143,8 +2143,8 @@ F vsixtest/vsixtest.tcl 6a9a6ab600c25a91a7acc6293828957a386a8a93
F vsixtest/vsixtest.vcxproj.data 2ed517e100c66dc455b492e1a33350c1b20fbcdc F vsixtest/vsixtest.vcxproj.data 2ed517e100c66dc455b492e1a33350c1b20fbcdc
F vsixtest/vsixtest.vcxproj.filters 37e51ffedcdb064aad6ff33b6148725226cd608e F vsixtest/vsixtest.vcxproj.filters 37e51ffedcdb064aad6ff33b6148725226cd608e
F vsixtest/vsixtest_TemporaryKey.pfx e5b1b036facdb453873e7084e1cae9102ccc67a0 F vsixtest/vsixtest_TemporaryKey.pfx e5b1b036facdb453873e7084e1cae9102ccc67a0
P 4ff103d294b79cf7734e87e94e9d88c0e9f0b087cbb352e6da2f0a3a6b268f46 P e9951ede184ce07cf725152723d795f299922460715ab76225cd3071bf0f18ee
R c9c02224e257d585a65f6ab0d6ca2ee5 R b6b078e60149e99b226063ed1104d74a
U larrybr U dan
Z dc01e7a4eb28e73d82b5d93b184ed26c Z 8e4057a95f8c06424678eb8234c037ec
# Remove this line to create a well-formed Fossil manifest. # Remove this line to create a well-formed Fossil manifest.

View File

@@ -1 +1 @@
e9951ede184ce07cf725152723d795f299922460715ab76225cd3071bf0f18ee f8ea0b58b37f4052ded448e595d6d2992988a33b8ecfe58d68f20532f8cb5a37

View File

@@ -752,6 +752,20 @@ proc add_zipvfs_jobs {} {
set ::env(SQLITE_TEST_DIR) $::testdir set ::env(SQLITE_TEST_DIR) $::testdir
} }
# Used to add jobs for "mdevtest" and "sdevtest".
#
proc add_devtest_jobs {lBld patternlist} {
global TRG
foreach b $lBld {
set bld [add_build_job $b $TRG(testfixture)]
add_tcl_jobs $bld veryquick $patternlist
if {$patternlist==""} {
add_fuzztest_jobs $b
}
}
}
proc add_jobs_from_cmdline {patternlist} { proc add_jobs_from_cmdline {patternlist} {
global TRG global TRG
@@ -775,33 +789,28 @@ proc add_jobs_from_cmdline {patternlist} {
} }
mdevtest { mdevtest {
foreach b [list All-O0 All-Debug] { add_devtest_jobs {All-O0 All-Debug} [lrange $patternlist 1 end]
set bld [add_build_job $b $TRG(testfixture)]
add_tcl_jobs $bld veryquick ""
add_fuzztest_jobs $b
}
} }
sdevtest { sdevtest {
foreach b [list All-Sanitize All-Debug] { add_devtest_jobs {All-Sanitize All-Debug} [lrange $patternlist 1 end]
set bld [add_build_job $b $TRG(testfixture)]
add_tcl_jobs $bld veryquick ""
add_fuzztest_jobs $b
}
} }
release { release {
set patternlist [lrange $patternlist 1 end]
foreach b [trd_builds $TRG(platform)] { foreach b [trd_builds $TRG(platform)] {
set bld [add_build_job $b $TRG(testfixture)] set bld [add_build_job $b $TRG(testfixture)]
foreach c [trd_configs $TRG(platform) $b] { foreach c [trd_configs $TRG(platform) $b] {
add_tcl_jobs $bld $c "" add_tcl_jobs $bld $c $patternlist
} }
foreach e [trd_extras $TRG(platform) $b] { if {$patternlist==""} {
if {$e=="fuzztest"} { foreach e [trd_extras $TRG(platform) $b] {
add_fuzztest_jobs $b if {$e=="fuzztest"} {
} else { add_fuzztest_jobs $b
add_make_job $bld $e } else {
add_make_job $bld $e
}
} }
} }
} }