185 |
} |
} |
186 |
|
|
187 |
# Pity, dejagnu provides no way to retrieve exit status of the process. |
# Pity, dejagnu provides no way to retrieve exit status of the process. |
188 |
# This ugli construction is used to work around this. Hopefully, it |
# This ugly construction is used to work around this. Hopefully, it |
189 |
# should execute on any decent platform... |
# should execute on any decent platform... |
190 |
set cmd "sh -c \"$MU_TOOL $sw\; echo \$?\"" |
set cmd "sh -c \"$MU_TOOL $sw\; echo \$?\"" |
191 |
verbose "Executing $cmd" |
verbose "Executing $cmd" |
301 |
return |
return |
302 |
} |
} |
303 |
|
|
|
if {![info exists MU_CAPABILITY]} { |
|
|
return |
|
|
} |
|
|
|
|
304 |
set output [remote_exec host "$MU_TOOL --show-config-options"] |
set output [remote_exec host "$MU_TOOL --show-config-options"] |
305 |
set flg [split [lindex $output 1]] |
set flg [split [lindex $output 1]] |
306 |
for {set i 0} {$i < [llength $flg]} {incr i} { |
for {set i 0} {$i < [llength $flg]} {incr i} { |
310 |
set MU_CAPABILITY([lindex $flg $i]) 1 |
set MU_CAPABILITY([lindex $flg $i]) 1 |
311 |
} |
} |
312 |
} |
} |
313 |
set MU_TOOL_VERSION $MU_CAPABILITY(VERSION) |
if [info exists MU_CAPABILITY(VERSION)] { |
314 |
|
set MU_TOOL_VERSION $MU_CAPABILITY(VERSION) |
315 |
|
} else { |
316 |
|
set MU_TOOL_VERSION "UNKNOWN" |
317 |
|
} |
318 |
} |
} |
319 |
|
|
320 |
proc mu_check_capability {args} { |
proc mu_check_capability {args} { |
321 |
global MU_CAPABILITY |
global MU_CAPABILITY |
322 |
|
|
323 |
set name [lindex $args 0] |
set name [lindex $args 0] |
324 |
if ![info exists MU_CAPABILITY($name)] { |
if {![info exists MU_CAPABILITY] || ![info exists MU_CAPABILITY($name)]} { |
325 |
return 0 |
return 0 |
326 |
} else { |
} else { |
327 |
return $MU_CAPABILITY($name) |
return $MU_CAPABILITY($name) |