aboutsummaryrefslogtreecommitdiff
path: root/gdb/testsuite/gdb.server
diff options
context:
space:
mode:
authorTom Tromey <tromey@redhat.com>2012-06-25 19:46:26 +0000
committerTom Tromey <tromey@redhat.com>2012-06-25 19:46:26 +0000
commitb0963d73503e461769479e7fa2e106d27fe77c05 (patch)
tree15587285bff593e567c232b09e1a6c54ed91e5ae /gdb/testsuite/gdb.server
parent8a3e1f8d521c1ba7f4aa0449138f55106273afc2 (diff)
downloadgdb-b0963d73503e461769479e7fa2e106d27fe77c05.zip
gdb-b0963d73503e461769479e7fa2e106d27fe77c05.tar.gz
gdb-b0963d73503e461769479e7fa2e106d27fe77c05.tar.bz2
* gdb.server/ext-attach.exp: Use standard_testfile,
prepare_for_testing. * gdb.server/ext-run.exp: Use standard_testfile, build_executable. * gdb.server/file-transfer.exp: Use standard_testfile, prepare_for_testing. * gdb.server/server-exec-info.exp: Use standard_testfile. * gdb.server/server-mon.exp: Use standard_testfile, prepare_for_testing. * gdb.server/server-run.exp: Use standard_testfile, build_executable. * gdb.server/solib-list.exp: Use standard_testfile, standard_output_file.
Diffstat (limited to 'gdb/testsuite/gdb.server')
-rw-r--r--gdb/testsuite/gdb.server/ext-attach.exp12
-rw-r--r--gdb/testsuite/gdb.server/ext-run.exp6
-rw-r--r--gdb/testsuite/gdb.server/file-transfer.exp12
-rw-r--r--gdb/testsuite/gdb.server/server-exec-info.exp4
-rw-r--r--gdb/testsuite/gdb.server/server-mon.exp11
-rw-r--r--gdb/testsuite/gdb.server/server-run.exp6
-rw-r--r--gdb/testsuite/gdb.server/solib-list.exp8
7 files changed, 14 insertions, 45 deletions
diff --git a/gdb/testsuite/gdb.server/ext-attach.exp b/gdb/testsuite/gdb.server/ext-attach.exp
index 8cfcaaf..c5aec84 100644
--- a/gdb/testsuite/gdb.server/ext-attach.exp
+++ b/gdb/testsuite/gdb.server/ext-attach.exp
@@ -19,9 +19,7 @@
load_lib gdbserver-support.exp
-set testfile "ext-attach"
-set srcfile ${testfile}.c
-set binfile ${objdir}/${subdir}/${testfile}
+standard_testfile
if { [skip_gdbserver_tests] } {
return 0
@@ -32,16 +30,10 @@ if [is_remote target] then {
return 0
}
-if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
- untested ext-attach.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" ".*"
diff --git a/gdb/testsuite/gdb.server/ext-run.exp b/gdb/testsuite/gdb.server/ext-run.exp
index 53938ca..f397cd9 100644
--- a/gdb/testsuite/gdb.server/ext-run.exp
+++ b/gdb/testsuite/gdb.server/ext-run.exp
@@ -19,15 +19,13 @@
load_lib gdbserver-support.exp
-set testfile "server"
-set srcfile ${testfile}.c
-set binfile ${objdir}/${subdir}/ext-run
+standard_testfile server.c
if { [skip_gdbserver_tests] } {
return 0
}
-if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
+if {[build_executable $testfile.exp $testfile $srcfile debug] == -1} {
return -1
}
diff --git a/gdb/testsuite/gdb.server/file-transfer.exp b/gdb/testsuite/gdb.server/file-transfer.exp
index 12e8f26..c5455ef 100644
--- a/gdb/testsuite/gdb.server/file-transfer.exp
+++ b/gdb/testsuite/gdb.server/file-transfer.exp
@@ -18,24 +18,16 @@
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" ".*"
diff --git a/gdb/testsuite/gdb.server/server-exec-info.exp b/gdb/testsuite/gdb.server/server-exec-info.exp
index 3d773af..00775f1 100644
--- a/gdb/testsuite/gdb.server/server-exec-info.exp
+++ b/gdb/testsuite/gdb.server/server-exec-info.exp
@@ -15,9 +15,7 @@
load_lib gdbserver-support.exp
-set testfile "no-execfile-info"
-set srcfile "server.c"
-#if { [build_executable ${testfile}.exp ${testfile} ${srcfile}] == -1} {
+standard_testfile server.c
if [prepare_for_testing ${testfile}.exp ${testfile} ${srcfile}] {
return -1
}
diff --git a/gdb/testsuite/gdb.server/server-mon.exp b/gdb/testsuite/gdb.server/server-mon.exp
index ca9ee3e..f47fe15 100644
--- a/gdb/testsuite/gdb.server/server-mon.exp
+++ b/gdb/testsuite/gdb.server/server-mon.exp
@@ -19,23 +19,16 @@
load_lib gdbserver-support.exp
-set testfile "server"
-set srcfile ${testfile}.c
-set binfile ${objdir}/${subdir}/server-mon
+standard_testfile server.c
if { [skip_gdbserver_tests] } {
return 0
}
-if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
+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" ".*"
diff --git a/gdb/testsuite/gdb.server/server-run.exp b/gdb/testsuite/gdb.server/server-run.exp
index 88031e7..da357b4 100644
--- a/gdb/testsuite/gdb.server/server-run.exp
+++ b/gdb/testsuite/gdb.server/server-run.exp
@@ -19,15 +19,13 @@
load_lib gdbserver-support.exp
-set testfile "server"
-set srcfile ${testfile}.c
-set binfile ${objdir}/${subdir}/server-run
+standard_testfile server.c
if { [skip_gdbserver_tests] } {
return 0
}
-if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
+if {[build_executable $testfile.exp $testfile $srcfile debug] == -1} {
return -1
}
diff --git a/gdb/testsuite/gdb.server/solib-list.exp b/gdb/testsuite/gdb.server/solib-list.exp
index ee68382..fc54006 100644
--- a/gdb/testsuite/gdb.server/solib-list.exp
+++ b/gdb/testsuite/gdb.server/solib-list.exp
@@ -27,13 +27,11 @@ if {[skip_gdbserver_tests] || [skip_shlib_tests]} {
return
}
-set testfile "solib-list"
+standard_testfile solib-list-main.c
set srclibfile ${testfile}-lib.c
-set srcfile ${testfile}-main.c
-set binlibfile ${objdir}/${subdir}/${testfile}.so
+set binlibfile [standard_output_file ${testfile}.so]
set executable ${testfile}
-set objfile ${objdir}/${subdir}/${executable}.o
-set binfile ${objdir}/${subdir}/${executable}
+set objfile ${binfile}.o
if { [get_compiler_info]
|| [gdb_compile_shlib "${srcdir}/${subdir}/${srclibfile}" "${binlibfile}" [list debug ldflags=-Wl,-soname,${binlibfile}]] != ""