diff options
author | stephan <stephan@noemail.net> | 2025-05-17 07:02:06 +0000 |
---|---|---|
committer | stephan <stephan@noemail.net> | 2025-05-17 07:02:06 +0000 |
commit | 1e24694b593ac2bcd792e81125cd32bee1580b45 (patch) | |
tree | 5a39422fac440bbccb499360051ab87230302fe7 /autoconf/tea/_teaish.tester.tcl.in | |
parent | 972a0f5e8d3486b39f6fbb86de65883ffe9dfe06 (diff) | |
download | sqlite-1e24694b593ac2bcd792e81125cd32bee1580b45.tar.gz sqlite-1e24694b593ac2bcd792e81125cd32bee1580b45.zip |
Latest upstream teaish pieces for minor fixes. Restructure this copy of teaish to simplify maintenance and the autoconf bundle build.
FossilOrigin-Name: 2b8d9b75ec5fe96cb5d06a3464fd4eb9a53018b7b548fedcd6cdbc46cdb55bdc
Diffstat (limited to 'autoconf/tea/_teaish.tester.tcl.in')
-rw-r--r-- | autoconf/tea/_teaish.tester.tcl.in | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/autoconf/tea/_teaish.tester.tcl.in b/autoconf/tea/_teaish.tester.tcl.in new file mode 100644 index 000000000..59d11f0a8 --- /dev/null +++ b/autoconf/tea/_teaish.tester.tcl.in @@ -0,0 +1,49 @@ +# -*- tcl -*- +# +# Unless this file is named _teaish.tester.tcl.in, you are probably +# looking at an automatically generated/filtered copy and should +# probably not edit it. +# +# This is the wrapper script invoked by teaish's "make test" recipe. +# It gets passed 3 args: +# +# $1 = the DLL name, or "" if the extension has no DLL +# +# $2 = the "load prefix" for Tcl's [load] or empty if $1 is empty +# +# $3 = the /path/to/teaish/tester.tcl (test utility code) +# +@if TEAISH_VSATISFIES_CODE +@TEAISH_VSATISFIES_CODE@ +@endif +if {[llength [lindex $::argv 0]] > 0} { + load [file normalize [lindex $::argv 0]] [lindex $::argv 1]; + # ----^^^^^^^ needed on Haiku when argv 0 is just a filename, else + # load cannot find the file. +} +source -encoding utf-8 [lindex $::argv 2]; # teaish/tester.tcl +@if TEAISH_PKGINIT_TCL +apply {{file} { + set dir [file dirname $::argv0] + source -encoding utf-8 $file +}} [join {@TEAISH_PKGINIT_TCL@}] +@endif +@if TEAISH_TM_TCL +apply {{file} { + set dir [file dirname $::argv0] + source -encoding utf-8 $file +}} [join {@TEAISH_TM_TCL@}] +@endif +@if TEAISH_TEST_TCL +apply {{file} { + # Populate state for [tester.tcl::teaish-build-flag*] + array set ::teaish__BuildFlags @TEAISH__DEFINES_MAP@ + set dir [file normalize [file dirname $file]] + #test-fail "Just testing" + 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 +# loads the extension. +puts {Extension @TEAISH_NAME@ @TEAISH_VERSION@ successfully loaded from @TEAISH_TESTER_TCL@} +@endif |