diff options
author | stephan <stephan@noemail.net> | 2025-04-25 11:27:13 +0000 |
---|---|---|
committer | stephan <stephan@noemail.net> | 2025-04-25 11:27:13 +0000 |
commit | ef90c4209cefa1391c7217aee5978a53b3b8152b (patch) | |
tree | cf2fbeb76aa94a24a176d196321cc8836ee745ff | |
parent | d3b39b18d09df4c780e72190f68d11b776bcc4a7 (diff) | |
download | sqlite-ef90c4209cefa1391c7217aee5978a53b3b8152b.tar.gz sqlite-ef90c4209cefa1391c7217aee5978a53b3b8152b.zip |
Teaish internal API tweaks and ensure that -encoding utf-8 is used when source'ing test scripts.
FossilOrigin-Name: f878f578f8fac95a939e3eabe8b64d5627d2ccd98de1e28081b9bca42ffee027
-rw-r--r-- | autoconf/tea/autosetup/core.tcl | 53 | ||||
-rw-r--r-- | autoconf/tea/teaish.tester.tcl.in | 6 | ||||
-rw-r--r-- | autosetup/proj.tcl | 4 | ||||
-rw-r--r-- | manifest | 16 | ||||
-rw-r--r-- | manifest.uuid | 2 |
5 files changed, 43 insertions, 38 deletions
diff --git a/autoconf/tea/autosetup/core.tcl b/autoconf/tea/autosetup/core.tcl index 9ef0178e2..660173b32 100644 --- a/autoconf/tea/autosetup/core.tcl +++ b/autoconf/tea/autosetup/core.tcl @@ -177,8 +177,8 @@ proc teaish-configure-core {} { # TEA has --with-tclinclude but it appears to only be useful for # building an extension against an uninstalled copy of TCL's own - # source tree. Either we get that info from tclConfig.sh or we - # give up. + # source tree. The policy here is that either we get that info + # from tclConfig.sh or we give up. # # with-tclinclude:DIR # => {Specify the directory which contains the tcl.h. This should not @@ -188,24 +188,27 @@ proc teaish-configure-core {} { # extensions, and thus use a teaish-... prefix on most flags. However, # --teaish-extension-dir is frequently needed, so... # - # As of this spontaneous moment, we'll formalize using using - # --t-X-Y to abbreviate teaish flags when doing so is + # As of this spontaneous moment, we'll settle on using --t-A-X to + # abbreviate --teaish-A...-X... flags when doing so is # unambiguous... ted: t-e-d: teaish-extension-dir:DIR - => {Looks for an extension in the given directory instead of the current dir.} + => {Looks for an extension in the given directory instead of the current + dir.} t-c-e: teaish-create-extension:TARGET_DIRECTORY => {Writes stub files for creating an extension. Will refuse to overwrite - existing files without --force.} + existing files without --teaish-force.} t-f teaish-force - => {Has a context-dependent meaning (autosetup defines --force for its own use)} + => {Has a context-dependent meaning (autosetup defines --force for its + own use).} t-d-d - teaish-dump-defines => {Dump all configure-defined vars to config.defines.txt} + teaish-dump-defines + => {Dump all configure-defined vars to config.defines.txt} t-v teaish-verbose=0 @@ -813,7 +816,7 @@ proc teaish__find_extension {} { if {$dirExt ne $dirSrc} { lappend flist $dirSrc/teaish.tcl } - if {![proj-first-file-found $flist extT]} { + if {![proj-first-file-found extT $flist]} { if {$gotHelpArg} { # Tell teaish-configure-core that the lack of extension is not # an error when --help is used. @@ -859,9 +862,8 @@ If you are attempting an out-of-tree build, use # We use the first one of teaish.make.in or teaish.make we find in # $dirExt. # - if {[proj-first-file-found \ - [list $dirExt/teaish.make.in $dirExt/teaish.make] \ - extM]} { + if {[proj-first-file-found extM \ + [list $dirExt/teaish.make.in $dirExt/teaish.make]]} { if {[string match *.in $extM]} { define TEAISH_MAKEFILE_IN $extM define TEAISH_MAKEFILE [file rootname [file tail $extM]] @@ -878,9 +880,8 @@ If you are attempting an out-of-tree build, use } # Look for teaish.pkginit.tcl[.in] - if {[proj-first-file-found \ - [list $dirExt/teaish.pkginit.tcl.in $dirExt/teaish.pkginit.tcl] \ - extI]} { + if {[proj-first-file-found extI \ + [list $dirExt/teaish.pkginit.tcl.in $dirExt/teaish.pkginit.tcl]]} { if {[string match *.in $extI]} { proj-dot-ins-append $extI define TEAISH_PKGINIT_TCL_IN $extI @@ -897,19 +898,19 @@ If you are attempting an out-of-tree build, use # Look for pkgIndex.tcl[.in]... set piPolicy 0 - if {[proj-first-file-found $dirExt/pkgIndex.tcl.in extPI]} { + if {[proj-first-file-found extPI $dirExt/pkgIndex.tcl.in]} { # Generate ./pkgIndex.tcl from it. define TEAISH_PKGINDEX_TCL_IN $extPI define TEAISH_PKGINDEX_TCL [file rootname [file tail $extPI]] apply $addDist $extPI set piPolicy 0x01 } elseif {$dirExt ne $dirSrc - && [proj-first-file-found $dirSrc/pkgIndex.tcl.in extPI]} { + && [proj-first-file-found extPI $dirSrc/pkgIndex.tcl.in]} { # Generate ./pkgIndex.tcl from it. define TEAISH_PKGINDEX_TCL_IN $extPI define TEAISH_PKGINDEX_TCL [file rootname [file tail $extPI]] set piPolicy 0x02 - } elseif {[proj-first-file-found $dirExt/pkgIndex.tcl extPI]} { + } elseif {[proj-first-file-found extPI $dirExt/pkgIndex.tcl]} { # Assume it's a static file and use it. define TEAISH_PKGINDEX_TCL_IN "" define TEAISH_PKGINDEX_TCL $extPI @@ -924,7 +925,7 @@ If you are attempting an out-of-tree build, use # Look for teaish.test.tcl[.in] proj-assert {"" ne $dirExt} set flist [list $dirExt/teaish.test.tcl.in $dirExt/teaish.test.tcl] - if {[proj-first-file-found $flist ttt]} { + if {[proj-first-file-found ttt $flist]} { if {[string match *.in $ttt]} { # Generate teaish.test.tcl from $ttt set xt [file rootname [file tail $ttt]] @@ -944,7 +945,7 @@ If you are attempting an out-of-tree build, use # Look for teaish.tester.tcl[.in] set flist [list $dirExt/teaish.tester.tcl.in $dirSrc/teaish.tester.tcl.in] - if {[proj-first-file-found $flist ttt]} { + if {[proj-first-file-found ttt $flist]} { # Generate teaish.test.tcl from $ttt set xt [file rootname [file tail $ttt]] file delete -force -- $xt; # ensure no stale copy is used @@ -1408,10 +1409,14 @@ proc teaish__pragma {args} { # teaish-pkginfo-set ?-vars|-subst? {-name foo -version 0.1.2} # # The latter may be easier to write for a multi-line invocation. -# Passing the -vars flag tells it to perform a [subst] of (only) -# variables in the {...} part from the calling scope. The -subst flag -# will cause is to [subst] the {...} with command substitution as well -# (but no backslash substitution). +# +# For the second call form, passing the -vars flag tells it to perform +# a [subst] of (only) variables in the {...} part from the calling +# scope. The -subst flag will cause it to [subst] the {...} with +# command substitution as well (but no backslash substitution). When +# using -subst for string concatenation, e.g. with -libDir +# foo[get-version-number], be sure to wrap the value in braces: +# -libDir {foo[get-version-number]}. # # Each pkginfo flag corresponds to one piece of extension package # info. Teaish provides usable default values for all of these flags, diff --git a/autoconf/tea/teaish.tester.tcl.in b/autoconf/tea/teaish.tester.tcl.in index 8f1362a75..802f1d975 100644 --- a/autoconf/tea/teaish.tester.tcl.in +++ b/autoconf/tea/teaish.tester.tcl.in @@ -19,11 +19,11 @@ if {[llength [lindex $::argv 0]] > 0} { load [lindex $::argv 0] [lindex $::argv 1]; } -source [lindex $::argv 2]; # teaish/tester.tcl +source -encoding utf-8 [lindex $::argv 2]; # teaish/tester.tcl @if TEAISH_PKGINIT_TCL apply {{file} { set dir [file dirname $::argv0] - source $file + source -encoding utf-8 $file }} [join {@TEAISH_PKGINIT_TCL@}] @endif @if TEAISH_TEST_TCL @@ -32,7 +32,7 @@ apply {{file} { array set ::teaish__BuildFlags @TEAISH__DEFINES_MAP@ set dir [file normalize [file dirname $file]] #test-fail "Just testing" - source $file + source -encoding utf-8 $file }} [join {@TEAISH_TEST_TCL@}] @else # TEAISH_TEST_TCL # No $TEAISH_TEST_TCL provided, so here's a default test which simply diff --git a/autosetup/proj.tcl b/autosetup/proj.tcl index 1ccc63280..3ebb5f250 100644 --- a/autosetup/proj.tcl +++ b/autosetup/proj.tcl @@ -1760,13 +1760,13 @@ proc proj-validate-no-unresolved-ats {args} { } # -# @proj-first-found fileList tgtVar +# @proj-first-found tgtVar fileList # # Searches $fileList for an existing file. If one is found, its name is # assigned to tgtVar and 1 is returned, else tgtVar is not modified # and 0 is returned. # -proc proj-first-file-found {fileList tgtVar} { +proc proj-first-file-found {tgtVar fileList} { upvar $tgtVar tgt foreach f $fileList { if {[file exists $f]} { @@ -1,5 +1,5 @@ -C Upstream\steaish\sfixes\sand\simprovements. -D 2025-04-23T14:54:13.759 +C Teaish\sinternal\sAPI\stweaks\sand\sensure\sthat\s-encoding\sutf-8\sis\sused\swhen\ssource'ing\stest\sscripts. +D 2025-04-25T11:27:13.409 F .fossil-settings/binary-glob 61195414528fb3ea9693577e1980230d78a1f8b0a54c78cf1b9b24d0a409ed6a x F .fossil-settings/empty-dirs dbb81e8fc0401ac46a1491ab34a7f2c7c0452f2f06b54ebb845d024ca8283ef1 F .fossil-settings/ignore-glob 35175cdfcf539b2318cb04a9901442804be81cd677d8b889fcc9149c21f239ea @@ -26,7 +26,7 @@ F autoconf/tea/Makefile.in bb66da485861af82a45e7c135fcf89270f5c0989dbfbb17912c74 F autoconf/tea/README.txt 656d4686c509d375f5988ff3deda94f65fe6cd8358cd55d1f1dcc7b6e2ff73aa F autoconf/tea/auto.def ce95b9450e2fa4ba5dc857e208fe10f4e6f2d737796ac3278aee6079db417529 F autoconf/tea/autosetup/README.txt b40071e6f8506500a2f7f71d5fc69e0bf87b9d7678dd9da1e5b4d0acbf40b1ca -F autoconf/tea/autosetup/core.tcl b230b6a6d711c162ead7249c771bfb730b7c413b38ceb6832f92baab8d2e62a5 +F autoconf/tea/autosetup/core.tcl 603506c76d1bdf3cf12be0ed87e11fb77aeae3b0598b97e3989e6fabb60de01a F autoconf/tea/autosetup/feature-tests.tcl 307cac35806817fc87bd0d92004364ee682c0e99f2ab505291500493ab6c7a5f F autoconf/tea/autosetup/tester.tcl 93cff35afc5cabc8f855fad114fae58b435fa47cbab5f8cbd4dc694ff0c26107 F autoconf/tea/configure d0b12b984edca6030d1976375b80157ac78b5b90a5b4f0dcee39357f63f4a80b x @@ -35,7 +35,7 @@ F autoconf/tea/license.terms 13bd403c9610fd2b76ece0ab50c4c5eda933d523 F autoconf/tea/pkgIndex.tcl.in e07da6b94561f4aa382bab65b1ccceb04701b97bf59d007c1d1f20a222b22d07 F autoconf/tea/teaish.tcl 9abc575ff3106c60ec0924a558d45dd58f7b4cd07373f87372df1988611b7d8c F autoconf/tea/teaish.test.tcl cfe94e1fb79dd078f650295be59843d470125e0cc3a17a1414c1fb8d77f4aea6 -F autoconf/tea/teaish.tester.tcl.in 430c3514633f6de0a9527f52ff7d251febacf839a91d45c04b10a70388bcaee2 +F autoconf/tea/teaish.tester.tcl.in 0d048e5569ad9bbaffbe5123c2084f9084d424a7719d06f5ca941caafbcca320 F autosetup/LICENSE 41a26aebdd2cd185d1e2b210f71b7ce234496979f6b35aef2cbf6b80cbed4ce4 F autosetup/README.autosetup a78ff8c4a3d2636a4268736672a74bf14a82f42687fcf0631a70c516075c031e F autosetup/README.md f324bb9f9bf1cc787122034df53fbfdfed28ee2657e6652b763d992ab0d04829 @@ -51,7 +51,7 @@ F autosetup/cc.tcl c0fcc50ca91deff8741e449ddad05bcd08268bc31177e613a6343bbd1fd3e F autosetup/find_tclconfig.tcl e64886ffe3b982d4df42cd28ed91fe0b5940c2c5785e126c1821baf61bc86a7e F autosetup/jimsh0.c 563b966c137a4ce3c9333e5196723b7ac0919140a9d7989eb440463cd855c367 F autosetup/pkg-config.tcl 4e635bf39022ff65e0d5434339dd41503ea48fc53822c9c5bde88b02d3d952ba -F autosetup/proj.tcl 38999aca5258e59fc6e7d4d5964c395b74bb5dc7865479bd98cee4dca71e61ba +F autosetup/proj.tcl 7eff53437b4e0a5cc9215221487129ea8c53b89e8b651ee2d2713cdc6e1d0642 F autosetup/sqlite-config.tcl 54c88abadda1a42c6276186afcf6534e9bcb08350d96676c4ec08b99f2ada484 F autosetup/system.tcl 51d4be76cd9a9074704b584e5c9cbba616202c8468cf9ba8a4f8294a7ab1dba9 F configure 9a00b21dfd13757bbfb8d89b30660a89ec1f8f3a79402b8f9f9b6fc475c3303a x @@ -2216,8 +2216,8 @@ F tool/version-info.c 3b36468a90faf1bbd59c65fd0eb66522d9f941eedd364fabccd7227350 F tool/warnings-clang.sh bbf6a1e685e534c92ec2bfba5b1745f34fb6f0bc2a362850723a9ee87c1b31a7 F tool/warnings.sh 49a486c5069de041aedcbde4de178293e0463ae9918ecad7539eedf0ec77a139 F tool/win/sqlite.vsix deb315d026cc8400325c5863eef847784a219a2f -P 5a411c609ba0ee17b1ce5bd0b40b9ded92d76f35933f92b2e02a58a3f169c715 -R b0c338fe00382bfb412fdd47cce333a1 +P 235ea2c0e1823fe4324c3890069a9131ebb6de14e55eb56c0e9f42a7e491a699 +R ea525321199f0f66dd9876a7d0687939 U stephan -Z eee13aa4761e9cdaf3c2c73939710886 +Z 5ae1dc01157b80ae73825ec4ac34cc82 # Remove this line to create a well-formed Fossil manifest. diff --git a/manifest.uuid b/manifest.uuid index 3bf8bc9ec..634d3c9f7 100644 --- a/manifest.uuid +++ b/manifest.uuid @@ -1 +1 @@ -235ea2c0e1823fe4324c3890069a9131ebb6de14e55eb56c0e9f42a7e491a699 +f878f578f8fac95a939e3eabe8b64d5627d2ccd98de1e28081b9bca42ffee027 |