aboutsummaryrefslogtreecommitdiff
path: root/gdb/testsuite/gdb.base/scope.exp
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/testsuite/gdb.base/scope.exp')
-rw-r--r--gdb/testsuite/gdb.base/scope.exp27
1 files changed, 4 insertions, 23 deletions
diff --git a/gdb/testsuite/gdb.base/scope.exp b/gdb/testsuite/gdb.base/scope.exp
index fbcc31b..e781cf0 100644
--- a/gdb/testsuite/gdb.base/scope.exp
+++ b/gdb/testsuite/gdb.base/scope.exp
@@ -16,23 +16,11 @@
# This file was written by Fred Fish. (fnf@cygnus.com)
-set testfile "scope"
-set binfile ${objdir}/${subdir}/${testfile}
+standard_testfile scope0.c scope1.c
-
-if { [gdb_compile "${srcdir}/${subdir}/scope0.c" "${binfile}0.o" object {debug}] != "" } {
- untested scope.exp
- return -1
-}
-
-if { [gdb_compile "${srcdir}/${subdir}/scope1.c" "${binfile}1.o" object {debug}] != "" } {
- untested scope.exp
- return -1
-}
-
-if { [gdb_compile "${binfile}0.o ${binfile}1.o" ${binfile} executable {debug}] != "" } {
- untested scope.exp
- return -1
+if {[prepare_for_testing ${testfile}.exp ${testfile} \
+ [list $srcfile $srcfile2] {debug}]} {
+ return -1
}
# Create and source the file that provides information about the compiler
@@ -511,13 +499,6 @@ proc test_at_localscopes {} {
gdb_stop_suppressing_tests
}
-# Start with a fresh gdb.
-
-gdb_exit
-gdb_start
-gdb_reinitialize_dir $srcdir/$subdir
-gdb_load ${binfile}
-
if [istarget "*-*-vxworks*"] {
set timeout 120
verbose "Timeout is now $timeout seconds" 2