1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-07-29 08:01:23 +03:00

Teach testrunner how to run local binaries which have a .exe extension. Also teach it to recognized mingw environments (but actually building the test programs there currently doesn't work).

FossilOrigin-Name: e2bd23f251359e7a818c4cfacf114aa9fd8c0a9a1cb802654e96fad67b505508
This commit is contained in:
stephan
2025-02-26 19:22:52 +00:00
parent 94c42564f3
commit e1e822ca23
4 changed files with 24 additions and 12 deletions

View File

@ -30,8 +30,8 @@ proc find_interpreter {} {
&& [file executable ./testfixture]
} {
puts "Failed to find tcl package sqlite3. Restarting with ./testfixture.."
set status [catch {
exec ./testfixture [info script] {*}$::argv >@ stdout
set status [catch {
exec [trd_get_bin_name testfixture] [info script] {*}$::argv >@ stdout
} msg]
exit $status
}
@ -237,7 +237,7 @@ switch -nocase -glob -- $tcl_platform(os) {
set TRG(run) run.sh
set TRG(runcmd) "bash run.sh"
}
*linux* - MSYS_NT* {
*linux* - MSYS_NT* - MINGW64_NT* - MINGW32_NT* {
set TRG(platform) linux
set TRG(make) make.sh
set TRG(makecmd) "bash make.sh"

View File

@ -459,7 +459,7 @@ proc trd_fuzztest_data {} {
return [list fuzzcheck.exe $lFuzzDb]
}
return [list fuzzcheck $lFuzzDb {sessionfuzz run} $lSessionDb]
return [list [trd_get_bin_name fuzzcheck] $lFuzzDb {sessionfuzz run} $lSessionDb]
}
@ -688,3 +688,15 @@ proc trd_test_script_properties {path} {
set trd_test_script_properties_cache($path)
}
# Usage:
#
# trd_get_bin_name executable-file-name
#
# If file $bin exists, return $bin. Else if ${bin}.exe
# exists, return that. Else error out.
proc trd_get_bin_name {bin} {
if {[file exists $bin]} {return $bin}
if {[file exists $bin.exe]} {return $bin.exe}
error "Cannot find binary named $bin"
}