From 298a9cf0efcb7be466df40d6c31c0b4135cf0ac7 Mon Sep 17 00:00:00 2001 From: Tom Tromey Date: Tue, 10 Jul 2012 15:32:52 +0000 Subject: * 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. --- gdb/testsuite/ChangeLog | 74 ++++++++++++++++++++++ gdb/testsuite/gdb.mi/dw2-ref-missing-frame.exp | 19 ++---- gdb/testsuite/gdb.mi/gdb2549.exp | 5 +- gdb/testsuite/gdb.mi/gdb669.exp | 6 +- gdb/testsuite/gdb.mi/gdb701.exp | 5 +- gdb/testsuite/gdb.mi/gdb792.exp | 4 +- gdb/testsuite/gdb.mi/mi-async.exp | 5 +- gdb/testsuite/gdb.mi/mi-basics.exp | 4 +- gdb/testsuite/gdb.mi/mi-break.exp | 5 +- gdb/testsuite/gdb.mi/mi-cli.exp | 5 +- gdb/testsuite/gdb.mi/mi-console.exp | 5 +- gdb/testsuite/gdb.mi/mi-disassemble.exp | 5 +- gdb/testsuite/gdb.mi/mi-eval.exp | 5 +- gdb/testsuite/gdb.mi/mi-file-transfer.exp | 5 +- gdb/testsuite/gdb.mi/mi-file.exp | 5 +- .../gdb.mi/mi-inheritance-syntax-error.exp | 4 +- gdb/testsuite/gdb.mi/mi-logging.exp | 7 +- gdb/testsuite/gdb.mi/mi-nonstop-exit.exp | 6 +- gdb/testsuite/gdb.mi/mi-nonstop.exp | 6 +- gdb/testsuite/gdb.mi/mi-ns-stale-regcache.exp | 6 +- gdb/testsuite/gdb.mi/mi-nsintrall.exp | 6 +- gdb/testsuite/gdb.mi/mi-nsmoribund.exp | 6 +- gdb/testsuite/gdb.mi/mi-nsthrexec.exp | 6 +- gdb/testsuite/gdb.mi/mi-pending.exp | 10 +-- gdb/testsuite/gdb.mi/mi-pthreads.exp | 6 +- gdb/testsuite/gdb.mi/mi-read-memory.exp | 5 +- gdb/testsuite/gdb.mi/mi-regs.exp | 5 +- gdb/testsuite/gdb.mi/mi-return.exp | 5 +- gdb/testsuite/gdb.mi/mi-reverse.exp | 5 +- gdb/testsuite/gdb.mi/mi-simplerun.exp | 5 +- gdb/testsuite/gdb.mi/mi-solib.exp | 12 ++-- gdb/testsuite/gdb.mi/mi-stack.exp | 5 +- gdb/testsuite/gdb.mi/mi-stepi.exp | 5 +- gdb/testsuite/gdb.mi/mi-stepn.exp | 7 +- gdb/testsuite/gdb.mi/mi-syn-frame.exp | 5 +- gdb/testsuite/gdb.mi/mi-until.exp | 5 +- gdb/testsuite/gdb.mi/mi-var-block.exp | 5 +- gdb/testsuite/gdb.mi/mi-var-child-f.exp | 5 +- gdb/testsuite/gdb.mi/mi-var-child.exp | 5 +- gdb/testsuite/gdb.mi/mi-var-cmd.exp | 5 +- gdb/testsuite/gdb.mi/mi-var-cp.exp | 4 +- gdb/testsuite/gdb.mi/mi-var-display.exp | 5 +- gdb/testsuite/gdb.mi/mi-var-invalidate.exp | 9 ++- gdb/testsuite/gdb.mi/mi-var-rtti.exp | 7 +- gdb/testsuite/gdb.mi/mi-watch-nonstop.exp | 4 +- gdb/testsuite/gdb.mi/mi-watch.exp | 5 +- gdb/testsuite/gdb.mi/mi2-amd64-entry-value.exp | 4 +- gdb/testsuite/gdb.mi/mi2-basics.exp | 5 +- gdb/testsuite/gdb.mi/mi2-break.exp | 5 +- gdb/testsuite/gdb.mi/mi2-cli.exp | 5 +- gdb/testsuite/gdb.mi/mi2-console.exp | 5 +- gdb/testsuite/gdb.mi/mi2-disassemble.exp | 5 +- gdb/testsuite/gdb.mi/mi2-eval.exp | 5 +- gdb/testsuite/gdb.mi/mi2-file.exp | 5 +- gdb/testsuite/gdb.mi/mi2-pthreads.exp | 6 +- gdb/testsuite/gdb.mi/mi2-read-memory.exp | 5 +- gdb/testsuite/gdb.mi/mi2-regs.exp | 5 +- gdb/testsuite/gdb.mi/mi2-return.exp | 5 +- gdb/testsuite/gdb.mi/mi2-simplerun.exp | 5 +- gdb/testsuite/gdb.mi/mi2-stack.exp | 5 +- gdb/testsuite/gdb.mi/mi2-stepi.exp | 5 +- gdb/testsuite/gdb.mi/mi2-syn-frame.exp | 5 +- gdb/testsuite/gdb.mi/mi2-until.exp | 5 +- gdb/testsuite/gdb.mi/mi2-var-block.exp | 5 +- gdb/testsuite/gdb.mi/mi2-var-child.exp | 5 +- gdb/testsuite/gdb.mi/mi2-var-cmd.exp | 5 +- gdb/testsuite/gdb.mi/mi2-var-display.exp | 5 +- gdb/testsuite/gdb.mi/mi2-watch.exp | 5 +- 68 files changed, 214 insertions(+), 234 deletions(-) (limited to 'gdb/testsuite') diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index e3fae5e..8b933e9 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,5 +1,79 @@ 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. * gdb.cp/ambiguous.exp: Use standard_testfile, prepare_for_testing. diff --git a/gdb/testsuite/gdb.mi/dw2-ref-missing-frame.exp b/gdb/testsuite/gdb.mi/dw2-ref-missing-frame.exp index 662bded..187cd12 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 bf536de..9af04dd 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 904f14d..2ca173c 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 cda54a8..8de7adc 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 25909df..1cb7ae2 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 bab7673..1d6b377 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 9ff27b4..564b835 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 debfe86..573f484 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 598365b..b7abbc7 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 83deff5..891c743 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 68038ae..377ffde 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 29d26a2..ea20369 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 74b38e9..a7a3e60 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 3733107..b0df2cd 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 a705e28..ba80f4f 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 d62bfe6..2c533bd 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 b6f5728..fe7654e 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 1c57643..f96799f 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 c5cf8cf..8cf5b6c 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 ccdce5c..1d4aba5 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 36e70d3..0c83bb9 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 921fcf0..28ca7fc 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 8bfa4e5..f39ab71 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 458d3fb..d30e0f2 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 af34de8..5d154ba 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 876de78..988f0c5 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 b7d931f..e6b4e61 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 17bbb43..f65493d 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 52aa0d7..a20d088 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 bee6a5d..cec4b84 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 f3fcd45..d743c68 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 5e119a3..245dc1c 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 f723872..4333cfe 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 34771ab..a19deb9 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 56d914f..a1c97b1 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 601057a..e2eb42f 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 9383f50..052d7e2 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 cd3133d..1d72311 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 017e4f6..4c560a7 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 6ab5208..0ce4c40 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 cf3ac80..5cb5f26 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 adeb442..3ecbbdf 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 5e43bae..a718ffb 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 018452f..c61b519 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 1fb2cc2..5ccff51 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 12786bb..e7f1208 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 67bba6e..3a54f99 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 14ad922..e1375e2 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 3c7c6d5..e84b191 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 17f3423..e1e180b 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 66796d1..30e9129 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 74287e0..cb82c73 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 eb9d6b9..56ad708 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 8acc7ce..37f325e 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 61a0efd..17c9573 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 808c850..8ddf894 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 d2b4836..8d32e13 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 c1cdc2f..d4bbdab 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 0d7c961..9b79f41 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 ee09621..d2cbb0b 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 ea9aa78..9c24cca 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 eff56aa..e1abc4a 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 3eed535..6999db6 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 1497fd7..fdf12f7 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 96d328a..5af2af8 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 d3b97a5..4bb1cd8 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 5c72eb4..5a56c8e 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 -- cgit v1.1