Skip to content

Commit e3225c6

Browse files
committed
Reimplement testrunner_data.tcl::trd_get_bin_name() to assume a .exe extension on all platforms not matching "unix", to avoid having to do file-exists checks.
1 parent 385242e commit e3225c6

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

test/testrunner_data.tcl

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -693,12 +693,10 @@ proc trd_test_script_properties {path} {
693693
#
694694
# trd_get_bin_name executable-file-name
695695
#
696-
# If file $bin exists, return $bin. Else if ${bin}.exe
697-
# exists, return that. Else error out.
696+
# If the tcl platform is "unix", return $bin, else return
697+
# ${bin}.exe.
698698
proc trd_get_bin_name {bin} {
699699
global tcl_platform
700-
if {[file exists $bin]} {return $bin}
701-
if {[file exists $bin.exe]} {return $bin.exe}
702-
if {$tcl_platform(platform)=="Windows"} {return $bin.exe}
703-
return $bin
700+
if {"unix" eq $tcl_platform(platform)} {return $bin}
701+
return $bin.exe
704702
}

0 commit comments

Comments
 (0)