+2013-02-16 Rob Savoye <rob@build.welcomehome.org>
+
+ * config/adb.exp: Add adb_file so we can remotely delete test
+ cases to save on limited disk space. Don't remove the file after
+ executing it, leave that for the test driver instead.
+
2013-02-15 Rob Savoye <rob@welcomehome.org>
* config/adb.exp: Remove the test case after executing
# along with DejaGnu; if not, write to the Free Software Foundation,
# Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-# If true, all testcases onthe host target are deleted after being executed
-# to save disk space.
-set remove_test true
-
#
# Get serial number in case of multiple devices
#
}
}
+proc adb_file {dest op args} {
+ set file [lindex $args 0]
+ verbose "Executing command: $op $args" 2
+ switch $op {
+ exists {
+ set status [catch "exec adb [adb_serial] shell ls |& cat" out]
+ }
+ delete {
+ set status [catch "exec adb [adb_serial] shell rm $file |& cat" rmout]
+ }
+ }
+ return [eval remote_raw_file \"$dest\" \"$op\" $args]
+}
+
proc adb_upload {desthost srcfile destfile} {
set status [catch "exec adb [adb_serial] pull $srcfile $destfile" output]
if { $status == 0 } {
set status [catch "exec cat $inp | adb [adb_serial] shell \( $cmd $pargs \) \\; echo XYZ\\\$\\\{\?\\\}ZYX |& cat" output]
- if { $remove_test == true} {
- verbose "Removing test executable: $cmd" 2
- set status [catch "exec adb [adb_serial] shell rm $cmd |& cat" rmout]
- }
-
# `status' doesn't mean much here other than adb worked ok.
# What we want is whether $cmd ran ok.
if { $status != 0 } {