Tk Library Source Code

View Ticket
Login
Ticket UUID: 1091764
Title: runbench.tcl does not run on windows w/ msys
Type: Bug Version: None
Submitter: pointsman Created on: 2004-12-27 16:55:02
Subsystem: tclbench Assigned To: hobbs
Priority: 5 Medium Severity:
Status: Closed Last Modified: 2004-12-28 02:34:49
Resolution: Fixed Closed By: hobbs
    Closed on: 2004-12-27 19:34:49
Description:
runbench.tcl exec 'echo' in proc getInterps:

if {[catch {exec echo "puts \[info patchlevel\] ;
exit" | \
$interp} patchlevel]} {...}

This does not work with msys, because it doesn't come
with an echo binary (but only an echo written in terms
of a shell script, which obviously isn't recognized as
executable in an exec call). runbench.tcl seems to
expect a cygwin environment (which has an echo.exe).

Though, since both cygwin and msys (and any unix
anyway) have a sh, I propose to change that code in
getInterps to:

if {[catch {exec sh -c "echo puts \[info patchlevel\]
; exit" | \
$interp} patchlevel]} {...}

With only this change, runbench.tcl runs under msys or
a windows console with the msys binariers in the PATH.
User Comments: hobbs added on 2004-12-28 02:34:49:
Logged In: YES 
user_id=72656

Actually the easiest would be to make use of Tcl's nice <<
feature in exec.  Changed to use that.