* gdb.python/lib-types.exp: Use standard_testfile,
authorTom Tromey <tromey@redhat.com>
Fri, 22 Jun 2012 17:59:33 +0000 (17:59 +0000)
committerTom Tromey <tromey@redhat.com>
Fri, 22 Jun 2012 17:59:33 +0000 (17:59 +0000)
prepare_for_testing.
* gdb.python/py-block.exp: Use standard_testfile.
* gdb.python/py-breakpoint.exp: Use standard_testfile.
* gdb.python/py-events.exp: Use standard_testfile,
standard_output_file.
* gdb.python/py-evsignal.exp: Use standard_testfile.
* gdb.python/py-evethreads.exp: Use standard_testfile.
* gdb.python/py-explore-cc.exp: Use standard_testfile.
* gdb.python/py-explore.exp: Use standard_testfile.
* gdb.python/py-finish-breakpoint.exp: Use standard_testfile,
standard_output_file.
* gdb.python/py-finish-breakpoint2.exp: Use standard_testfile,
prepare_for_testing.
* gdb.python/py-frame-inline.exp: Use standard_testfile.
* gdb.python/py-frame.exp: Use standard_testfile.
* gdb.python/py-inferior.exp: Use standard_testfile.
* gdb.python/py-infthread.exp: Use standard_testfile.
* gdb.python/py-mi.exp: Use standard_testfile.
* gdb.python/py-objfile-script.exp: Use standard_testfile,
build_executable.
* gdb.python/py-objfile.exp: Use standard_testfile.
* gdb.python/py-pp-maint.exp: Use standard_testfile,
prepare_for_testing.
* gdb.python/py-prettyprint.exp: Use standard_testfile.
* gdb.python/py-progspace.exp: Use standard_testfile,
build_executable.
* gdb.python/py-prompt.exp: Use standard_testfile,
build_executable.
* gdb.python/py-section-script.exp: Use standard_testfile,
build_executable.
* gdb.python/py-shared.exp: Use standard_testfile,
standard_output_file, clean_restart.
* gdb.python/py-symbol.exp: Use standard_output_file,
prepare_for_testing.
* gdb.python/py-symtab.exp: Use standard_output_file,
prepare_for_testing
* gdb.python/py-template.exp: Use standard_testfile.
* gdb.python/py-type.exp: Use standard_testfile.
* gdb.python/py-value-cc.exp: Use standard_testfile.
* gdb.python/py-value.exp: Use standard_testfile.
* gdb.python/python.exp: Use standard_testfile, build_executable.

31 files changed:
gdb/testsuite/ChangeLog
gdb/testsuite/gdb.python/lib-types.exp
gdb/testsuite/gdb.python/py-block.exp
gdb/testsuite/gdb.python/py-breakpoint.exp
gdb/testsuite/gdb.python/py-events.exp
gdb/testsuite/gdb.python/py-evsignal.exp
gdb/testsuite/gdb.python/py-evthreads.exp
gdb/testsuite/gdb.python/py-explore-cc.exp
gdb/testsuite/gdb.python/py-explore.exp
gdb/testsuite/gdb.python/py-finish-breakpoint.exp
gdb/testsuite/gdb.python/py-finish-breakpoint2.exp
gdb/testsuite/gdb.python/py-frame-inline.exp
gdb/testsuite/gdb.python/py-frame.exp
gdb/testsuite/gdb.python/py-inferior.exp
gdb/testsuite/gdb.python/py-infthread.exp
gdb/testsuite/gdb.python/py-mi.exp
gdb/testsuite/gdb.python/py-objfile-script.exp
gdb/testsuite/gdb.python/py-objfile.exp
gdb/testsuite/gdb.python/py-pp-maint.exp
gdb/testsuite/gdb.python/py-prettyprint.exp
gdb/testsuite/gdb.python/py-progspace.exp
gdb/testsuite/gdb.python/py-prompt.exp
gdb/testsuite/gdb.python/py-section-script.exp
gdb/testsuite/gdb.python/py-shared.exp
gdb/testsuite/gdb.python/py-symbol.exp
gdb/testsuite/gdb.python/py-symtab.exp
gdb/testsuite/gdb.python/py-template.exp
gdb/testsuite/gdb.python/py-type.exp
gdb/testsuite/gdb.python/py-value-cc.exp
gdb/testsuite/gdb.python/py-value.exp
gdb/testsuite/gdb.python/python.exp

