2015-01-08 21:08:48 +00:00
|
|
|
##
|
|
|
|
# Get output of the target machine via Intel AMT's SoL feature
|
|
|
|
#
|
2015-09-08 06:31:37 +00:00
|
|
|
# \param --amt-host network address of target machine
|
2015-01-08 21:08:48 +00:00
|
|
|
# \param --amt-password AMT password for target machine
|
|
|
|
#
|
|
|
|
|
|
|
|
source [genode_dir]/tool/run/log.inc
|
|
|
|
source [genode_dir]/tool/run/amt.inc
|
|
|
|
|
|
|
|
|
|
|
|
proc log_amt_host { } {
|
|
|
|
return [get_cmd_arg_first --log-amt-host ""]
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
proc log_amt_password { } {
|
|
|
|
return [get_cmd_arg_first --log-amt-password ""]
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
##
|
|
|
|
# Log output of the test machine using Intel's AMT
|
|
|
|
#
|
|
|
|
proc run_log { wait_for_re timeout_value } {
|
|
|
|
global output_spawn_id
|
|
|
|
|
|
|
|
if {![is_amt_available [log_amt_host] [log_amt_password]]} {
|
|
|
|
set exit_result 1
|
|
|
|
return false
|
|
|
|
}
|
|
|
|
|
|
|
|
#
|
|
|
|
# grab output
|
|
|
|
#
|
|
|
|
set amtterm "amtterm -u admin -p [log_amt_password] -v [log_amt_host]"
|
|
|
|
if {$wait_for_re == "forever"} {
|
|
|
|
set timeout -1
|
|
|
|
} else {
|
|
|
|
set timeout [expr $timeout_value + 30]
|
|
|
|
}
|
|
|
|
set exit_result 1
|
|
|
|
|
2015-10-26 14:02:14 +00:00
|
|
|
eval spawn $amtterm
|
|
|
|
set output_spawn_id $spawn_id
|
|
|
|
|
|
|
|
set kernel_msg [run_boot_string]
|
|
|
|
|
|
|
|
expect {
|
|
|
|
-i $output_spawn_id $kernel_msg { }
|
|
|
|
eof {
|
|
|
|
puts stderr "Aborting, received EOF"
|
|
|
|
return false
|
2015-01-08 21:08:48 +00:00
|
|
|
}
|
2015-10-26 14:02:14 +00:00
|
|
|
timeout {
|
|
|
|
puts stderr "Boot process timed out"
|
|
|
|
close
|
|
|
|
return false
|
2015-01-08 21:08:48 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2015-10-26 14:02:14 +00:00
|
|
|
wait_for_output $wait_for_re $timeout_value $output_spawn_id
|
2015-01-08 21:08:48 +00:00
|
|
|
return true
|
|
|
|
}
|