From e1e822ca23cef4e55ae12674ac48a25f51785a8c Mon Sep 17 00:00:00 2001 From: stephan Date: Wed, 26 Feb 2025 19:22:52 +0000 Subject: 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 --- test/testrunner_data.tcl | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'test/testrunner_data.tcl') 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" +} -- cgit v1.2.3