From: Tom Tromey Date: Tue, 10 Jul 2012 15:32:52 +0000 (+0000) Subject: * gdb.mi/dw2-ref-missing-frame.exp: Use standard_testfile, X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=298a9cf0efcb7be466df40d6c31c0b4135cf0ac7;p=binutils-gdb.git * gdb.mi/dw2-ref-missing-frame.exp: Use standard_testfile, standard_output_file. * gdb.mi/gdb2549.exp: Use standard_testfile. * gdb.mi/gdb669.exp: Use standard_testfile. * gdb.mi/gdb701.exp: Use standard_testfile. * gdb.mi/gdb792.exp: Use standard_testfile. * gdb.mi/mi-async.exp: Use standard_testfile. * gdb.mi/mi-basics.exp: Use standard_testfile. * gdb.mi/mi-break.exp: Use standard_testfile. * gdb.mi/mi-cli.exp: Use standard_testfile. * gdb.mi/mi-console.exp: Use standard_testfile. * gdb.mi/mi-disassemble.exp: Use standard_testfile. * gdb.mi/mi-eval.exp: Use standard_testfile. * gdb.mi/mi-file-transfer.exp: Use standard_testfile. * gdb.mi/mi-file.exp: Use standard_testfile. * gdb.mi/mi-inheritance-syntax-error.exp: Use standard_testfile. * gdb.mi/mi-logging.exp: Use standard_testfile. * gdb.mi/mi-nonstop-exit.exp: Use standard_testfile. * gdb.mi/mi-nonstop.exp: Use standard_testfile. * gdb.mi/mi-ns-stale-regcache.exp: Use standard_testfile. * gdb.mi/mi-nsintrall.exp: Use standard_testfile. * gdb.mi/mi-nsmoribund.exp: Use standard_testfile. * gdb.mi/mi-nsthrexec.exp: Use standard_testfile. * gdb.mi/mi-pending.exp: Use standard_testfile, standard_output_file. * gdb.mi/mi-pthreads.exp: Use standard_testfile. * gdb.mi/mi-read-memory.exp: Use standard_testfile. * gdb.mi/mi-regs.exp: Use standard_testfile. * gdb.mi/mi-return.exp: Use standard_testfile. * gdb.mi/mi-reverse.exp: Use standard_testfile. * gdb.mi/mi-simplerun.exp: Use standard_testfile. * gdb.mi/mi-solib.exp: Use standard_testfile, standard_output_file. * gdb.mi/mi-stack.exp: Use standard_testfile. * gdb.mi/mi-stepi.exp: Use standard_testfile. * gdb.mi/mi-stepn.exp: Use standard_testfile. * gdb.mi/mi-syn-frame.exp: Use standard_testfile. * gdb.mi/mi-until.exp: Use standard_testfile. * gdb.mi/mi-var-block.exp: Use standard_testfile. * gdb.mi/mi-var-child-f.exp: Use standard_testfile. * gdb.mi/mi-var-child.exp: Use standard_testfile. * gdb.mi/mi-var-cmd.exp: Use standard_testfile. * gdb.mi/mi-var-cp.exp: Use standard_testfile. * gdb.mi/mi-var-display.exp: Use standard_testfile. * gdb.mi/mi-var-invalidate.exp: Use standard_testfile, standard_output_file. * gdb.mi/mi-var-rtti.exp: Use standard_testfile. * gdb.mi/mi-watch-nonstop.exp: Use standard_testfile. * gdb.mi/mi-watch.exp: Use standard_testfile. * gdb.mi/mi2-amd64-entry-value.exp: Use standard_testfile. * gdb.mi/mi2-basics.exp: Use standard_testfile. * gdb.mi/mi2-break.exp: Use standard_testfile. * gdb.mi/mi2-cli.exp: Use standard_testfile. * gdb.mi/mi2-console.exp: Use standard_testfile. * gdb.mi/mi2-disassemble.exp: Use standard_testfile. * gdb.mi/mi2-eval.exp: Use standard_testfile. * gdb.mi/mi2-file.exp: Use standard_testfile. * gdb.mi/mi2-pthreads.exp: Use standard_testfile. * gdb.mi/mi2-read-memory.exp: Use standard_testfile. * gdb.mi/mi2-regs.exp: Use standard_testfile. * gdb.mi/mi2-return.exp: Use standard_testfile. * gdb.mi/mi2-simplerun.exp: Use standard_testfile. * gdb.mi/mi2-stack.exp: Use standard_testfile. * gdb.mi/mi2-stepi.exp: Use standard_testfile. * gdb.mi/mi2-syn-frame.exp: Use standard_testfile. * gdb.mi/mi2-until.exp: Use standard_testfile. * gdb.mi/mi2-var-block.exp: Use standard_testfile. * gdb.mi/mi2-var-child.exp: Use standard_testfile. * gdb.mi/mi2-var-cmd.exp: Use standard_testfile. * gdb.mi/mi2-var-display.exp: Use standard_testfile. * gdb.mi/mi2-watch.exp: Use standard_testfile. --- diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index e3fae5e2bfb..8b933e9af27 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,3 +1,77 @@ +2012-07-10 Tom Tromey + + * gdb.mi/dw2-ref-missing-frame.exp: Use standard_testfile, + standard_output_file. + * gdb.mi/gdb2549.exp: Use standard_testfile. + * gdb.mi/gdb669.exp: Use standard_testfile. + * gdb.mi/gdb701.exp: Use standard_testfile. + * gdb.mi/gdb792.exp: Use standard_testfile. + * gdb.mi/mi-async.exp: Use standard_testfile. + * gdb.mi/mi-basics.exp: Use standard_testfile. + * gdb.mi/mi-break.exp: Use standard_testfile. + * gdb.mi/mi-cli.exp: Use standard_testfile. + * gdb.mi/mi-console.exp: Use standard_testfile. + * gdb.mi/mi-disassemble.exp: Use standard_testfile. + * gdb.mi/mi-eval.exp: Use standard_testfile. + * gdb.mi/mi-file-transfer.exp: Use standard_testfile. + * gdb.mi/mi-file.exp: Use standard_testfile. + * gdb.mi/mi-inheritance-syntax-error.exp: Use standard_testfile. + * gdb.mi/mi-logging.exp: Use standard_testfile. + * gdb.mi/mi-nonstop-exit.exp: Use standard_testfile. + * gdb.mi/mi-nonstop.exp: Use standard_testfile. + * gdb.mi/mi-ns-stale-regcache.exp: Use standard_testfile. + * gdb.mi/mi-nsintrall.exp: Use standard_testfile. + * gdb.mi/mi-nsmoribund.exp: Use standard_testfile. + * gdb.mi/mi-nsthrexec.exp: Use standard_testfile. + * gdb.mi/mi-pending.exp: Use standard_testfile, + standard_output_file. + * gdb.mi/mi-pthreads.exp: Use standard_testfile. + * gdb.mi/mi-read-memory.exp: Use standard_testfile. + * gdb.mi/mi-regs.exp: Use standard_testfile. + * gdb.mi/mi-return.exp: Use standard_testfile. + * gdb.mi/mi-reverse.exp: Use standard_testfile. + * gdb.mi/mi-simplerun.exp: Use standard_testfile. + * gdb.mi/mi-solib.exp: Use standard_testfile, + standard_output_file. + * gdb.mi/mi-stack.exp: Use standard_testfile. + * gdb.mi/mi-stepi.exp: Use standard_testfile. + * gdb.mi/mi-stepn.exp: Use standard_testfile. + * gdb.mi/mi-syn-frame.exp: Use standard_testfile. + * gdb.mi/mi-until.exp: Use standard_testfile. + * gdb.mi/mi-var-block.exp: Use standard_testfile. + * gdb.mi/mi-var-child-f.exp: Use standard_testfile. + * gdb.mi/mi-var-child.exp: Use standard_testfile. + * gdb.mi/mi-var-cmd.exp: Use standard_testfile. + * gdb.mi/mi-var-cp.exp: Use standard_testfile. + * gdb.mi/mi-var-display.exp: Use standard_testfile. + * gdb.mi/mi-var-invalidate.exp: Use standard_testfile, + standard_output_file. + * gdb.mi/mi-var-rtti.exp: Use standard_testfile. + * gdb.mi/mi-watch-nonstop.exp: Use standard_testfile. + * gdb.mi/mi-watch.exp: Use standard_testfile. + * gdb.mi/mi2-amd64-entry-value.exp: Use standard_testfile. + * gdb.mi/mi2-basics.exp: Use standard_testfile. + * gdb.mi/mi2-break.exp: Use standard_testfile. + * gdb.mi/mi2-cli.exp: Use standard_testfile. + * gdb.mi/mi2-console.exp: Use standard_testfile. + * gdb.mi/mi2-disassemble.exp: Use standard_testfile. + * gdb.mi/mi2-eval.exp: Use standard_testfile. + * gdb.mi/mi2-file.exp: Use standard_testfile. + * gdb.mi/mi2-pthreads.exp: Use standard_testfile. + * gdb.mi/mi2-read-memory.exp: Use standard_testfile. + * gdb.mi/mi2-regs.exp: Use standard_testfile. + * gdb.mi/mi2-return.exp: Use standard_testfile. + * gdb.mi/mi2-simplerun.exp: Use standard_testfile. + * gdb.mi/mi2-stack.exp: Use standard_testfile. + * gdb.mi/mi2-stepi.exp: Use standard_testfile. + * gdb.mi/mi2-syn-frame.exp: Use standard_testfile. + * gdb.mi/mi2-until.exp: Use standard_testfile. + * gdb.mi/mi2-var-block.exp: Use standard_testfile. + * gdb.mi/mi2-var-child.exp: Use standard_testfile. + * gdb.mi/mi2-var-cmd.exp: Use standard_testfile. + * gdb.mi/mi2-var-display.exp: Use standard_testfile. + * gdb.mi/mi2-watch.exp: Use standard_testfile. + 2012-07-10 Tom Tromey * gdb.cp/abstract-origin.exp: Use standard_testfile. diff --git a/gdb/testsuite/gdb.mi/dw2-ref-missing-frame.exp b/gdb/testsuite/gdb.mi/dw2-ref-missing-frame.exp index 662bded281f..187cd12f9ce 100644 --- a/gdb/testsuite/gdb.mi/dw2-ref-missing-frame.exp +++ b/gdb/testsuite/gdb.mi/dw2-ref-missing-frame.exp @@ -22,19 +22,14 @@ if {![dwarf2_support]} { return 0 } -set testfile "dw2-ref-missing-frame" -set srcsfile ${testfile}.S -set objsfile ${objdir}/${subdir}/${testfile}.o -set srcfuncfile ${testfile}-func.c -set objfuncfile ${objdir}/${subdir}/${testfile}-func.o -set srcmainfile ${testfile}-main.c -set objmainfile ${objdir}/${subdir}/${testfile}-main.o -set executable ${testfile} -set binfile ${objdir}/${subdir}/${executable} +standard_testfile .S dw2-ref-missing-frame-func.c dw2-ref-missing-frame-main.c +set objsfile [standard_output_file ${testfile}.o] +set objfuncfile [standard_output_file ${testfile}-func.o] +set objmainfile [standard_output_file ${testfile}-main.o] -if { [gdb_compile "${srcdir}/${subdir}/${srcsfile}" $objsfile object {}] != "" - || [gdb_compile "${srcdir}/${subdir}/${srcfuncfile}" $objfuncfile object {}] != "" - || [gdb_compile "${srcdir}/${subdir}/${srcmainfile}" $objmainfile object {debug}] != "" +if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" $objsfile object {}] != "" + || [gdb_compile "${srcdir}/${subdir}/${srcfile2}" $objfuncfile object {}] != "" + || [gdb_compile "${srcdir}/${subdir}/${srcfile3}" $objmainfile object {debug}] != "" || [gdb_compile "$objsfile $objfuncfile $objmainfile" $binfile executable {}] != "" } { return -1 } diff --git a/gdb/testsuite/gdb.mi/gdb2549.exp b/gdb/testsuite/gdb.mi/gdb2549.exp index bf536de9722..9af04dd85f3 100644 --- a/gdb/testsuite/gdb.mi/gdb2549.exp +++ b/gdb/testsuite/gdb.mi/gdb2549.exp @@ -30,9 +30,8 @@ if [mi_gdb_start] { continue } -set testfile "basics" -set srcfile ${testfile}.c -set binfile ${objdir}/${subdir}/${testfile} +standard_testfile basics.c + if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } { untested mi-regs.exp return -1 diff --git a/gdb/testsuite/gdb.mi/gdb669.exp b/gdb/testsuite/gdb.mi/gdb669.exp index 904f14d0e1f..2ca173cc094 100644 --- a/gdb/testsuite/gdb.mi/gdb669.exp +++ b/gdb/testsuite/gdb.mi/gdb669.exp @@ -28,11 +28,9 @@ if {[mi_gdb_start]} { # # Start here # -set testfile "pthreads" -set srcfile "$testfile.c" -set binfile "$objdir/$subdir/gdb669-$testfile" +standard_testfile pthreads.c -set options [list debug incdir=$objdir] +set options [list debug] if {[gdb_compile_pthreads "$srcdir/$subdir/$srcfile" $binfile executable $options] != "" } { return -1 } diff --git a/gdb/testsuite/gdb.mi/gdb701.exp b/gdb/testsuite/gdb.mi/gdb701.exp index cda54a80db7..8de7adcd9ea 100644 --- a/gdb/testsuite/gdb.mi/gdb701.exp +++ b/gdb/testsuite/gdb.mi/gdb701.exp @@ -25,9 +25,8 @@ if [mi_gdb_start] { continue } -set testfile gdb701 -set srcfile "$testfile.c" -set binfile $objdir/$subdir/$testfile +standard_testfile + if {[gdb_compile $srcdir/$subdir/$srcfile $binfile executable debug] != ""} { untested gdb701.exp return -1 diff --git a/gdb/testsuite/gdb.mi/gdb792.exp b/gdb/testsuite/gdb.mi/gdb792.exp index 25909df53d9..1cb7ae2f61d 100644 --- a/gdb/testsuite/gdb.mi/gdb792.exp +++ b/gdb/testsuite/gdb.mi/gdb792.exp @@ -27,9 +27,7 @@ if [mi_gdb_start] { continue } -set testfile gdb792 -set srcfile "$testfile.cc" -set binfile $objdir/$subdir/$testfile +standard_testfile .cc if [get_compiler_info "c++"] { return -1; diff --git a/gdb/testsuite/gdb.mi/mi-async.exp b/gdb/testsuite/gdb.mi/mi-async.exp index bab76738643..1d6b3777c15 100644 --- a/gdb/testsuite/gdb.mi/mi-async.exp +++ b/gdb/testsuite/gdb.mi/mi-async.exp @@ -36,9 +36,8 @@ if [mi_gdb_start] { continue } -set testfile "basics" -set srcfile ${testfile}.c -set binfile ${objdir}/${subdir}/mi-async +standard_testfile basics.c + if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } { untested mi-async.exp return -1 diff --git a/gdb/testsuite/gdb.mi/mi-basics.exp b/gdb/testsuite/gdb.mi/mi-basics.exp index 9ff27b469d2..564b835f06d 100644 --- a/gdb/testsuite/gdb.mi/mi-basics.exp +++ b/gdb/testsuite/gdb.mi/mi-basics.exp @@ -33,9 +33,7 @@ if [mi_gdb_start separate-inferior-tty] { continue } -set testfile "basics" -set srcfile ${testfile}.c -set binfile ${objdir}/${subdir}/mi-basics +standard_testfile basics.c set escapedobjdir [string_to_regexp ${objdir}] set envirodir [string_to_regexp ${objdir}/${subdir}] diff --git a/gdb/testsuite/gdb.mi/mi-break.exp b/gdb/testsuite/gdb.mi/mi-break.exp index debfe86e993..573f484c6c6 100644 --- a/gdb/testsuite/gdb.mi/mi-break.exp +++ b/gdb/testsuite/gdb.mi/mi-break.exp @@ -32,9 +32,8 @@ if [mi_gdb_start] { continue } -set testfile "basics" -set srcfile ${testfile}.c -set binfile ${objdir}/${subdir}/mi-break +standard_testfile basics.c + if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } { untested mi-break.exp return -1 diff --git a/gdb/testsuite/gdb.mi/mi-cli.exp b/gdb/testsuite/gdb.mi/mi-cli.exp index 598365b4a0a..b7abbc72390 100644 --- a/gdb/testsuite/gdb.mi/mi-cli.exp +++ b/gdb/testsuite/gdb.mi/mi-cli.exp @@ -27,9 +27,8 @@ if [mi_gdb_start] { continue } -set testfile "basics" -set srcfile ${testfile}.c -set binfile ${objdir}/${subdir}/mi-cli +standard_testfile basics.c + if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } { untested mi-cli.exp return -1 diff --git a/gdb/testsuite/gdb.mi/mi-console.exp b/gdb/testsuite/gdb.mi/mi-console.exp index 83deff5ceb9..891c7437e3d 100644 --- a/gdb/testsuite/gdb.mi/mi-console.exp +++ b/gdb/testsuite/gdb.mi/mi-console.exp @@ -36,9 +36,8 @@ if [mi_gdb_start separate-inferior-tty] { continue } -set testfile "mi-console" -set srcfile ${testfile}.c -set binfile ${objdir}/${subdir}/${testfile} +standard_testfile + if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } { untested mi-console.exp return -1 diff --git a/gdb/testsuite/gdb.mi/mi-disassemble.exp b/gdb/testsuite/gdb.mi/mi-disassemble.exp index 68038ae2916..377ffdeeb01 100644 --- a/gdb/testsuite/gdb.mi/mi-disassemble.exp +++ b/gdb/testsuite/gdb.mi/mi-disassemble.exp @@ -29,9 +29,8 @@ if [mi_gdb_start] { continue } -set testfile "basics" -set srcfile ${testfile}.c -set binfile ${objdir}/${subdir}/mi-disassemble +standard_testfile basics.c + if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } { untested mi-disassemble.exp return -1 diff --git a/gdb/testsuite/gdb.mi/mi-eval.exp b/gdb/testsuite/gdb.mi/mi-eval.exp index 29d26a2a4fa..ea20369dc20 100644 --- a/gdb/testsuite/gdb.mi/mi-eval.exp +++ b/gdb/testsuite/gdb.mi/mi-eval.exp @@ -30,9 +30,8 @@ if [mi_gdb_start] { continue } -set testfile "basics" -set srcfile ${testfile}.c -set binfile ${objdir}/${subdir}/mi-eval +standard_testfile basics.c + if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } { untested mi-eval.exp return -1 diff --git a/gdb/testsuite/gdb.mi/mi-file-transfer.exp b/gdb/testsuite/gdb.mi/mi-file-transfer.exp index 74b38e96ed2..a7a3e60a2ff 100644 --- a/gdb/testsuite/gdb.mi/mi-file-transfer.exp +++ b/gdb/testsuite/gdb.mi/mi-file-transfer.exp @@ -24,9 +24,8 @@ if { [skip_gdbserver_tests] } { return 0 } -set testfile "basics" -set srcfile ${testfile}.c -set binfile ${objdir}/${subdir}/mi-file-transfer +standard_testfile basics.c + if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } { untested mi-file-transfer.exp return -1 diff --git a/gdb/testsuite/gdb.mi/mi-file.exp b/gdb/testsuite/gdb.mi/mi-file.exp index 37331074aea..b0df2cde179 100644 --- a/gdb/testsuite/gdb.mi/mi-file.exp +++ b/gdb/testsuite/gdb.mi/mi-file.exp @@ -32,9 +32,8 @@ if [mi_gdb_start] { continue } -set testfile "basics" -set srcfile ${testfile}.c -set binfile ${objdir}/${subdir}/mi-file +standard_testfile basics.c + if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } { untested mi-file.exp return -1 diff --git a/gdb/testsuite/gdb.mi/mi-inheritance-syntax-error.exp b/gdb/testsuite/gdb.mi/mi-inheritance-syntax-error.exp index a705e2855fc..ba80f4f9601 100644 --- a/gdb/testsuite/gdb.mi/mi-inheritance-syntax-error.exp +++ b/gdb/testsuite/gdb.mi/mi-inheritance-syntax-error.exp @@ -23,9 +23,7 @@ if [mi_gdb_start] { continue } -set testfile mi-inheritance-syntax-error -set srcfile "$testfile.cc" -set binfile $objdir/$subdir/$testfile +standard_testfile .cc if [get_compiler_info "c++"] { return -1; diff --git a/gdb/testsuite/gdb.mi/mi-logging.exp b/gdb/testsuite/gdb.mi/mi-logging.exp index d62bfe6bc1f..2c533bd1a37 100644 --- a/gdb/testsuite/gdb.mi/mi-logging.exp +++ b/gdb/testsuite/gdb.mi/mi-logging.exp @@ -21,13 +21,10 @@ if [mi_gdb_start] { continue } -set testfile basics -set srcfile "$testfile.c" -set executable ${testfile} -set binfile $objdir/$subdir/$testfile +standard_testfile basics.c set opts {debug} -if [build_executable $testfile.exp $executable $srcfile $opts] { +if [build_executable $testfile.exp $testfile $srcfile $opts] { untested mi-logging.exp return -1; } diff --git a/gdb/testsuite/gdb.mi/mi-nonstop-exit.exp b/gdb/testsuite/gdb.mi/mi-nonstop-exit.exp index b6f572879f1..fe7654e84a8 100644 --- a/gdb/testsuite/gdb.mi/mi-nonstop-exit.exp +++ b/gdb/testsuite/gdb.mi/mi-nonstop-exit.exp @@ -29,11 +29,9 @@ if {[mi_gdb_start]} { # # Start here # -set testfile "non-stop-exit" -set srcfile "$testfile.c" -set binfile "$objdir/$subdir/mi-$testfile" +standard_testfile non-stop-exit.c -set options [list debug incdir=$objdir] +set options [list debug] if {[gdb_compile_pthreads "$srcdir/$subdir/$srcfile" $binfile executable $options] != "" } { return -1 } diff --git a/gdb/testsuite/gdb.mi/mi-nonstop.exp b/gdb/testsuite/gdb.mi/mi-nonstop.exp index 1c57643c738..f96799f41fd 100644 --- a/gdb/testsuite/gdb.mi/mi-nonstop.exp +++ b/gdb/testsuite/gdb.mi/mi-nonstop.exp @@ -39,11 +39,9 @@ proc mi_nonstop_resume { command test } { # # Start here # -set testfile "non-stop" -set srcfile "$testfile.c" -set binfile "$objdir/$subdir/mi-$testfile" +standard_testfile non-stop.c -set options [list debug incdir=$objdir] +set options [list debug] if {[gdb_compile_pthreads "$srcdir/$subdir/$srcfile" $binfile executable $options] != "" } { return -1 } diff --git a/gdb/testsuite/gdb.mi/mi-ns-stale-regcache.exp b/gdb/testsuite/gdb.mi/mi-ns-stale-regcache.exp index c5cf8cf9685..8cf5b6cf5c8 100644 --- a/gdb/testsuite/gdb.mi/mi-ns-stale-regcache.exp +++ b/gdb/testsuite/gdb.mi/mi-ns-stale-regcache.exp @@ -41,11 +41,9 @@ proc mi_nonstop_resume { command test } { # # Start here # -set testfile "ns-stale-regcache" -set srcfile "$testfile.c" -set binfile "$objdir/$subdir/mi-$testfile" +standard_testfile ns-stale-regcache.c -set options [list debug incdir=$objdir] +set options [list debug] if {[gdb_compile "$srcdir/$subdir/$srcfile" \ $binfile executable $options] != "" } { return -1 diff --git a/gdb/testsuite/gdb.mi/mi-nsintrall.exp b/gdb/testsuite/gdb.mi/mi-nsintrall.exp index ccdce5c38a4..1d4aba5dec5 100644 --- a/gdb/testsuite/gdb.mi/mi-nsintrall.exp +++ b/gdb/testsuite/gdb.mi/mi-nsintrall.exp @@ -29,11 +29,9 @@ if {[mi_gdb_start]} { # # Start here # -set testfile "nsintrall" -set srcfile "$testfile.c" -set binfile "$objdir/$subdir/mi-$testfile" +standard_testfile nsintrall.c -set options [list debug incdir=$objdir] +set options [list debug] if {[gdb_compile_pthreads "$srcdir/$subdir/$srcfile" $binfile executable $options] != "" } { return -1 } diff --git a/gdb/testsuite/gdb.mi/mi-nsmoribund.exp b/gdb/testsuite/gdb.mi/mi-nsmoribund.exp index 36e70d3738d..0c83bb9f4ac 100644 --- a/gdb/testsuite/gdb.mi/mi-nsmoribund.exp +++ b/gdb/testsuite/gdb.mi/mi-nsmoribund.exp @@ -29,11 +29,9 @@ if {[mi_gdb_start]} { # # Start here # -set testfile "nsmoribund" -set srcfile "$testfile.c" -set binfile "$objdir/$subdir/mi-$testfile" +standard_testfile nsmoribund.c -set options [list debug incdir=$objdir] +set options [list debug] if {[gdb_compile_pthreads "$srcdir/$subdir/$srcfile" $binfile executable $options] != "" } { return -1 } diff --git a/gdb/testsuite/gdb.mi/mi-nsthrexec.exp b/gdb/testsuite/gdb.mi/mi-nsthrexec.exp index 921fcf04a7e..28ca7fc0c3e 100644 --- a/gdb/testsuite/gdb.mi/mi-nsthrexec.exp +++ b/gdb/testsuite/gdb.mi/mi-nsthrexec.exp @@ -39,11 +39,9 @@ if {[mi_gdb_start]} { # # Start here # -set testfile "nsthrexec" -set srcfile "$testfile.c" -set binfile "$objdir/$subdir/mi-$testfile" +standard_testfile nsthrexec.c -set options [list debug incdir=$objdir] +set options [list debug] if {[gdb_compile_pthreads "$srcdir/$subdir/$srcfile" $binfile executable $options] != "" } { return -1 } diff --git a/gdb/testsuite/gdb.mi/mi-pending.exp b/gdb/testsuite/gdb.mi/mi-pending.exp index 8bfa4e56ff5..f39ab71d301 100644 --- a/gdb/testsuite/gdb.mi/mi-pending.exp +++ b/gdb/testsuite/gdb.mi/mi-pending.exp @@ -24,12 +24,8 @@ if {[skip_shlib_tests]} { return 0 } -set testfile "mi-pending" -set libfile "mi-pendshr" -set srcfile $testfile.c -set libsrc $srcdir/$subdir/$libfile.c -set binfile $objdir/$subdir/$testfile -set lib_sl $objdir/$subdir/$libfile.sl +standard_testfile mi-pending.c mi-pendshr.c +set lib_sl [standard_output_file mi-pendshr.sl] set lib_opts debug set exec_opts [list debug shlib=$lib_sl] @@ -38,7 +34,7 @@ if [get_compiler_info] { return -1 } -if { [gdb_compile_shlib $libsrc $lib_sl $lib_opts] != "" +if { [gdb_compile_shlib $srcdir/$subdir/$srcfile2 $lib_sl $lib_opts] != "" || [gdb_compile $srcdir/$subdir/$srcfile $binfile executable $exec_opts] != ""} { untested "Could not compile either $libsrc or $srcdir/$subdir/$srcfile." return -1 diff --git a/gdb/testsuite/gdb.mi/mi-pthreads.exp b/gdb/testsuite/gdb.mi/mi-pthreads.exp index 458d3fb4c74..d30e0f2c048 100644 --- a/gdb/testsuite/gdb.mi/mi-pthreads.exp +++ b/gdb/testsuite/gdb.mi/mi-pthreads.exp @@ -61,11 +61,9 @@ proc check_mi_thread_command_set {} { # # Start here # -set testfile "pthreads" -set srcfile "$testfile.c" -set binfile "$objdir/$subdir/mi-$testfile" +standard_testfile pthreads.c -set options [list debug incdir=$objdir] +set options [list debug] if {[gdb_compile_pthreads "$srcdir/$subdir/$srcfile" $binfile executable $options] != "" } { return -1 } diff --git a/gdb/testsuite/gdb.mi/mi-read-memory.exp b/gdb/testsuite/gdb.mi/mi-read-memory.exp index af34de8493a..5d154ba7c58 100644 --- a/gdb/testsuite/gdb.mi/mi-read-memory.exp +++ b/gdb/testsuite/gdb.mi/mi-read-memory.exp @@ -33,9 +33,8 @@ if [mi_gdb_start] { continue } -set testfile "mi-read-memory" -set srcfile ${testfile}.c -set binfile ${objdir}/${subdir}/${testfile} +standard_testfile + if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } { untested mi-read-memory.exp return -1 diff --git a/gdb/testsuite/gdb.mi/mi-regs.exp b/gdb/testsuite/gdb.mi/mi-regs.exp index 876de78b98d..988f0c52996 100644 --- a/gdb/testsuite/gdb.mi/mi-regs.exp +++ b/gdb/testsuite/gdb.mi/mi-regs.exp @@ -30,9 +30,8 @@ if [mi_gdb_start] { continue } -set testfile "basics" -set srcfile ${testfile}.c -set binfile ${objdir}/${subdir}/mi-regs +standard_testfile basics.c + if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } { untested mi-regs.exp return -1 diff --git a/gdb/testsuite/gdb.mi/mi-return.exp b/gdb/testsuite/gdb.mi/mi-return.exp index b7d931f0276..e6b4e61e7e8 100644 --- a/gdb/testsuite/gdb.mi/mi-return.exp +++ b/gdb/testsuite/gdb.mi/mi-return.exp @@ -31,9 +31,8 @@ if [mi_gdb_start] { continue } -set testfile "basics" -set srcfile ${testfile}.c -set binfile ${objdir}/${subdir}/mi-return +standard_testfile basics.c + if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } { untested mi-return.exp return -1 diff --git a/gdb/testsuite/gdb.mi/mi-reverse.exp b/gdb/testsuite/gdb.mi/mi-reverse.exp index 17bbb43e48e..f65493dfb79 100644 --- a/gdb/testsuite/gdb.mi/mi-reverse.exp +++ b/gdb/testsuite/gdb.mi/mi-reverse.exp @@ -39,9 +39,8 @@ if [mi_gdb_start] { continue } -set testfile mi-reverse -set srcfile basics.c -set binfile ${objdir}/${subdir}/mi2-reverse +standard_testfile basics.c + if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } { untested ${testfile}.exp return -1 diff --git a/gdb/testsuite/gdb.mi/mi-simplerun.exp b/gdb/testsuite/gdb.mi/mi-simplerun.exp index 52aa0d7ad07..a20d0880eac 100644 --- a/gdb/testsuite/gdb.mi/mi-simplerun.exp +++ b/gdb/testsuite/gdb.mi/mi-simplerun.exp @@ -32,9 +32,8 @@ if [mi_gdb_start] { continue } -set testfile "basics" -set srcfile ${testfile}.c -set binfile ${objdir}/${subdir}/mi-simplerun +standard_testfile basics.c + if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } { untested mi-simplerun.exp return -1 diff --git a/gdb/testsuite/gdb.mi/mi-solib.exp b/gdb/testsuite/gdb.mi/mi-solib.exp index bee6a5d74f1..cec4b84fdb2 100644 --- a/gdb/testsuite/gdb.mi/mi-solib.exp +++ b/gdb/testsuite/gdb.mi/mi-solib.exp @@ -26,14 +26,14 @@ if [mi_gdb_start] { continue } +standard_testfile solib-main.c solib-lib.c + set libname "solib-lib" -set srcfile_lib ${srcdir}/${subdir}/${libname}.c -set binfile_lib ${objdir}/${subdir}/${libname}.so +set srcfile_lib ${srcdir}/${subdir}/$srcfile2 +set binfile_lib [standard_output_file ${libname}.so] set lib_flags [list debug] -set testfile "solib-main" -set srcfile ${srcdir}/${subdir}/${testfile}.c -set binfile ${objdir}/${subdir}/${testfile} +set srcfile_main ${srcdir}/${subdir}/$srcfile set bin_flags [list debug shlib=${binfile_lib}] if [get_compiler_info] { @@ -41,7 +41,7 @@ if [get_compiler_info] { } if { [gdb_compile_shlib ${srcfile_lib} ${binfile_lib} $lib_flags] != "" - || [gdb_compile ${srcfile} ${binfile} executable $bin_flags] != "" } { + || [gdb_compile ${srcfile_main} ${binfile} executable $bin_flags] != "" } { untested "Could not compile $binfile_lib or $binfile." return -1 } diff --git a/gdb/testsuite/gdb.mi/mi-stack.exp b/gdb/testsuite/gdb.mi/mi-stack.exp index f3fcd45d74f..d743c68d5ad 100644 --- a/gdb/testsuite/gdb.mi/mi-stack.exp +++ b/gdb/testsuite/gdb.mi/mi-stack.exp @@ -31,9 +31,8 @@ if [mi_gdb_start] { continue } -set testfile "mi-stack" -set srcfile ${testfile}.c -set binfile ${objdir}/${subdir}/${testfile} +standard_testfile + if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } { untested mi-stack.exp return -1 diff --git a/gdb/testsuite/gdb.mi/mi-stepi.exp b/gdb/testsuite/gdb.mi/mi-stepi.exp index 5e119a3f801..245dc1c37e0 100644 --- a/gdb/testsuite/gdb.mi/mi-stepi.exp +++ b/gdb/testsuite/gdb.mi/mi-stepi.exp @@ -31,9 +31,8 @@ if [mi_gdb_start] { continue } -set testfile "basics" -set srcfile ${testfile}.c -set binfile ${objdir}/${subdir}/mi-stepi +standard_testfile basics.c + if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } { untested mi-stepi.exp return -1 diff --git a/gdb/testsuite/gdb.mi/mi-stepn.exp b/gdb/testsuite/gdb.mi/mi-stepn.exp index f72387281e6..4333cfe40c4 100644 --- a/gdb/testsuite/gdb.mi/mi-stepn.exp +++ b/gdb/testsuite/gdb.mi/mi-stepn.exp @@ -24,13 +24,10 @@ if [mi_gdb_start] { continue } -set testfile "mi-stepn" -set srcfile ${testfile}.c -set executable ${testfile} -set binfile ${objdir}/${subdir}/${executable} +standard_testfile set opts {debug} -if [build_executable ${testfile}.exp ${executable} ${srcfile} $opts] { +if [build_executable ${testfile}.exp ${testfile} ${srcfile} $opts] { return -1 } diff --git a/gdb/testsuite/gdb.mi/mi-syn-frame.exp b/gdb/testsuite/gdb.mi/mi-syn-frame.exp index 34771abf30a..a19deb94b52 100644 --- a/gdb/testsuite/gdb.mi/mi-syn-frame.exp +++ b/gdb/testsuite/gdb.mi/mi-syn-frame.exp @@ -24,9 +24,8 @@ if [target_info exists gdb,nosignals] { load_lib mi-support.exp set MIFLAGS "-i=mi" -set testfile "mi-syn-frame" -set srcfile ${testfile}.c -set binfile ${objdir}/${subdir}/${testfile} +standard_testfile + if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } { untested mi-syn-frame.exp return -1 diff --git a/gdb/testsuite/gdb.mi/mi-until.exp b/gdb/testsuite/gdb.mi/mi-until.exp index 56d914fc85d..a1c97b1c94d 100644 --- a/gdb/testsuite/gdb.mi/mi-until.exp +++ b/gdb/testsuite/gdb.mi/mi-until.exp @@ -30,9 +30,8 @@ if [mi_gdb_start] { continue } -set testfile "until" -set srcfile ${testfile}.c -set binfile ${objdir}/${subdir}/${testfile} +standard_testfile until.c + if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } { untested mi-until.exp return -1 diff --git a/gdb/testsuite/gdb.mi/mi-var-block.exp b/gdb/testsuite/gdb.mi/mi-var-block.exp index 601057ae4f2..e2eb42f73f8 100644 --- a/gdb/testsuite/gdb.mi/mi-var-block.exp +++ b/gdb/testsuite/gdb.mi/mi-var-block.exp @@ -27,9 +27,8 @@ if [mi_gdb_start] { continue } -set testfile "var-cmd" -set srcfile ${testfile}.c -set binfile ${objdir}/${subdir}/mi-var-block +standard_testfile var-cmd.c + if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } { untested mi-var-block.exp return -1 diff --git a/gdb/testsuite/gdb.mi/mi-var-child-f.exp b/gdb/testsuite/gdb.mi/mi-var-child-f.exp index 9383f50bb26..052d7e243c7 100644 --- a/gdb/testsuite/gdb.mi/mi-var-child-f.exp +++ b/gdb/testsuite/gdb.mi/mi-var-child-f.exp @@ -25,9 +25,8 @@ if [mi_gdb_start] { continue } -set testfile "array" -set srcfile ${testfile}.f -set binfile ${objdir}/${subdir}/${testfile} +standard_testfile array.f + if {[gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" \ executable {debug f77}] != ""} { return -1 diff --git a/gdb/testsuite/gdb.mi/mi-var-child.exp b/gdb/testsuite/gdb.mi/mi-var-child.exp index cd3133d2b10..1d72311de0d 100644 --- a/gdb/testsuite/gdb.mi/mi-var-child.exp +++ b/gdb/testsuite/gdb.mi/mi-var-child.exp @@ -28,9 +28,8 @@ if [mi_gdb_start] { continue } -set testfile "mi-var-child" -set srcfile ${testfile}.c -set binfile ${objdir}/${subdir}/${testfile} +standard_testfile + if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } { untested mi-var-child.exp return -1 diff --git a/gdb/testsuite/gdb.mi/mi-var-cmd.exp b/gdb/testsuite/gdb.mi/mi-var-cmd.exp index 017e4f6ad91..4c560a7ebc9 100644 --- a/gdb/testsuite/gdb.mi/mi-var-cmd.exp +++ b/gdb/testsuite/gdb.mi/mi-var-cmd.exp @@ -28,9 +28,8 @@ if [mi_gdb_start] { continue } -set testfile "var-cmd" -set srcfile ${testfile}.c -set binfile ${objdir}/${subdir}/mi-var-cmd +standard_testfile var-cmd.c + if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } { untested mi-var-cmd.exp return -1 diff --git a/gdb/testsuite/gdb.mi/mi-var-cp.exp b/gdb/testsuite/gdb.mi/mi-var-cp.exp index 6ab5208639c..0ce4c4026cc 100644 --- a/gdb/testsuite/gdb.mi/mi-var-cp.exp +++ b/gdb/testsuite/gdb.mi/mi-var-cp.exp @@ -23,9 +23,7 @@ if [mi_gdb_start] { continue } -set testfile mi-var-cp -set srcfile "$testfile.cc" -set binfile $objdir/$subdir/$testfile +standard_testfile .cc if [get_compiler_info "c++"] { return -1; diff --git a/gdb/testsuite/gdb.mi/mi-var-display.exp b/gdb/testsuite/gdb.mi/mi-var-display.exp index cf3ac80d406..5cb5f2600db 100644 --- a/gdb/testsuite/gdb.mi/mi-var-display.exp +++ b/gdb/testsuite/gdb.mi/mi-var-display.exp @@ -27,9 +27,8 @@ if [mi_gdb_start] { continue } -set testfile "var-cmd" -set srcfile ${testfile}.c -set binfile ${objdir}/${subdir}/mi-var-display +standard_testfile var-cmd.c + if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } { untested mi-var-display.exp return -1 diff --git a/gdb/testsuite/gdb.mi/mi-var-invalidate.exp b/gdb/testsuite/gdb.mi/mi-var-invalidate.exp index adeb442c8e5..3ecbbdf67d8 100644 --- a/gdb/testsuite/gdb.mi/mi-var-invalidate.exp +++ b/gdb/testsuite/gdb.mi/mi-var-invalidate.exp @@ -28,15 +28,14 @@ if [mi_gdb_start] { continue } -set testfile "var-cmd" -set srcfile ${testfile}.c -set binfile ${objdir}/${subdir}/mi-var-invalidate +standard_testfile var-cmd.c + if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } { untested mi-var-invalidate.exp return -1 } # Just change the output binary. -set binfile_bis ${objdir}/${subdir}/mi-var-invalidate_bis +set binfile_bis [standard_output_file mi-var-invalidate_bis] if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile_bis}" executable {debug}] != "" } { untested mi-var-invalidate.exp return -1 @@ -44,7 +43,7 @@ if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile_bis}" executable set testfile2 "basics" set srcfile2 ${testfile2}.c -set binfile2 ${objdir}/${subdir}/${testfile2} +set binfile2 [standard_output_file ${testfile2}] if { [gdb_compile "${srcdir}/${subdir}/${srcfile2}" "${binfile2}" executable {debug}] != "" } { untested mi-var-invalidate.exp return -1 diff --git a/gdb/testsuite/gdb.mi/mi-var-rtti.exp b/gdb/testsuite/gdb.mi/mi-var-rtti.exp index 5e43bae6dfe..a718ffba56e 100644 --- a/gdb/testsuite/gdb.mi/mi-var-rtti.exp +++ b/gdb/testsuite/gdb.mi/mi-var-rtti.exp @@ -23,13 +23,10 @@ if [mi_gdb_start] { continue } -set testfile mi-var-rtti -set srcfile "$testfile.cc" -set executable ${testfile} -set binfile $objdir/$subdir/$testfile +standard_testfile .cc set opts {debug c++} -if [build_executable $testfile.exp $executable $srcfile $opts] { +if [build_executable $testfile.exp $testfile $srcfile $opts] { return -1; } diff --git a/gdb/testsuite/gdb.mi/mi-watch-nonstop.exp b/gdb/testsuite/gdb.mi/mi-watch-nonstop.exp index 018452ffe28..c61b519ec9f 100644 --- a/gdb/testsuite/gdb.mi/mi-watch-nonstop.exp +++ b/gdb/testsuite/gdb.mi/mi-watch-nonstop.exp @@ -42,9 +42,7 @@ proc mi_nonstop_resume { command test } { # # Start here # -set testfile "watch-nonstop" -set srcfile "$testfile.c" -set binfile "$objdir/$subdir/mi-$testfile" +standard_testfile watch-nonstop.c if {[gdb_compile "$srcdir/$subdir/$srcfile" $binfile executable {debug}] != "" } { return -1 diff --git a/gdb/testsuite/gdb.mi/mi-watch.exp b/gdb/testsuite/gdb.mi/mi-watch.exp index 1fb2cc22394..5ccff514c5d 100644 --- a/gdb/testsuite/gdb.mi/mi-watch.exp +++ b/gdb/testsuite/gdb.mi/mi-watch.exp @@ -33,9 +33,8 @@ if [mi_gdb_start] { continue } -set testfile "basics" -set srcfile ${testfile}.c -set binfile ${objdir}/${subdir}/mi-watch +standard_testfile basics.c + if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } { untested mi-watch.exp return -1 diff --git a/gdb/testsuite/gdb.mi/mi2-amd64-entry-value.exp b/gdb/testsuite/gdb.mi/mi2-amd64-entry-value.exp index 12786bb3e31..e7f1208e00a 100644 --- a/gdb/testsuite/gdb.mi/mi2-amd64-entry-value.exp +++ b/gdb/testsuite/gdb.mi/mi2-amd64-entry-value.exp @@ -21,8 +21,7 @@ if [mi_gdb_start] { continue } -set testfile mi2-amd64-entry-value -set srcfile ${testfile}.s +standard_testfile .s set opts {} if [info exists COMPILE] { @@ -35,7 +34,6 @@ if [info exists COMPILE] { } set executable ${testfile} -set binfile ${objdir}/${subdir}/${executable} if [build_executable ${testfile}.exp ${executable} ${srcfile} $opts] { return -1 diff --git a/gdb/testsuite/gdb.mi/mi2-basics.exp b/gdb/testsuite/gdb.mi/mi2-basics.exp index 67bba6e2671..3a54f99ea98 100644 --- a/gdb/testsuite/gdb.mi/mi2-basics.exp +++ b/gdb/testsuite/gdb.mi/mi2-basics.exp @@ -33,9 +33,8 @@ if [mi_gdb_start] { continue } -set testfile "basics" -set srcfile ${testfile}.c -set binfile ${objdir}/${subdir}/mi2-basics +standard_testfile basics.c + set escapedobjdir [string_to_regexp ${objdir}] set envirodir [string_to_regexp ${objdir}/${subdir}] diff --git a/gdb/testsuite/gdb.mi/mi2-break.exp b/gdb/testsuite/gdb.mi/mi2-break.exp index 14ad922c06d..e1375e2b082 100644 --- a/gdb/testsuite/gdb.mi/mi2-break.exp +++ b/gdb/testsuite/gdb.mi/mi2-break.exp @@ -33,9 +33,8 @@ if [mi_gdb_start] { continue } -set testfile "basics" -set srcfile ${testfile}.c -set binfile ${objdir}/${subdir}/mi2-break +standard_testfile basics.c + if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } { untested mi2-break.exp return -1 diff --git a/gdb/testsuite/gdb.mi/mi2-cli.exp b/gdb/testsuite/gdb.mi/mi2-cli.exp index 3c7c6d51474..e84b1910e72 100644 --- a/gdb/testsuite/gdb.mi/mi2-cli.exp +++ b/gdb/testsuite/gdb.mi/mi2-cli.exp @@ -27,9 +27,8 @@ if [mi_gdb_start] { continue } -set testfile "basics" -set srcfile ${testfile}.c -set binfile ${objdir}/${subdir}/mi2-cli +standard_testfile basics.c + if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } { untested mi2-cli.exp return -1 diff --git a/gdb/testsuite/gdb.mi/mi2-console.exp b/gdb/testsuite/gdb.mi/mi2-console.exp index 17f342370d5..e1e180bdfe9 100644 --- a/gdb/testsuite/gdb.mi/mi2-console.exp +++ b/gdb/testsuite/gdb.mi/mi2-console.exp @@ -36,9 +36,8 @@ if [mi_gdb_start] { continue } -set testfile "mi-console" -set srcfile ${testfile}.c -set binfile ${objdir}/${subdir}/${testfile} +standard_testfile mi-console.c + if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } { untested mi2-console.exp return -1 diff --git a/gdb/testsuite/gdb.mi/mi2-disassemble.exp b/gdb/testsuite/gdb.mi/mi2-disassemble.exp index 66796d16d65..30e9129047f 100644 --- a/gdb/testsuite/gdb.mi/mi2-disassemble.exp +++ b/gdb/testsuite/gdb.mi/mi2-disassemble.exp @@ -28,9 +28,8 @@ if [mi_gdb_start] { continue } -set testfile "basics" -set srcfile ${testfile}.c -set binfile ${objdir}/${subdir}/mi2-disassemble +standard_testfile basics.c + if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } { untested mi2-disassemble.exp return -1 diff --git a/gdb/testsuite/gdb.mi/mi2-eval.exp b/gdb/testsuite/gdb.mi/mi2-eval.exp index 74287e0714b..cb82c739487 100644 --- a/gdb/testsuite/gdb.mi/mi2-eval.exp +++ b/gdb/testsuite/gdb.mi/mi2-eval.exp @@ -30,9 +30,8 @@ if [mi_gdb_start] { continue } -set testfile "basics" -set srcfile ${testfile}.c -set binfile ${objdir}/${subdir}/mi2-eval +standard_testfile basics.c + if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } { untested mi2-eval.exp return -1 diff --git a/gdb/testsuite/gdb.mi/mi2-file.exp b/gdb/testsuite/gdb.mi/mi2-file.exp index eb9d6b97cda..56ad708ca51 100644 --- a/gdb/testsuite/gdb.mi/mi2-file.exp +++ b/gdb/testsuite/gdb.mi/mi2-file.exp @@ -32,9 +32,8 @@ if [mi_gdb_start] { continue } -set testfile "basics" -set srcfile ${testfile}.c -set binfile ${objdir}/${subdir}/mi2-file +standard_testfile basics.c + if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } { untested mi2-file.exp return -1 diff --git a/gdb/testsuite/gdb.mi/mi2-pthreads.exp b/gdb/testsuite/gdb.mi/mi2-pthreads.exp index 8acc7ced987..37f325e50b8 100644 --- a/gdb/testsuite/gdb.mi/mi2-pthreads.exp +++ b/gdb/testsuite/gdb.mi/mi2-pthreads.exp @@ -55,11 +55,9 @@ proc check_mi_thread_command_set {} { # # Start here # -set testfile "pthreads" -set srcfile "$testfile.c" -set binfile "$objdir/$subdir/mi2-$testfile" +standard_testfile pthreads.c -set options [list debug incdir=$objdir] +set options [list debug] if {[gdb_compile_pthreads "$srcdir/$subdir/$srcfile" $binfile executable $options] != "" } { return -1 } diff --git a/gdb/testsuite/gdb.mi/mi2-read-memory.exp b/gdb/testsuite/gdb.mi/mi2-read-memory.exp index 61a0efdbe82..17c957389a5 100644 --- a/gdb/testsuite/gdb.mi/mi2-read-memory.exp +++ b/gdb/testsuite/gdb.mi/mi2-read-memory.exp @@ -33,9 +33,8 @@ if [mi_gdb_start] { continue } -set testfile "mi-read-memory" -set srcfile ${testfile}.c -set binfile ${objdir}/${subdir}/${testfile} +standard_testfile mi-read-memory.c + if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } { untested mi2-read-memory.exp return -1 diff --git a/gdb/testsuite/gdb.mi/mi2-regs.exp b/gdb/testsuite/gdb.mi/mi2-regs.exp index 808c850246c..8ddf89465af 100644 --- a/gdb/testsuite/gdb.mi/mi2-regs.exp +++ b/gdb/testsuite/gdb.mi/mi2-regs.exp @@ -30,9 +30,8 @@ if [mi_gdb_start] { continue } -set testfile "basics" -set srcfile ${testfile}.c -set binfile ${objdir}/${subdir}/mi2-regs +standard_testfile basics.c + if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } { untested mi2-regs.exp return -1 diff --git a/gdb/testsuite/gdb.mi/mi2-return.exp b/gdb/testsuite/gdb.mi/mi2-return.exp index d2b4836ed40..8d32e139c1b 100644 --- a/gdb/testsuite/gdb.mi/mi2-return.exp +++ b/gdb/testsuite/gdb.mi/mi2-return.exp @@ -30,9 +30,8 @@ if [mi_gdb_start] { continue } -set testfile "basics" -set srcfile ${testfile}.c -set binfile ${objdir}/${subdir}/mi2-return +standard_testfile basics.c + if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } { untested mi2-return.exp return -1 diff --git a/gdb/testsuite/gdb.mi/mi2-simplerun.exp b/gdb/testsuite/gdb.mi/mi2-simplerun.exp index c1cdc2fa31c..d4bbdab4ba9 100644 --- a/gdb/testsuite/gdb.mi/mi2-simplerun.exp +++ b/gdb/testsuite/gdb.mi/mi2-simplerun.exp @@ -32,9 +32,8 @@ if [mi_gdb_start] { continue } -set testfile "basics" -set srcfile ${testfile}.c -set binfile ${objdir}/${subdir}/mi2-simplerun +standard_testfile basics.c + if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } { untested mi2-simplerun.exp return -1 diff --git a/gdb/testsuite/gdb.mi/mi2-stack.exp b/gdb/testsuite/gdb.mi/mi2-stack.exp index 0d7c961e8bf..9b79f418139 100644 --- a/gdb/testsuite/gdb.mi/mi2-stack.exp +++ b/gdb/testsuite/gdb.mi/mi2-stack.exp @@ -30,9 +30,8 @@ if [mi_gdb_start] { continue } -set testfile "mi-stack" -set srcfile ${testfile}.c -set binfile ${objdir}/${subdir}/${testfile} +standard_testfile mi-stack.c + if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } { untested mi2-stack.exp return -1 diff --git a/gdb/testsuite/gdb.mi/mi2-stepi.exp b/gdb/testsuite/gdb.mi/mi2-stepi.exp index ee096215e46..d2cbb0b0ad6 100644 --- a/gdb/testsuite/gdb.mi/mi2-stepi.exp +++ b/gdb/testsuite/gdb.mi/mi2-stepi.exp @@ -30,9 +30,8 @@ if [mi_gdb_start] { continue } -set testfile "basics" -set srcfile ${testfile}.c -set binfile ${objdir}/${subdir}/mi2-stepi +standard_testfile basics.c + if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } { untested mi2-stepi.exp return -1 diff --git a/gdb/testsuite/gdb.mi/mi2-syn-frame.exp b/gdb/testsuite/gdb.mi/mi2-syn-frame.exp index ea9aa789485..9c24cca4f12 100644 --- a/gdb/testsuite/gdb.mi/mi2-syn-frame.exp +++ b/gdb/testsuite/gdb.mi/mi2-syn-frame.exp @@ -24,9 +24,8 @@ if [target_info exists gdb,nosignals] { load_lib mi-support.exp set MIFLAGS "-i=mi2" -set testfile "mi-syn-frame" -set srcfile ${testfile}.c -set binfile ${objdir}/${subdir}/${testfile} +standard_testfile mi-syn-frame.c + if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } { untested mi2-syn-frame.exp return -1 diff --git a/gdb/testsuite/gdb.mi/mi2-until.exp b/gdb/testsuite/gdb.mi/mi2-until.exp index eff56aa5af7..e1abc4afe2f 100644 --- a/gdb/testsuite/gdb.mi/mi2-until.exp +++ b/gdb/testsuite/gdb.mi/mi2-until.exp @@ -31,9 +31,8 @@ if [mi_gdb_start] { continue } -set testfile "until" -set srcfile ${testfile}.c -set binfile ${objdir}/${subdir}/${testfile} +standard_testfile until.c + if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } { untested mi2-until.exp return -1 diff --git a/gdb/testsuite/gdb.mi/mi2-var-block.exp b/gdb/testsuite/gdb.mi/mi2-var-block.exp index 3eed5356c31..6999db68256 100644 --- a/gdb/testsuite/gdb.mi/mi2-var-block.exp +++ b/gdb/testsuite/gdb.mi/mi2-var-block.exp @@ -27,9 +27,8 @@ if [mi_gdb_start] { continue } -set testfile "var-cmd" -set srcfile ${testfile}.c -set binfile ${objdir}/${subdir}/mi2-var-block +standard_testfile var-cmd.c + if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } { untested mi2-var-block.exp return -1 diff --git a/gdb/testsuite/gdb.mi/mi2-var-child.exp b/gdb/testsuite/gdb.mi/mi2-var-child.exp index 1497fd7c4ca..fdf12f7598b 100644 --- a/gdb/testsuite/gdb.mi/mi2-var-child.exp +++ b/gdb/testsuite/gdb.mi/mi2-var-child.exp @@ -27,9 +27,8 @@ if [mi_gdb_start] { continue } -set testfile "var-cmd" -set srcfile ${testfile}.c -set binfile ${objdir}/${subdir}/mi2-var-child +standard_testfile var-cmd.c + if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } { untested mi2-var-child.exp return -1 diff --git a/gdb/testsuite/gdb.mi/mi2-var-cmd.exp b/gdb/testsuite/gdb.mi/mi2-var-cmd.exp index 96d328a0cf4..5af2af83e77 100644 --- a/gdb/testsuite/gdb.mi/mi2-var-cmd.exp +++ b/gdb/testsuite/gdb.mi/mi2-var-cmd.exp @@ -27,9 +27,8 @@ if [mi_gdb_start] { continue } -set testfile "var-cmd" -set srcfile ${testfile}.c -set binfile ${objdir}/${subdir}/mi2-var-cmd +standard_testfile var-cmd.c + if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } { untested mi2-var-cmd.exp return -1 diff --git a/gdb/testsuite/gdb.mi/mi2-var-display.exp b/gdb/testsuite/gdb.mi/mi2-var-display.exp index d3b97a5b3b0..4bb1cd89963 100644 --- a/gdb/testsuite/gdb.mi/mi2-var-display.exp +++ b/gdb/testsuite/gdb.mi/mi2-var-display.exp @@ -27,9 +27,8 @@ if [mi_gdb_start] { continue } -set testfile "var-cmd" -set srcfile ${testfile}.c -set binfile ${objdir}/${subdir}/mi2-var-display +standard_testfile var-cmd.c + if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } { untested mi2-var-display.exp return -1 diff --git a/gdb/testsuite/gdb.mi/mi2-watch.exp b/gdb/testsuite/gdb.mi/mi2-watch.exp index 5c72eb49dd7..5a56c8e7cc2 100644 --- a/gdb/testsuite/gdb.mi/mi2-watch.exp +++ b/gdb/testsuite/gdb.mi/mi2-watch.exp @@ -32,9 +32,8 @@ if [mi_gdb_start] { continue } -set testfile "basics" -set srcfile ${testfile}.c -set binfile ${objdir}/${subdir}/mi2-watch +standard_testfile basics.c + if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } { untested mi2-watch.exp return -1