index e205c26a7791f5a1e54855d3104028bdd161681a..7f53b84ce63506ef9790d2df15fc051b2b78893b 100644 (file)
@@ -1,3 +1,48 @@
+2012-06-22  Tom Tromey  <tromey@redhat.com>
+
+       * gdb.python/lib-types.exp: Use standard_testfile,
+       prepare_for_testing.
+       * gdb.python/py-block.exp: Use standard_testfile.
+       * gdb.python/py-breakpoint.exp: Use standard_testfile.
+       * gdb.python/py-events.exp: Use standard_testfile,
+       standard_output_file.
+       * gdb.python/py-evsignal.exp: Use standard_testfile.
+       * gdb.python/py-evethreads.exp: Use standard_testfile.
+       * gdb.python/py-explore-cc.exp: Use standard_testfile.
+       * gdb.python/py-explore.exp: Use standard_testfile.
+       * gdb.python/py-finish-breakpoint.exp: Use standard_testfile,
+       standard_output_file.
+       * gdb.python/py-finish-breakpoint2.exp: Use standard_testfile,
+       prepare_for_testing.
+       * gdb.python/py-frame-inline.exp: Use standard_testfile.
+       * gdb.python/py-frame.exp: Use standard_testfile.
+       * gdb.python/py-inferior.exp: Use standard_testfile.
+       * gdb.python/py-infthread.exp: Use standard_testfile.
+       * gdb.python/py-mi.exp: Use standard_testfile.
+       * gdb.python/py-objfile-script.exp: Use standard_testfile,
+       build_executable.
+       * gdb.python/py-objfile.exp: Use standard_testfile.
+       * gdb.python/py-pp-maint.exp: Use standard_testfile,
+       prepare_for_testing.
+       * gdb.python/py-prettyprint.exp: Use standard_testfile.
+       * gdb.python/py-progspace.exp: Use standard_testfile,
+       build_executable.
+       * gdb.python/py-prompt.exp: Use standard_testfile,
+       build_executable.
+       * gdb.python/py-section-script.exp: Use standard_testfile,
+       build_executable.
+       * gdb.python/py-shared.exp: Use standard_testfile,
+       standard_output_file, clean_restart.
+       * gdb.python/py-symbol.exp: Use standard_output_file,
+       prepare_for_testing.
+       * gdb.python/py-symtab.exp: Use standard_output_file,
+       prepare_for_testing
+       * gdb.python/py-template.exp: Use standard_testfile.
+       * gdb.python/py-type.exp: Use standard_testfile.
+       * gdb.python/py-value-cc.exp: Use standard_testfile.
+       * gdb.python/py-value.exp: Use standard_testfile.
+       * gdb.python/python.exp: Use standard_testfile, build_executable.
+
 2012-06-22  Tom Tromey  <tromey@redhat.com>
 
        * gdb.objc/basicclass.exp: Use standard_testfile.
index 6be49e1a9f869819054a3e9d2af9a2a96af5e287..fde0740f2e4174e93d1926cad475851ff483f21b 100644 (file)
 
 load_lib gdb-python.exp
 
