aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMaxim Kuvyrkov <maxim.kuvyrkov@linaro.org>2016-06-28 09:40:01 +0100
committerMaxim Kuvyrkov <maxim.kuvyrkov@linaro.org>2016-06-28 09:45:04 +0100
commitf6177d0b6cd935da0fbf687cb56f169aa899f863 (patch)
tree58c0f3bbc24aadf062d4e9643e07629131e77b31
parentfc34dc389b560a83819b3e7e12960a3481c0e8cd (diff)
Support using QEMU in local/remote testing using default "unix" boardlinaro-local/maxim-exec_shell
If the board file defines "exec_shell", prepend it before the local or remote command. Change-Id: Ib3ff96126c4c96e4e7f8898609d0fce6faf803ef
-rw-r--r--config/unix.exp15
1 files changed, 14 insertions, 1 deletions
diff --git a/config/unix.exp b/config/unix.exp
index 6a0ff72..190c122 100644
--- a/config/unix.exp
+++ b/config/unix.exp
@@ -79,6 +79,11 @@ proc unix_load { dest prog args } {
verbose -log "Setting LD_LIBRARY_PATH to $ld_library_path:$orig_ld_library_path" 2
verbose -log "Execution timeout is: $test_timeout" 2
+ # Prepend shell name (e.g., qemu emulator) to the command.
+ if {[board_info $dest exists exec_shell]} {
+ set command "[board_info $dest exec_shell] $command"
+ }
+
set id [remote_spawn $dest "$command" "readonly"]
if { $id < 0 } {
set output "remote_spawn failed"
@@ -120,7 +125,15 @@ proc unix_load { dest prog args } {
return [list "unresolved" ""]
}
}
- set status [remote_exec $dest "$remotefile" $parg $inp]
+
+ # Prepend shell name (e.g., qemu emulator) to the command.
+ if {[board_info $dest exists exec_shell]} {
+ set remotecmd "[board_info $dest exec_shell] $remotefile"
+ } else {
+ set remotecmd "$remotefile"
+ }
+
+ set status [remote_exec $dest "$remotecmd" $parg $inp]
remote_file $dest delete $remotefile.o $remotefile
if { [lindex $status 0] < 0 } {
verbose -log "Couldn't execute $prog, [lindex $status 1]" 3