diff options
Diffstat (limited to 'gdb/testsuite/gdb.cp/templates.exp')
-rw-r--r-- | gdb/testsuite/gdb.cp/templates.exp | 23 |
1 files changed, 3 insertions, 20 deletions
diff --git a/gdb/testsuite/gdb.cp/templates.exp b/gdb/testsuite/gdb.cp/templates.exp index 1eb82eba2b4..47915b18167 100644 --- a/gdb/testsuite/gdb.cp/templates.exp +++ b/gdb/testsuite/gdb.cp/templates.exp @@ -20,9 +20,7 @@ set ws "\[\r\n\t \]+" if { [skip_cplus_tests] } { continue } -set testfile "templates" -set srcfile ${testfile}.cc -set binfile ${objdir}/${subdir}/${testfile} +standard_testfile .cc # Create and source the file that provides information about the compiler # used to compile the test case. @@ -30,9 +28,8 @@ if [get_compiler_info "c++"] { return -1 } -if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug c++}] != "" } { - untested templates.exp - return -1 +if {[prepare_for_testing $testfile.exp $testfile $srcfile {debug c++}]} { + return -1 } # @@ -237,20 +234,6 @@ proc test_template_args {} { } proc do_tests {} { - global subdir - global objdir - global srcdir - global binfile - global gdb_prompt - - - # Start with a fresh gdb. - - gdb_exit - gdb_start - gdb_reinitialize_dir $srcdir/$subdir - gdb_load $binfile - # Change multiple-symbols to "ask" in order to get the multiple-choice # menu when breaking on overloaded methods. gdb_test_no_output "set multiple-symbols ask" |