-set testfile "lib-types"
-set srcfile ${testfile}.cc
-set binfile ${objdir}/${subdir}/${testfile}
-if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug c++}] != "" } {
-    untested "Couldn't compile ${srcfile}"
+standard_testfile .cc
+
+if {[prepare_for_testing $testfile.exp $testfile $srcfile debug]} {
     return -1
 }
 
-# Start with a fresh gdb.
-gdb_exit
-gdb_start
-gdb_reinitialize_dir $srcdir/$subdir
-gdb_load ${binfile}
-
 # Skip all tests if Python scripting is not enabled.
 if { [skip_python_tests] } { continue }
 
index 413e2e25b5c672586f44fc91a14aa363e8b15f26..745f84468d25735d55b9db2cbe21927755f9b4e9 100644 (file)
@@ -18,8 +18,8 @@
 
 load_lib gdb-python.exp
 
-set testfile "py-block"
-set srcfile ${testfile}.c
+standard_testfile
+
 if { [prepare_for_testing ${testfile}.exp ${testfile} ${srcfile}] } {
     return -1
 }
index f3d409ecf6678873352c4b1f1bddc8a02aa6456f..9bedeb2fca4308798403ec04ecfab9e02f3dcfb3 100644 (file)
@@ -18,8 +18,8 @@
 
 load_lib gdb-python.exp
 
-set testfile "py-breakpoint"
-set srcfile ${testfile}.c
+standard_testfile
+
 if { [prepare_for_testing ${testfile}.exp ${testfile} ${srcfile}] } {
     return -1
 }
index 28a1394d2656c40a20c50ffe9ebb7bff22ed7f6e..6b655bbb57dfa5c44f82422b2873c95b5b8ddeca 100644 (file)
@@ -21,12 +21,10 @@ load_lib gdb-python.exp
 
 set libfile "py-events-shlib"
 set libsrc  $srcdir/$subdir/$libfile.c
-set lib_sl  $objdir/$subdir/$libfile.so
+set lib_sl  [standard_output_file $libfile.so]
 set lib_opts  debug
 
-set testfile "py-events"
-set srcfile ${testfile}.c
-set binfile ${objdir}/${subdir}/${testfile}
+standard_testfile
 set exec_opts [list debug shlib=$lib_sl]
 set pyfile ${srcdir}/${subdir}/${testfile}.py
 
index d3f819a105468e33040c2232f42bf70def831a47..b3c1d66defd2f17618adc389facebbfc06e22d59 100644 (file)
@@ -21,9 +21,7 @@ if {[is_remote target]} {
 
 load_lib gdb-python.exp
 
-set testfile "py-evsignal"
-set srcfile py-evthreads.c
-set binfile ${objdir}/${subdir}/${testfile}
+standard_testfile py-evthreads.c
 set pyfile ${srcdir}/${subdir}/py-events.py
 
 if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
index 8b540bd0d9b838649c1297f67c8857f9ca1fbac0..98f25015abc7b60684332cba6e17e5eb45a19744 100644 (file)
@@ -26,9 +26,7 @@ if { ![support_displaced_stepping] } {
 
 load_lib gdb-python.exp
 
-set testfile "py-evthreads"
-set srcfile ${testfile}.c
-set binfile ${objdir}/${subdir}/${testfile}
+standard_testfile
 set pyfile ${srcdir}/${subdir}/py-events.py
 
 if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
index afcf45318503fb914c553167c49526240fcc1e74..3686ae302ad9d44eddde94c7fb94073bb1febc49 100644 (file)
@@ -18,9 +18,7 @@
 
 if { [skip_cplus_tests] } { continue }
 
-set testfile "py-explore"
-set srcfile ${testfile}.cc
-set binfile ${objdir}/${subdir}/${testfile}
+standard_testfile py-explore.cc
 
 if {[prepare_for_testing $testfile.exp $testfile $srcfile {debug c++}]} {
     return -1
index 5ba98e9631d608ab211fc66d2e0ea408ab94bf2e..308d90223aea64c1b6b43d775ce2526157dd02da 100644 (file)
@@ -13,9 +13,8 @@
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
-set testfile "py-explore"
-set srcfile ${testfile}.c
-set binfile ${objdir}/${subdir}/${testfile}
+standard_testfile
+
 if { [prepare_for_testing ${testfile}.exp ${testfile} ${srcfile}] } {
     return -1
 }
index e56ad67e1bb0169f810423982e903b048e2edf71..d521021918edae8b96ac752d1e0c1d8252df4d35 100644 (file)
@@ -25,12 +25,10 @@ load_lib gdb-python.exp
 
 set libfile "py-events-shlib"
 set libsrc  $srcdir/$subdir/$libfile.c
-set lib_sl  $objdir/$subdir/$libfile-nodebug.so
+set lib_sl  [standard_output_file $libfile-nodebug.so]
 set lib_opts ""
 
-set testfile "py-finish-breakpoint"
-set srcfile ${testfile}.c
-set binfile ${objdir}/${subdir}/${testfile}
+standard_testfile
 set exec_opts [list debug shlib=$lib_sl]
 
 if [get_compiler_info] {
index 3174be1916fd0fca975b0e5ee3759fc21e325835..3b08ef8c21c9e383f4ac9c768ee1f568b7582807 100644 (file)
 
 load_lib gdb-python.exp
 
-set testfile "py-finish-breakpoint2"
-set srcfile ${testfile}.cc
-set binfile ${objdir}/${subdir}/${testfile}
+standard_testfile .cc
 set pyfile  ${srcdir}/${subdir}/${testfile}.py
 
-if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug c++}] != "" } {
-    untested "Couldn't compile ${srcfile}"
+if {[prepare_for_testing $testfile.exp $testfile $srcfile {debug c++}]} {
     return -1
 }
 
-# Start with a fresh gdb.
-gdb_exit
-gdb_start
-gdb_reinitialize_dir $srcdir/$subdir
-gdb_load ${binfile}
-
 # Skip all tests if Python scripting is not enabled.
 if { [skip_python_tests] } { continue }
 
index 6d45ba232bf4aeb45379fa79a3feabf1f85f41ec..49fa87e09285d6699f645e49981b66d9c867d359 100644 (file)
@@ -15,8 +15,8 @@
 
 load_lib gdb-python.exp
 
-set testfile "py-frame-inline"
-set srcfile ${testfile}.c
+standard_testfile
+
 if { [prepare_for_testing ${testfile}.exp ${testfile} ${srcfile}] } {
     return -1
 }
index 83ff8fe78bcae4650e500ded654c7e9d79318ae0..993e77479fb193f890d21f8323074997f0c65bb9 100644 (file)
@@ -18,8 +18,8 @@
 
 load_lib gdb-python.exp
 
-set testfile "py-frame"
-set srcfile ${testfile}.c
+standard_testfile
+
 if { [prepare_for_testing ${testfile}.exp ${testfile} ${srcfile}] } {
     return -1
 }
index ef737a4bddb7444941c184dcff736217d01bd30a..b40a514396536c2bd6ca633d6d0fbe772d8b18b8 100644 (file)
@@ -18,8 +18,8 @@
 
 load_lib gdb-python.exp
 
-set testfile "py-inferior"
-set srcfile ${testfile}.c
+standard_testfile
+
 if { [prepare_for_testing ${testfile}.exp ${testfile} ${srcfile}] } {
     return -1
 }
@@ -216,4 +216,4 @@ gdb_test "add-inferior" "Added inferior 3" "Create new inferior"
 gdb_test "inferior 3" ".*" "Switch to third inferior"
 gdb_test "py print gdb.selected_inferior().num" "3" "Third inferior selected"
 gdb_test "inferior 1" ".*" "Switch to first inferior"
-gdb_test_no_output "remove-inferiors 3" "Remove second inferior"
\ No newline at end of file
+gdb_test_no_output "remove-inferiors 3" "Remove second inferior"
index 491cc41b20d10bfd94b3e47df016d57e4d0e1c64..0ddc912492b3c87e033916bf89db46fbe616d214 100644 (file)
@@ -18,8 +18,8 @@
 
 load_lib gdb-python.exp
 
-set testfile "py-infthread"
-set srcfile ${testfile}.c
+standard_testfile
+
 if { [prepare_for_testing ${testfile}.exp ${testfile} ${srcfile}] } {
     return -1
 }
index 8d54a8d58425c685e327e756889f44a6ec9a4ca9..a792e44cd66facb57e03f1c6db1014f1c0644eee 100644 (file)
@@ -24,9 +24,7 @@ if [mi_gdb_start] {
     continue
 }
 
-set testfile "py-mi"
-set srcfile py-prettyprint.c
-set binfile ${objdir}/${subdir}/${testfile}
+standard_testfile py-prettyprint.c
 set pyfile py-prettyprint.py
 if  { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug additional_flags=-DMI}] != "" } {
     untested ${testfile}.exp
index 12d67956224921b6df676f80123eb3a0c1c2b72a..abdb12754f77052c16cd9fa4f54a6f4575a71686 100644 (file)
 # This file is part of the GDB testsuite.  It tests automagic loading of
 # -gdb.py scripts.
 
-set testfile "py-objfile-script"
-set srcfile ${testfile}.c
-set binfile ${objdir}/${subdir}/${testfile}
-if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
-    untested "Couldn't compile ${srcfile}"
+standard_testfile
+
+if {[build_executable $testfile.exp $testfile $srcfile debug] == -1} {
     return -1
 }
 
index c277c5947f0a2b1c96300895e717cbc1b939c5c1..cbd0f87c3368ae07497f6639da46fd5378b2dc80 100644 (file)
@@ -18,8 +18,7 @@
 
 load_lib gdb-python.exp
 
-set testfile "py-objfile"
-set srcfile ${testfile}.c
+standard_testfile
 
 if { [prepare_for_testing ${testfile}.exp ${testfile} ${srcfile}] } {
     return -1
index 5971a40387ed8e49634445bda14fea5fef9b0a8e..3f08ba12a79febf11b1aa7a79d8db7e517f6e10d 100644 (file)
@@ -23,24 +23,14 @@ if [is_remote host] {
 
 load_lib gdb-python.exp
 
-set testfile "py-pp-maint"
-set srcfile ${testfile}.c
-set binfile ${objdir}/${subdir}/${testfile}
+standard_testfile
 
-# Start with a fresh gdb.
-gdb_exit
-gdb_start
-
-# Skip all tests if Python scripting is not enabled.
-if { [skip_python_tests] } { continue }
-
-if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable "debug"] != "" } {
-    untested "Couldn't compile ${srcfile}"
+if {[prepare_for_testing $testfile.exp $testfile $srcfile debug]} {
     return -1
 }
 
-gdb_reinitialize_dir $srcdir/$subdir
-gdb_load ${binfile}
+# Skip all tests if Python scripting is not enabled.
+if { [skip_python_tests] } { continue }
 
 if ![runto_main ] then {
     fail "Can't run to main"
index e61422a3a64a7a13678f0549e632644e20b2101d..a6c241a14118b13278d2e8d5801561540f1a0e4e 100644 (file)
@@ -18,9 +18,7 @@
 
 load_lib gdb-python.exp
 
-set testfile "py-prettyprint"
-set srcfile ${testfile}.c
-set binfile ${objdir}/${subdir}/${testfile}
+standard_testfile
 
 # Start with a fresh gdb.
 gdb_exit
index c53cf37c0fe03e614767bb7c7bd44d70ca4336fc..ee7ce9e51fd48e3ca661f0a33d3716985fc6fd81 100644 (file)
 # This file is part of the GDB testsuite.  It tests the program space
 # support in Python.
 
-set testfile "py-progspace"
-set srcfile ${testfile}.c
-set binfile ${objdir}/${subdir}/${testfile}
-if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
-    untested "Couldn't compile ${srcfile}"
+standard_testfile
+
+if {[build_executable $testfile.exp $testfile $srcfile debug] == -1} {
     return -1
 }
 
index ab17ab93bd7c94ec0e976225eff27c156f1929c1..b5d9368d0d5dc0aa46f4801f2397ea4d52582ddb 100644 (file)
@@ -16,9 +16,7 @@
 # This file is part of the GDB testsuite.  It tests the mechanism
 # for defining the prompt in Python.
 
-set testfile "py-prompt"
-set srcfile ${testfile}.c
-set binfile ${objdir}/${subdir}/${testfile}
+standard_testfile
 
 # We need to use TCL's exec to get the pid.
 if [is_remote target] then {
@@ -38,8 +36,7 @@ gdb_reinitialize_dir $srcdir/$subdir
 if { [skip_python_tests] } { continue }
 gdb_exit
 
-if  { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
-    untested py-prompt.exp
+if {[build_executable $testfile.exp $testfile $srcfile debug] == -1} {
     return -1
 }
 
index d070f13f8e1fa90593255ca8ea1b1eb52f8ffce7..8135b96fe766b44863649229123db3cb73adbc76 100644 (file)
@@ -29,11 +29,9 @@ if {![istarget *-*-linux*]
     return
 }
 
-set testfile "py-section-script"
-set srcfile ${testfile}.c
-set binfile ${objdir}/${subdir}/${testfile}
-if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
-    untested "Couldn't compile ${srcfile}"
+standard_testfile
+
+if {[build_executable $testfile.exp $testfile $srcfile debug] == -1} {
     return -1
 }
 
index fa57de7dd0ed319d90f587a1ffd97e14c2913ba2..454a325260eb3be5afbdfb25e5ccbd4cda0d0e5f 100644 (file)
@@ -21,12 +21,11 @@ if {[skip_shlib_tests]} {
     return 0
 }
 
-set testfile "py-shared"
-set srcfile  ${testfile}.c
+standard_testfile
+
 set libfile  "py-shared-sl"
 set libsrc   ${libfile}.c
-set library  ${objdir}/${subdir}/${libfile}.sl
-set binfile  ${objdir}/${subdir}/${testfile}
+set library  [standard_output_file ${libfile}.sl]
 
 if { [gdb_compile_shlib ${srcdir}/${subdir}/${libsrc} ${library} "debug"] != "" } {
     untested "Could not compile shared library."
@@ -41,10 +40,7 @@ if { [gdb_compile ${srcdir}/${subdir}/${srcfile} ${binfile} executable $exec_opt
 }
 
 # Start with a fresh gdb.
-gdb_exit
-gdb_start
-gdb_reinitialize_dir $srcdir/$subdir
-gdb_load ${binfile}
+clean_restart $testfile
 gdb_load_shlibs ${library}
 
 # Skip all tests if Python scripting is not enabled.
index 2f274af2127a7152dba37c005e54a9eca11de83d..bc20ee471dbf8e25c13acc8fcc1c8bceb2419656 100644 (file)
 
 load_lib gdb-python.exp
 
-set testfile "py-symbol"
-set srcfile ${testfile}.c
-set binfile ${objdir}/${subdir}/${testfile}
-if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
-    untested "Couldn't compile ${srcfile}"
+standard_testfile
+
+if {[prepare_for_testing $testfile.exp $testfile $srcfile debug]} {
     return -1
 }
 
-# Start with a fresh gdb.
-gdb_exit
-gdb_start
-gdb_reinitialize_dir $srcdir/$subdir
-gdb_load ${binfile}
-
 # Skip all tests if Python scripting is not enabled.
 if { [skip_python_tests] } { continue }
 
index 6eec611677ce01639d592d8e19b8f46959a84209..9aef863a54b8c1130346168edf9abfa4c147eac6 100644 (file)
 
 load_lib gdb-python.exp
 
-set testfile "py-symbol"
-set srcfile ${testfile}.c
-set binfile ${objdir}/${subdir}/${testfile}
-if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
-    untested "Couldn't compile ${srcfile}"
+standard_testfile py-symbol.c
+
+if {[prepare_for_testing $testfile.exp $testfile $srcfile debug]} {
     return -1
 }
 
-# Start with a fresh gdb.
-gdb_exit
-gdb_start
-gdb_reinitialize_dir $srcdir/$subdir
-gdb_load ${binfile}
-
 # Skip all tests if Python scripting is not enabled.
 if { [skip_python_tests] } { continue }
 
index 8805611da533ad154a9a279774d6359541c97578..5aff73df6240b04b53bb9907e4d26d567fa24c83 100644 (file)
@@ -18,9 +18,7 @@
 
 if { [skip_cplus_tests] } { continue }
 
-set testfile "py-template"
-set srcfile ${testfile}.cc
-set binfile ${objdir}/${subdir}/${testfile}
+standard_testfile .cc
 if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable \
          {debug c++}] != "" } {
     untested "Couldn't compile ${srcfile}"
index eb9012a08aa46a73535ba136d7c5eda2661b556e..98a055e06ebb0504c8086cfd85115e14009ba0ce 100644 (file)
@@ -18,9 +18,7 @@
 
 load_lib gdb-python.exp
 
-set testfile "py-type"
-set srcfile ${testfile}.c
-set binfile ${objdir}/${subdir}/${testfile}
+standard_testfile
 
 if [get_compiler_info c++] {
     return -1;
index 03886137fbf28175b304a6bb3e88290edb8df026..9de63b1bd51f73cd64c75fe39c0311c4b9454899 100644 (file)
@@ -18,9 +18,7 @@
 
 if { [skip_cplus_tests] } { continue }
 
-set testfile "py-value"
-set srcfile ${testfile}.cc
-set binfile ${objdir}/${subdir}/${testfile}
+standard_testfile py-value.cc
 
 if {[prepare_for_testing $testfile.exp $testfile $srcfile {debug c++}]} {
     return -1
index c9d8c97f5c366874b813e44b80d25a0117cb6185..acfd89b74724e1b14a732dc3de8eea0a9e189df2 100644 (file)
@@ -18,9 +18,7 @@
 
 load_lib gdb-python.exp
 
-set testfile "py-value"
-set srcfile ${testfile}.c
-set binfile ${objdir}/${subdir}/${testfile}
+standard_testfile
 
 # Build inferior to language specification.
 proc build_inferior {exefile lang} {
index ef0cdcf87a3f10043460b47e27f62e4b03a35aa5..2c7ead2693550a08fc595dca767e51e212fb8399 100644 (file)
 
 load_lib gdb-python.exp
 
-set testfile "python"
-set srcfile  ${testfile}.c
-set srcfile1  ${testfile}-1.c
-set binfile  ${objdir}/${subdir}/${testfile}
-
-if { [gdb_compile "${srcdir}/${subdir}/${srcfile} ${srcdir}/${subdir}/${srcfile1}" \
-         ${binfile} executable {debug}] != "" } {
-    untested "Could not compile $binfile."
+standard_testfile python.c python-1.c
+
+if {[build_executable $testfile.exp $testfile \
+        [list $srcfile $srcfile2] debug] == -1} {
     return -1
 }
 
This page took 0.05337 seconds and 4 git commands to generate.