aboutsummaryrefslogtreecommitdiff
path: root/test/testrunner_data.tcl
diff options
context:
space:
mode:
authorstephan <stephan@noemail.net>2025-02-26 19:22:52 +0000
committerstephan <stephan@noemail.net>2025-02-26 19:22:52 +0000
commite1e822ca23cef4e55ae12674ac48a25f51785a8c (patch)
tree285a6eec0151085e8acc4d7c05ddf26391336bbd /test/testrunner_data.tcl
parent94c42564f370b597b0665e8b89a738cf58a6aa4f (diff)
downloadsqlite-e1e822ca23cef4e55ae12674ac48a25f51785a8c.tar.gz
sqlite-e1e822ca23cef4e55ae12674ac48a25f51785a8c.zip
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
Diffstat (limited to 'test/testrunner_data.tcl')
-rw-r--r--test/testrunner_data.tcl14
1 files changed, 13 insertions, 1 deletions
diff --git a/test/testrunner_data.tcl b/test/testrunner_data.tcl
index 4685dabf5..5247f5bfb 100644
--- a/test/testrunner_data.tcl
+++ b/test/testrunner_data.tcl
@@ -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"
+}