Index: gdb/testsuite/gdb.server/file-transfer.exp |
diff --git a/gdb/testsuite/gdb.server/file-transfer.exp b/gdb/testsuite/gdb.server/file-transfer.exp |
index 6b48b0236e084ab8f56075103227ef3bf4283146..c5455efc09505b795940e8dd4a74ab02c2f5fdb5 100644 |
--- a/gdb/testsuite/gdb.server/file-transfer.exp |
+++ b/gdb/testsuite/gdb.server/file-transfer.exp |
@@ -18,23 +18,19 @@ |
load_lib gdbserver-support.exp |
-set testfile "server" |
-set srcfile ${testfile}.c |
-set binfile ${objdir}/${subdir}/file-transfer${EXEEXT} |
+standard_testfile server.c |
if { [skip_gdbserver_tests] } { |
return 0 |
} |
-if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } { |
- untested file-transfer.exp |
+if {[prepare_for_testing $testfile.exp $testfile $srcfile debug]} { |
return -1 |
} |
-gdb_exit |
-gdb_start |
-gdb_load $binfile |
-gdb_reinitialize_dir $srcdir/$subdir |
+# Make sure we're disconnected, in case we're testing with an |
+# extended-remote board, therefore already connected. |
+gdb_test "disconnect" ".*" |
gdbserver_run "" |