* lib/ada.exp (standard_ada_testfile): New proc.
authorTom Tromey <tromey@redhat.com>
Thu, 26 Jul 2012 18:43:02 +0000 (18:43 +0000)
committerTom Tromey <tromey@redhat.com>
Thu, 26 Jul 2012 18:43:02 +0000 (18:43 +0000)
* gdb.ada/aliased_array.exp: Use standard_ada_testfile.
* gdb.ada/array_bounds.exp: Use standard_ada_testfile.
* gdb.ada/array_return.exp: Use standard_ada_testfile.
* gdb.ada/array_subscript_addr.exp: Use standard_ada_testfile.
* gdb.ada/arrayidx.exp: Use standard_ada_testfile.
* gdb.ada/arrayparam.exp: Use standard_ada_testfile.
* gdb.ada/arrayptr.exp: Use standard_ada_testfile.
* gdb.ada/atomic_enum.exp: Use standard_ada_testfile.
* gdb.ada/bad-task-bp-keyword.exp: Use standard_ada_testfile.
* gdb.ada/bp_enum_homonym.exp: Use standard_ada_testfile.
* gdb.ada/bp_on_var.exp: Use standard_ada_testfile.
* gdb.ada/bp_range_type.exp: Use standard_ada_testfile.
* gdb.ada/call_pn.exp: Use standard_ada_testfile.
* gdb.ada/catch_ex.exp: Use standard_ada_testfile.
* gdb.ada/char_enum.exp: Use standard_ada_testfile.
* gdb.ada/char_param.exp: Use standard_ada_testfile.
* gdb.ada/complete.exp: Use standard_ada_testfile.
* gdb.ada/cond_lang.exp: Use standard_ada_testfile,
standard_output_file.
* gdb.ada/dyn_loc.exp: Use standard_ada_testfile.
* gdb.ada/enum_idx_packed.exp: Use standard_ada_testfile.
* gdb.ada/exec_changed.exp: Use standard_ada_testfile,
standard_output_file.
* gdb.ada/exprs.exp: Use standard_ada_testfile.
* gdb.ada/fixed_cmp.exp: Use standard_ada_testfile.
* gdb.ada/fixed_points.exp: Use standard_ada_testfile.
* gdb.ada/formatted_ref.exp: Use standard_ada_testfile.
* gdb.ada/frame_args.exp: Use standard_ada_testfile.
* gdb.ada/fullname_bp.exp: Use standard_ada_testfile.
* gdb.ada/fun_addr.exp: Use standard_ada_testfile.
* gdb.ada/fun_in_declare.exp: Use standard_ada_testfile.
* gdb.ada/funcall_param.exp: Use standard_ada_testfile.
* gdb.ada/homonym.exp: Use standard_ada_testfile.
* gdb.ada/info_locals_renaming.exp: Use standard_ada_testfile.
* gdb.ada/int_deref.exp: Use standard_ada_testfile.
* gdb.ada/interface.exp: Use standard_ada_testfile.
* gdb.ada/lang_switch.exp: Use standard_ada_testfile,
standard_output_file
* gdb.ada/mi_catch_ex.exp: Use standard_ada_testfile.
* gdb.ada/mi_task_arg.exp: Use standard_ada_testfile.
* gdb.ada/mi_task_info.exp: Use standard_ada_testfile.
* gdb.ada/mod_from_name.exp: Use standard_ada_testfile.
* gdb.ada/nested.exp: Use standard_ada_testfile.
* gdb.ada/null_array.exp: Use standard_ada_testfile.
* gdb.ada/null_record.exp: Use standard_ada_testfile.
* gdb.ada/operator_bp.exp: Use standard_ada_testfile.
* gdb.ada/packed_array.exp: Use standard_ada_testfile.
* gdb.ada/packed_tagged.exp: Use standard_ada_testfile.
* gdb.ada/print_chars.exp: Use standard_ada_testfile.
* gdb.ada/print_pc.exp: Use standard_ada_testfile.
* gdb.ada/ptr_typedef.exp: Use standard_ada_testfile.
* gdb.ada/ptype_field.exp: Use standard_ada_testfile.
* gdb.ada/ptype_tagged_param.exp: Use standard_ada_testfile.
* gdb.ada/rec_return.exp: Use standard_ada_testfile.
* gdb.ada/ref_param.exp: Use standard_ada_testfile.
* gdb.ada/ref_tick_size.exp: Use standard_ada_testfile.
* gdb.ada/same_enum.exp: Use standard_ada_testfile.
* gdb.ada/set_pckd_arr_elt.exp: Use standard_ada_testfile.
* gdb.ada/small_reg_param.exp: Use standard_ada_testfile.
* gdb.ada/start.exp: Use standard_ada_testfile.
* gdb.ada/str_ref_cmp.exp: Use standard_ada_testfile.
* gdb.ada/sym_print_name.exp: Use standard_ada_testfile.
* gdb.ada/taft_type.exp: Use standard_ada_testfile.
* gdb.ada/tagged.exp: Use standard_ada_testfile.
* gdb.ada/tagged_not_init.exp: Use standard_ada_testfile.
* gdb.ada/task_bp.exp: Use standard_ada_testfile.
* gdb.ada/tasks.exp: Use standard_ada_testfile.
* gdb.ada/tick_last_segv.exp: Use standard_ada_testfile.
* gdb.ada/type_coercion.exp: Use standard_ada_testfile.
* gdb.ada/uninitialized_vars.exp: Use standard_ada_testfile.
* gdb.ada/variant_record_packed_array.exp: Use standard_ada_testfile.
* gdb.ada/watch_arg.exp: Use standard_ada_testfile.
* gdb.ada/whatis_array_val.exp: Use standard_ada_testfile.
* gdb.ada/widewide.exp: Use standard_ada_testfile.

73 files changed:
gdb/testsuite/ChangeLog
gdb/testsuite/gdb.ada/aliased_array.exp
gdb/testsuite/gdb.ada/array_bounds.exp
gdb/testsuite/gdb.ada/array_return.exp
gdb/testsuite/gdb.ada/array_subscript_addr.exp
gdb/testsuite/gdb.ada/arrayidx.exp
gdb/testsuite/gdb.ada/arrayparam.exp
gdb/testsuite/gdb.ada/arrayptr.exp
gdb/testsuite/gdb.ada/atomic_enum.exp
gdb/testsuite/gdb.ada/bad-task-bp-keyword.exp
gdb/testsuite/gdb.ada/bp_enum_homonym.exp
gdb/testsuite/gdb.ada/bp_on_var.exp
gdb/testsuite/gdb.ada/bp_range_type.exp
gdb/testsuite/gdb.ada/call_pn.exp
gdb/testsuite/gdb.ada/catch_ex.exp
gdb/testsuite/gdb.ada/char_enum.exp
gdb/testsuite/gdb.ada/char_param.exp
gdb/testsuite/gdb.ada/complete.exp
gdb/testsuite/gdb.ada/cond_lang.exp
gdb/testsuite/gdb.ada/dyn_loc.exp
gdb/testsuite/gdb.ada/enum_idx_packed.exp
gdb/testsuite/gdb.ada/exec_changed.exp
gdb/testsuite/gdb.ada/exprs.exp
gdb/testsuite/gdb.ada/fixed_cmp.exp
gdb/testsuite/gdb.ada/fixed_points.exp
gdb/testsuite/gdb.ada/formatted_ref.exp
gdb/testsuite/gdb.ada/frame_args.exp
gdb/testsuite/gdb.ada/fullname_bp.exp
gdb/testsuite/gdb.ada/fun_addr.exp
gdb/testsuite/gdb.ada/fun_in_declare.exp
gdb/testsuite/gdb.ada/funcall_param.exp
gdb/testsuite/gdb.ada/homonym.exp
gdb/testsuite/gdb.ada/info_locals_renaming.exp
gdb/testsuite/gdb.ada/int_deref.exp
gdb/testsuite/gdb.ada/interface.exp
gdb/testsuite/gdb.ada/lang_switch.exp
gdb/testsuite/gdb.ada/mi_catch_ex.exp
gdb/testsuite/gdb.ada/mi_task_arg.exp
gdb/testsuite/gdb.ada/mi_task_info.exp
gdb/testsuite/gdb.ada/mod_from_name.exp
gdb/testsuite/gdb.ada/nested.exp
gdb/testsuite/gdb.ada/null_array.exp
gdb/testsuite/gdb.ada/null_record.exp
gdb/testsuite/gdb.ada/operator_bp.exp
gdb/testsuite/gdb.ada/packed_array.exp
gdb/testsuite/gdb.ada/packed_tagged.exp
gdb/testsuite/gdb.ada/print_chars.exp
gdb/testsuite/gdb.ada/print_pc.exp
gdb/testsuite/gdb.ada/ptr_typedef.exp
gdb/testsuite/gdb.ada/ptype_field.exp
gdb/testsuite/gdb.ada/ptype_tagged_param.exp
gdb/testsuite/gdb.ada/rec_return.exp
gdb/testsuite/gdb.ada/ref_param.exp
gdb/testsuite/gdb.ada/ref_tick_size.exp
gdb/testsuite/gdb.ada/same_enum.exp
gdb/testsuite/gdb.ada/set_pckd_arr_elt.exp
gdb/testsuite/gdb.ada/small_reg_param.exp
gdb/testsuite/gdb.ada/start.exp
gdb/testsuite/gdb.ada/str_ref_cmp.exp
gdb/testsuite/gdb.ada/sym_print_name.exp
gdb/testsuite/gdb.ada/taft_type.exp
gdb/testsuite/gdb.ada/tagged.exp
gdb/testsuite/gdb.ada/tagged_not_init.exp
gdb/testsuite/gdb.ada/task_bp.exp
gdb/testsuite/gdb.ada/tasks.exp
gdb/testsuite/gdb.ada/tick_last_segv.exp
gdb/testsuite/gdb.ada/type_coercion.exp
gdb/testsuite/gdb.ada/uninitialized_vars.exp
gdb/testsuite/gdb.ada/variant_record_packed_array.exp
gdb/testsuite/gdb.ada/watch_arg.exp
gdb/testsuite/gdb.ada/whatis_array_val.exp
gdb/testsuite/gdb.ada/widewide.exp
gdb/testsuite/lib/ada.exp

index 4e67230..0c11c2b 100644 (file)
@@ -1,3 +1,81 @@
+2012-07-26  Tom Tromey  <tromey@redhat.com>
+
+       * lib/ada.exp (standard_ada_testfile): New proc.
+       * gdb.ada/aliased_array.exp: Use standard_ada_testfile.
+       * gdb.ada/array_bounds.exp: Use standard_ada_testfile.
+       * gdb.ada/array_return.exp: Use standard_ada_testfile.
+       * gdb.ada/array_subscript_addr.exp: Use standard_ada_testfile.
+       * gdb.ada/arrayidx.exp: Use standard_ada_testfile.
+       * gdb.ada/arrayparam.exp: Use standard_ada_testfile.
+       * gdb.ada/arrayptr.exp: Use standard_ada_testfile.
+       * gdb.ada/atomic_enum.exp: Use standard_ada_testfile.
+       * gdb.ada/bad-task-bp-keyword.exp: Use standard_ada_testfile.
+       * gdb.ada/bp_enum_homonym.exp: Use standard_ada_testfile.
+       * gdb.ada/bp_on_var.exp: Use standard_ada_testfile.
+       * gdb.ada/bp_range_type.exp: Use standard_ada_testfile.
+       * gdb.ada/call_pn.exp: Use standard_ada_testfile.
+       * gdb.ada/catch_ex.exp: Use standard_ada_testfile.
+       * gdb.ada/char_enum.exp: Use standard_ada_testfile.
+       * gdb.ada/char_param.exp: Use standard_ada_testfile.
+       * gdb.ada/complete.exp: Use standard_ada_testfile.
+       * gdb.ada/cond_lang.exp: Use standard_ada_testfile,
+       standard_output_file.
+       * gdb.ada/dyn_loc.exp: Use standard_ada_testfile.
+       * gdb.ada/enum_idx_packed.exp: Use standard_ada_testfile.
+       * gdb.ada/exec_changed.exp: Use standard_ada_testfile,
+       standard_output_file.
+       * gdb.ada/exprs.exp: Use standard_ada_testfile.
+       * gdb.ada/fixed_cmp.exp: Use standard_ada_testfile.
+       * gdb.ada/fixed_points.exp: Use standard_ada_testfile.
+       * gdb.ada/formatted_ref.exp: Use standard_ada_testfile.
+       * gdb.ada/frame_args.exp: Use standard_ada_testfile.
+       * gdb.ada/fullname_bp.exp: Use standard_ada_testfile.
+       * gdb.ada/fun_addr.exp: Use standard_ada_testfile.
+       * gdb.ada/fun_in_declare.exp: Use standard_ada_testfile.
+       * gdb.ada/funcall_param.exp: Use standard_ada_testfile.
+       * gdb.ada/homonym.exp: Use standard_ada_testfile.
+       * gdb.ada/info_locals_renaming.exp: Use standard_ada_testfile.
+       * gdb.ada/int_deref.exp: Use standard_ada_testfile.
+       * gdb.ada/interface.exp: Use standard_ada_testfile.
+       * gdb.ada/lang_switch.exp: Use standard_ada_testfile,
+       standard_output_file
+       * gdb.ada/mi_catch_ex.exp: Use standard_ada_testfile.
+       * gdb.ada/mi_task_arg.exp: Use standard_ada_testfile.
+       * gdb.ada/mi_task_info.exp: Use standard_ada_testfile.
+       * gdb.ada/mod_from_name.exp: Use standard_ada_testfile.
+       * gdb.ada/nested.exp: Use standard_ada_testfile.
+       * gdb.ada/null_array.exp: Use standard_ada_testfile.
+       * gdb.ada/null_record.exp: Use standard_ada_testfile.
+       * gdb.ada/operator_bp.exp: Use standard_ada_testfile.
+       * gdb.ada/packed_array.exp: Use standard_ada_testfile.
+       * gdb.ada/packed_tagged.exp: Use standard_ada_testfile.
+       * gdb.ada/print_chars.exp: Use standard_ada_testfile.
+       * gdb.ada/print_pc.exp: Use standard_ada_testfile.
+       * gdb.ada/ptr_typedef.exp: Use standard_ada_testfile.
+       * gdb.ada/ptype_field.exp: Use standard_ada_testfile.
+       * gdb.ada/ptype_tagged_param.exp: Use standard_ada_testfile.
+       * gdb.ada/rec_return.exp: Use standard_ada_testfile.
+       * gdb.ada/ref_param.exp: Use standard_ada_testfile.
+       * gdb.ada/ref_tick_size.exp: Use standard_ada_testfile.
+       * gdb.ada/same_enum.exp: Use standard_ada_testfile.
+       * gdb.ada/set_pckd_arr_elt.exp: Use standard_ada_testfile.
+       * gdb.ada/small_reg_param.exp: Use standard_ada_testfile.
+       * gdb.ada/start.exp: Use standard_ada_testfile.
+       * gdb.ada/str_ref_cmp.exp: Use standard_ada_testfile.
+       * gdb.ada/sym_print_name.exp: Use standard_ada_testfile.
+       * gdb.ada/taft_type.exp: Use standard_ada_testfile.
+       * gdb.ada/tagged.exp: Use standard_ada_testfile.
+       * gdb.ada/tagged_not_init.exp: Use standard_ada_testfile.
+       * gdb.ada/task_bp.exp: Use standard_ada_testfile.
+       * gdb.ada/tasks.exp: Use standard_ada_testfile.
+       * gdb.ada/tick_last_segv.exp: Use standard_ada_testfile.
+       * gdb.ada/type_coercion.exp: Use standard_ada_testfile.
+       * gdb.ada/uninitialized_vars.exp: Use standard_ada_testfile.
+       * gdb.ada/variant_record_packed_array.exp: Use standard_ada_testfile.
+       * gdb.ada/watch_arg.exp: Use standard_ada_testfile.
+       * gdb.ada/whatis_array_val.exp: Use standard_ada_testfile.
+       * gdb.ada/widewide.exp: Use standard_ada_testfile.
+
 2012-07-25  Jan Kratochvil  <jan.kratochvil@redhat.com>
 
        Fix testsuite regression after --use-deprecated-index-sections removal.
index 9fe30df..09bddf8 100644 (file)
@@ -17,12 +17,8 @@ load_lib "ada.exp"
 
 if { [skip_ada_tests] } { return -1 }
 
-set testdir "aliased_array"
-set testfile "${testdir}/foo"
-set srcfile ${srcdir}/${subdir}/${testfile}.adb
-set binfile ${objdir}/${subdir}/${testfile}
+standard_ada_testfile foo
 
-file mkdir ${objdir}/${subdir}/${testdir}
 if {[gdb_compile_ada "${srcfile}" "${binfile}" executable {debug}] != ""} {
     return -1
 }
index 493c7c3..104a492 100644 (file)
 
 load_lib "ada.exp"
 
-set testdir "array_bounds"
-set testfile "${testdir}/bar"
-set srcfile ${srcdir}/${subdir}/${testfile}.adb
-set binfile ${objdir}/${subdir}/${testfile}
+standard_ada_testfile bar
 
-file mkdir ${objdir}/${subdir}/${testdir}
 if {[gdb_compile_ada "${srcfile}" "${binfile}" executable [list debug ]] != "" } {
   return -1
 }
index c72f8cf..1d02e9e 100644 (file)
@@ -17,12 +17,8 @@ load_lib "ada.exp"
 
 if { [skip_ada_tests] } { return -1 }
 
-set testdir "array_return"
-set testfile "${testdir}/p"
-set srcfile ${srcdir}/${subdir}/${testfile}.adb
-set binfile ${objdir}/${subdir}/${testfile}
+standard_ada_testfile p
 
-file mkdir ${objdir}/${subdir}/${testdir}
 if {[gdb_compile_ada "${srcfile}" "${binfile}" executable {debug}] != ""} {
     return -1
 }
index aa10b27..5a04631 100644 (file)
 
 load_lib "ada.exp"
 
-set testdir "array_subscript_addr"
-set testfile "${testdir}/p"
-set srcfile ${srcdir}/${subdir}/${testfile}.adb
-set binfile ${objdir}/${subdir}/${testfile}
+standard_ada_testfile p
 
-file mkdir ${objdir}/${subdir}/${testdir}
 if {[gdb_compile_ada "${srcfile}" "${binfile}" executable [list debug]] != "" } {
   return -1
 }
index 5de1145..3045026 100644 (file)
@@ -17,12 +17,8 @@ load_lib "ada.exp"
 
 if { [skip_ada_tests] } { return -1 }
 
-set testdir "arrayidx"
-set testfile "${testdir}/p"
-set srcfile ${srcdir}/${subdir}/${testfile}.adb
-set binfile ${objdir}/${subdir}/${testfile}
+standard_ada_testfile p
 
-file mkdir ${objdir}/${subdir}/${testdir}
 if {[gdb_compile_ada "${srcfile}" "${binfile}" executable {debug}] != ""} {
     return -1
 }
index d1549df..b487797 100644 (file)
 
 load_lib "ada.exp"
 
-set testdir "arrayparam"
-set testfile "${testdir}/foo"
-set srcfile ${srcdir}/${subdir}/${testfile}.adb
-set binfile ${objdir}/${subdir}/${testfile}
+standard_ada_testfile foo
 
-file mkdir ${objdir}/${subdir}/${testdir}
 if {[gdb_compile_ada "${srcfile}" "${binfile}" executable [list debug]] != "" } {
   return -1
 }
index 192feb1..a317498 100644 (file)
 
 load_lib "ada.exp"
 
-set testdir "arrayptr"
-set testfile "${testdir}/foo"
-set srcfile ${srcdir}/${subdir}/${testfile}.adb
-set binfile ${objdir}/${subdir}/${testfile}
+standard_ada_testfile foo
 
-file mkdir ${objdir}/${subdir}/${testdir}
 if {[gdb_compile_ada "${srcfile}" "${binfile}" executable [list debug ]] != "" } {
   return -1
 }
index e0ac214..eb9269d 100644 (file)
 
 load_lib "ada.exp"
 
-set testdir "atomic_enum"
-set testfile "${testdir}/foo"
-set srcfile ${srcdir}/${subdir}/${testfile}.adb
-set binfile ${objdir}/${subdir}/${testfile}
+standard_ada_testfile foo
 
-file mkdir ${objdir}/${subdir}/${testdir}
 if {[gdb_compile_ada "${srcfile}" "${binfile}" executable [list debug additional_flags=-gnat05 ]] != "" } {
   return -1
 }
index 2d2c891..201079e 100644 (file)
 
 load_lib "ada.exp"
 
-set testdir "bad-task-bp-keyword"
-set testfile "${testdir}/foo"
-set srcfile ${srcdir}/${subdir}/${testfile}.adb
-set binfile ${objdir}/${subdir}/${testfile}
+standard_ada_testfile foo
 
-file mkdir ${objdir}/${subdir}/${testdir}
 if {[gdb_compile_ada "${srcfile}" "${binfile}" executable [list debug ]] != "" } {
   return -1
 }
index 5d6aa92..3f11c2f 100644 (file)
 
 load_lib "ada.exp"
 
-set testdir "bp_enum_homonym"
-set testfile "${testdir}/p"
-set srcfile ${srcdir}/${subdir}/${testfile}.adb
-set binfile ${objdir}/${subdir}/${testfile}
+standard_ada_testfile p
 
-file mkdir ${objdir}/${subdir}/${testdir}
 if {[gdb_compile_ada "${srcfile}" "${binfile}" executable [list debug ]] != "" } {
   return -1
 }
index 73b5cd7..dc56db5 100644 (file)
 
 load_lib "ada.exp"
 
-set testdir "bp_on_var"
-set testfile "${testdir}/foo"
-set srcfile ${srcdir}/${subdir}/${testfile}.adb
-set binfile ${objdir}/${subdir}/${testfile}
+standard_ada_testfile foo
 
-file mkdir ${objdir}/${subdir}/${testdir}
 if {[gdb_compile_ada "${srcfile}" "${binfile}" executable [list debug ]] != "" } {
   return -1
 }
index f65e0c7..057bf16 100644 (file)
 
 load_lib "ada.exp"
 
-set testdir "bp_range_type"
-set testfile "${testdir}/foo"
-set srcfile ${srcdir}/${subdir}/${testfile}.adb
-set binfile ${objdir}/${subdir}/${testfile}
+standard_ada_testfile foo
 
-file mkdir ${objdir}/${subdir}/${testdir}
 if {[gdb_compile_ada "${srcfile}" "${binfile}" executable [list debug ]] != "" } {
   return -1
 }
index 1b99252..0154997 100644 (file)
 
 load_lib "ada.exp"
 
-set testdir "call_pn"
-set testfile "${testdir}/foo"
-set srcfile ${srcdir}/${subdir}/${testfile}.adb
-set binfile ${objdir}/${subdir}/${testfile}
+standard_ada_testfile foo
 
-file mkdir ${objdir}/${subdir}/${testdir}
 if {[gdb_compile_ada "${srcfile}" "${binfile}" executable [list debug ]] != "" } {
   return -1
 }
index f132355..b5adb31 100644 (file)
 
 load_lib "ada.exp"
 
-set testdir "catch_ex"
-set testfile "${testdir}/foo"
-set srcfile ${srcdir}/${subdir}/${testfile}.adb
-set binfile ${objdir}/${subdir}/${testfile}
+standard_ada_testfile foo
 
-file mkdir ${objdir}/${subdir}/${testdir}
 if {[gdb_compile_ada "${srcfile}" "${binfile}" executable [list debug additional_flags=-gnata ]] != "" } {
   return -1
 }
index 4115ff3..e55ceb1 100644 (file)
 
 load_lib "ada.exp"
 
-set testdir "char_enum"
-set testfile "${testdir}/foo"
-set srcfile ${srcdir}/${subdir}/${testfile}.adb
-set binfile ${objdir}/${subdir}/${testfile}
+standard_ada_testfile foo
 
-file mkdir ${objdir}/${subdir}/${testdir}
 if {[gdb_compile_ada "${srcfile}" "${binfile}" executable [list debug ]] != "" } {
   return -1
 }
index e437721..773ad65 100644 (file)
 
 load_lib "ada.exp"
 
-set testdir "char_param"
-set testfile "${testdir}/foo"
-set srcfile ${srcdir}/${subdir}/${testfile}.adb
-set binfile ${objdir}/${subdir}/${testfile}
+standard_ada_testfile foo
 
-file mkdir ${objdir}/${subdir}/${testdir}
 if {[gdb_compile_ada "${srcfile}" "${binfile}" executable [list debug]] != "" } {
   return -1
 }
index 4a0f2b4..b748a8b 100644 (file)
 
 load_lib "ada.exp"
 
-set testdir "complete"
-set testfile "${testdir}/foo"
-set srcfile ${srcdir}/${subdir}/${testfile}.adb
-set binfile ${objdir}/${subdir}/${testfile}
+standard_ada_testfile foo
 
-file mkdir ${objdir}/${subdir}/${testdir}
 if {[gdb_compile_ada "${srcfile}" "${binfile}" executable [list debug ]] != "" } {
   return -1
 }
index b2aed95..68b3e9a 100644 (file)
 
 load_lib "ada.exp"
 
-set testdir "cond_lang"
-set testfile "${testdir}/a"
+standard_ada_testfile a
+
 set cfile "${testdir}/foo"
-set adasrcfile ${srcdir}/${subdir}/${testfile}.adb
 set csrcfile ${srcdir}/${subdir}/${cfile}.c
-set cobject  ${objdir}/${subdir}/${cfile}.o
-set binfile ${objdir}/${subdir}/${testfile}
+set cobject [standard_output_file ${cfile}.o]
 
-file mkdir ${objdir}/${subdir}/${testdir}
 gdb_compile "${csrcfile}" "${cobject}" object [list debug]
-if {[gdb_compile_ada "${adasrcfile}" "${binfile}" executable [list debug]] != "" } {
+if {[gdb_compile_ada "${srcfile}" "${binfile}" executable [list debug]] != "" } {
   return -1
 }
 
index 1f7b9c2..82fe8d1 100644 (file)
 
 load_lib "ada.exp"
 
-set testdir "dyn_loc"
-set testfile "${testdir}/p"
-set srcfile ${srcdir}/${subdir}/${testfile}.adb
-set binfile ${objdir}/${subdir}/${testfile}
+standard_ada_testfile p
 
-file mkdir ${objdir}/${subdir}/${testdir}
 if {[gdb_compile_ada "${srcfile}" "${binfile}" executable [list debug ]] != "" } {
   return -1
 }
index 61284bb..87bc168 100644 (file)
@@ -17,12 +17,8 @@ load_lib "ada.exp"
 
 if { [skip_ada_tests] } { return -1 }
 
-set testdir "enum_idx_packed"
-set testfile "${testdir}/foo"
-set srcfile ${srcdir}/${subdir}/${testfile}.adb
-set binfile ${objdir}/${subdir}/${testfile}
+standard_ada_testfile foo
 
-file mkdir ${objdir}/${subdir}/${testdir}
 if {[gdb_compile_ada "${srcfile}" "${binfile}" executable {debug}] != ""} {
     return -1
 }
index 4a3792b..583ee0a 100644 (file)
@@ -24,22 +24,17 @@ if [target_info exists use_gdb_stub] {
     return
 }
 
-set testdir "exec_changed"
-file mkdir ${objdir}/${subdir}/${testdir}
+standard_ada_testfile first
 
 # Build the first test program (note that cygwin needs the $EXEEXT).
-set testfile1 "${testdir}/first"
-set srcfile1 ${srcdir}/${subdir}/${testfile1}.adb
-set binfile1 ${objdir}/${subdir}/${testfile1}$EXEEXT
-
-if {[gdb_compile_ada "${srcfile1}" "${binfile1}" executable {debug}] != ""} {
+if {[gdb_compile_ada "${srcfile}" "${binfile}$EXEEXT" executable {debug}] != ""} {
     return -1
 }
 
 # Build the second test program
 set testfile2 "${testdir}/second"
 set srcfile2 ${srcdir}/${subdir}/${testfile2}.adb
-set binfile2 ${objdir}/${subdir}/${testfile2}$EXEEXT
+set binfile2 [standard_output_file ${testfile2}$EXEEXT]
 
 if {[gdb_compile_ada "${srcfile2}" "${binfile2}" executable {debug}] != ""} {
     return -1
@@ -47,16 +42,15 @@ if {[gdb_compile_ada "${srcfile2}" "${binfile2}" executable {debug}] != ""} {
 
 # Start with a fresh gdb.
 
-set testfile "${testdir}/common"
-set binfile ${objdir}/${subdir}/${testfile}$EXEEXT
+set common_binfile [standard_output_file ${testdir}/common$EXEEXT]
 
 gdb_start
 gdb_reinitialize_dir $srcdir/$subdir
 
 # Load the first executable.
 
-gdb_test "shell mv ${binfile1} ${binfile}" ".*" ""
-gdb_load ${binfile}
+gdb_test "shell mv ${binfile} ${common_binfile}" ".*" ""
+gdb_load ${common_binfile}
 
 # Start the program, we should land in the program main procedure
 if { [gdb_start_cmd] < 0 } {
@@ -72,10 +66,10 @@ gdb_test "" \
 # second executable into its place.  Ensure that the new
 # executable is at least a second newer than the old.
 
-gdb_test "shell mv ${binfile} ${binfile1}" ".*" ""
-gdb_test "shell mv ${binfile2} ${binfile}" ".*" ""
+gdb_test "shell mv ${common_binfile} ${binfile}" ".*" ""
+gdb_test "shell mv ${binfile2} ${common_binfile}" ".*" ""
 gdb_test "shell sleep 1" ".*" ""
-gdb_test "shell touch ${binfile}" ".*" ""
+gdb_test "shell touch ${common_binfile}" ".*" ""
 
 # Start the program a second time, GDB should land in procedure Second
 # this time.
index 764cd57..43d9bef 100644 (file)
 
 load_lib "ada.exp"
 
-set testdir "exprs"
-set testfile "${testdir}/p"
-set srcfile ${srcdir}/${subdir}/${testfile}.adb
-set binfile ${objdir}/${subdir}/${testfile}
+standard_ada_testfile p
 
-file mkdir ${objdir}/${subdir}/${testdir}
 if {[gdb_compile_ada "${srcfile}" "${binfile}" executable [list debug ]] != "" } {
   return -1
 }
index 1d0f960..8fdb6f1 100644 (file)
 
 load_lib "ada.exp"
 
-set testdir "fixed_cmp"
-set testfile "${testdir}/fixed"
-set srcfile ${srcdir}/${subdir}/${testfile}.adb
-set binfile ${objdir}/${subdir}/${testfile}
+standard_ada_testfile fixed
 
-file mkdir ${objdir}/${subdir}/${testdir}
 if {[gdb_compile_ada "${srcfile}" "${binfile}" executable [list debug ]] != "" } {
   return -1
 }
index d86a00b..b9e42ca 100644 (file)
@@ -17,12 +17,8 @@ load_lib "ada.exp"
 
 if { [skip_ada_tests] } { return -1 }
 
-set testdir "fixed_points"
-set testfile "${testdir}/fixed_points"
-set srcfile ${srcdir}/${subdir}/${testfile}.adb
-set binfile ${objdir}/${subdir}/${testfile}
+standard_ada_testfile fixed_points
 
-file mkdir ${objdir}/${subdir}/${testdir}
 if {[gdb_compile_ada "${srcfile}" "${binfile}" executable {debug}] != ""} {
     return -1
 }
index 8341dca..7858ffc 100644 (file)
 
 load_lib "ada.exp"
 
-set testdir "formatted_ref"
-set testfile "${testdir}/formatted_ref"
-set srcfile ${srcdir}/${subdir}/${testfile}.adb
-set binfile ${objdir}/${subdir}/${testfile}
+standard_ada_testfile formatted_ref
 
-
-file mkdir ${objdir}/${subdir}/${testdir}
 if {[gdb_compile_ada "${srcfile}" "${binfile}" executable [list debug ]] != "" } {
     untested formatted-ref.exp
     return -1
index 98c1a44..7f409a1 100644 (file)
 
 load_lib "ada.exp"
 
-set testdir "frame_args"
-set testfile "${testdir}/foo"
-set srcfile ${srcdir}/${subdir}/${testfile}.adb
-set binfile ${objdir}/${subdir}/${testfile}
+standard_ada_testfile foo
 
-file mkdir ${objdir}/${subdir}/${testdir}
 if {[gdb_compile_ada "${srcfile}" "${binfile}" executable [list debug ]] != "" } {
   return -1
 }
index 0cc4989..a092d84 100644 (file)
 
 load_lib "ada.exp"
 
-set testdir "fullname_bp"
-set testfile "${testdir}/foo"
-set srcfile ${srcdir}/${subdir}/${testfile}.adb
-set binfile ${objdir}/${subdir}/${testfile}
+standard_ada_testfile foo
 
-file mkdir ${objdir}/${subdir}/${testdir}
 if {[gdb_compile_ada "${srcfile}" "${binfile}" executable [list debug ]] != "" } {
   return -1
 }
index 9924995..ac945b3 100644 (file)
 
 load_lib "ada.exp"
 
-set testdir "fun_addr"
-set testfile "${testdir}/foo"
-set srcfile ${srcdir}/${subdir}/${testfile}.adb
-set binfile ${objdir}/${subdir}/${testfile}
+standard_ada_testfile foo
 
-file mkdir ${objdir}/${subdir}/${testdir}
 if {[gdb_compile_ada "${srcfile}" "${binfile}" executable [list debug ]] != "" } {
   return -1
 }
index b73c74a..64b680d 100644 (file)
 
 load_lib "ada.exp"
 
-set testdir "fun_in_declare"
-set testfile "${testdir}/foo"
-set srcfile ${srcdir}/${subdir}/${testfile}.adb
-set binfile ${objdir}/${subdir}/${testfile}
+standard_ada_testfile foo
 
-file mkdir ${objdir}/${subdir}/${testdir}
 if {[gdb_compile_ada "${srcfile}" "${binfile}" executable [list debug ]] != "" } {
   return -1
 }
index ac0da83..757071c 100644 (file)
 
 load_lib "ada.exp"
 
-set testdir "funcall_param"
-set testfile "${testdir}/foo"
-set srcfile ${srcdir}/${subdir}/${testfile}.adb
-set binfile ${objdir}/${subdir}/${testfile}
+standard_ada_testfile foo
 
-file mkdir ${objdir}/${subdir}/${testdir}
 if {[gdb_compile_ada "${srcfile}" "${binfile}" executable [list debug]] != "" } {
   return -1
 }
index a81135a..21ab66b 100644 (file)
 
 load_lib "ada.exp"
 
-set testdir "homonym"
-set testfile "${testdir}/homonym_main"
-set srcfile ${srcdir}/${subdir}/${testfile}.adb
-set binfile ${objdir}/${subdir}/${testfile}
+standard_ada_testfile homonym_main
 
-file mkdir ${objdir}/${subdir}/${testdir}
 if {[gdb_compile_ada "${srcfile}" "${binfile}" executable [list debug]] != "" } {
   return -1
 }
index a8c6469..8655c75 100644 (file)
@@ -17,12 +17,8 @@ load_lib "ada.exp"
 
 if { [skip_ada_tests] } { return -1 }
 
-set testdir "info_locals_renaming"
-set testfile "${testdir}/foo"
-set srcfile ${srcdir}/${subdir}/${testfile}.adb
-set binfile ${objdir}/${subdir}/${testfile}
+standard_ada_testfile foo
 
-file mkdir ${objdir}/${subdir}/${testdir}
 if {[gdb_compile_ada "${srcfile}" "${binfile}" executable {debug}] != ""} {
     return -1
 }
index 51705bc..5a95fed 100644 (file)
 
 load_lib "ada.exp"
 
-set testdir "int_deref"
-set testfile "${testdir}/foo"
-set srcfile ${srcdir}/${subdir}/${testfile}.adb
-set binfile ${objdir}/${subdir}/${testfile}
+standard_ada_testfile foo
 
-file mkdir ${objdir}/${subdir}/${testdir}
 if {[gdb_compile_ada "${srcfile}" "${binfile}" executable [list debug]] != "" } {
   return -1
 }
index ae21a53..ede2f68 100644 (file)
 
 load_lib "ada.exp"
 
-set testdir "interface"
-set testfile "${testdir}/foo"
-set srcfile ${srcdir}/${subdir}/${testfile}.adb
-set binfile ${objdir}/${subdir}/${testfile}
+standard_ada_testfile foo
 
-file mkdir ${objdir}/${subdir}/${testdir}
 if {[gdb_compile_ada "${srcfile}" "${binfile}" executable [list debug additional_flags=-gnat05 ]] != "" } {
   return -1
 }
index 9e14687..6ee4c23 100644 (file)
 
 load_lib "ada.exp"
 
-set testdir "lang_switch"
-set testfile "${testdir}/lang_switch"
+standard_ada_testfile lang_switch
 set cfile "${testdir}/foo"
-set adasrcfile ${srcdir}/${subdir}/${testfile}.adb
 set csrcfile ${srcdir}/${subdir}/${cfile}.c
-set cobject  ${objdir}/${subdir}/${cfile}.o
-set binfile ${objdir}/${subdir}/${testfile}
+set cobject [standard_output_file ${cfile}.o]
 
-file mkdir ${objdir}/${subdir}/${testdir}
 gdb_compile "${csrcfile}" "${cobject}" object [list debug]
-if {[gdb_compile_ada "${adasrcfile}" "${binfile}" executable [list debug]] != "" } {
+if {[gdb_compile_ada "${srcfile}" "${binfile}" executable [list debug]] != "" } {
   return -1
 }
 
index 8d140b2..4bbbf5a 100644 (file)
 
 load_lib "ada.exp"
 
-set testdir "mi_catch_ex"
-set testfile "${testdir}/foo"
-set srcfile ${srcdir}/${subdir}/${testfile}.adb
-set binfile ${objdir}/${subdir}/${testfile}
+standard_ada_testfile foo
 
-file mkdir ${objdir}/${subdir}/${testdir}
 if {[gdb_compile_ada "${srcfile}" "${binfile}" executable [list debug additional_flags=-gnata ]] != "" } {
   return -1
 }
index 0b2013c..efafed2 100644 (file)
 
 load_lib "ada.exp"
 
-set testdir "mi_task_arg"
-set testfile "${testdir}/task_switch"
-set srcfile ${srcdir}/${subdir}/${testfile}.adb
-set binfile ${objdir}/${subdir}/${testfile}
+standard_ada_testfile task_switch
 
-file mkdir ${objdir}/${subdir}/${testdir}
 if {[gdb_compile_ada "${srcfile}" "${binfile}" executable [list debug additional_flags=-gnata ]] != "" } {
   return -1
 }
index 22e3375..9625e98 100644 (file)
 
 load_lib "ada.exp"
 
-set testdir "mi_task_info"
-set testfile "${testdir}/task_switch"
-set srcfile ${srcdir}/${subdir}/${testfile}.adb
-set binfile ${objdir}/${subdir}/${testfile}
+standard_ada_testfile task_switch
 
-file mkdir ${objdir}/${subdir}/${testdir}
 if {[gdb_compile_ada "${srcfile}" "${binfile}" executable [list debug additional_flags=-gnata ]] != "" } {
   return -1
 }
index fe97245..ab1b2ca 100644 (file)
 
 load_lib "ada.exp"
 
-set testdir "mod_from_name"
-set testfile "${testdir}/foo"
-set srcfile ${srcdir}/${subdir}/${testfile}.adb
-set binfile ${objdir}/${subdir}/${testfile}
+standard_ada_testfile foo
 
-file mkdir ${objdir}/${subdir}/${testdir}
 if {[gdb_compile_ada "${srcfile}" "${binfile}" executable [list debug ]] != "" } {
   return -1
 }
index 079577b..33ea521 100644 (file)
 
 load_lib "ada.exp"
 
-set testdir "nested"
-set testfile "${testdir}/hello"
-set srcfile ${srcdir}/${subdir}/${testfile}.adb
-set binfile ${objdir}/${subdir}/${testfile}
+standard_ada_testfile hello
 
-file mkdir ${objdir}/${subdir}/${testdir}
 if {[gdb_compile_ada "${srcfile}" "${binfile}" executable [list debug ]] != "" } {
   return -1
 }
index 4a05418..22bc629 100644 (file)
 
 load_lib "ada.exp"
 
-set testdir "null_array"
-set testfile "${testdir}/foo"
-set srcfile ${srcdir}/${subdir}/${testfile}.adb
-set binfile ${objdir}/${subdir}/${testfile}
+standard_ada_testfile foo
 
-file mkdir ${objdir}/${subdir}/${testdir}
 if {[gdb_compile_ada "${srcfile}" "${binfile}" executable [list debug]] != "" } {
   return -1
 }
index 97508b2..af12b7e 100644 (file)
@@ -17,12 +17,8 @@ load_lib "ada.exp"
 
 if { [skip_ada_tests] } { return -1 }
 
-set testdir "null_record"
-set testfile "${testdir}/null_record"
-set srcfile ${srcdir}/${subdir}/${testfile}.adb
-set binfile ${objdir}/${subdir}/${testfile}
+standard_ada_testfile null_record
 
-file mkdir ${objdir}/${subdir}/${testdir}
 if {[gdb_compile_ada "${srcfile}" "${binfile}" executable {debug}] != ""} {
     return -1
 }
index 18cf46d..b0386f5 100644 (file)
@@ -17,12 +17,8 @@ load_lib "ada.exp"
 
 if { [skip_ada_tests] } { return -1 }
 
-set testdir "operator_bp"
-set testfile "${testdir}/ops_test"
-set srcfile ${srcdir}/${subdir}/${testfile}.adb
-set binfile ${objdir}/${subdir}/${testfile}
+standard_ada_testfile ops_test
 
-file mkdir ${objdir}/${subdir}/${testdir}
 if {[gdb_compile_ada "${srcfile}" "${binfile}" executable {debug}] != ""} {
     return -1
 }
index 678639c..ef7b4d5 100644 (file)
@@ -17,12 +17,8 @@ load_lib "ada.exp"
 
 if { [skip_ada_tests] } { return -1 }
 
-set testdir "packed_array"
-set testfile "${testdir}/pa"
-set srcfile ${srcdir}/${subdir}/${testfile}.adb
-set binfile ${objdir}/${subdir}/${testfile}
+standard_ada_testfile pa
 
-file mkdir ${objdir}/${subdir}/${testdir}
 if {[gdb_compile_ada "${srcfile}" "${binfile}" executable {debug}] != ""} {
     return -1
 }
index 3cf8a28..9ddc0a8 100644 (file)
 
 load_lib "ada.exp"
 
-set testdir "packed_tagged"
-set testfile "${testdir}/comp_bug"
-set srcfile ${srcdir}/${subdir}/${testfile}.adb
-set binfile ${objdir}/${subdir}/${testfile}
+standard_ada_testfile comp_bug
 
-file mkdir ${objdir}/${subdir}/${testdir}
 if {[gdb_compile_ada "${srcfile}" "${binfile}" executable [list debug]] != "" } {
   return -1
 }
index 35dfcc6..76bfa16 100644 (file)
 
 load_lib "ada.exp"
 
-set testdir "print_chars"
-set testfile "${testdir}/foo"
-set srcfile ${srcdir}/${subdir}/${testfile}.adb
-set binfile ${objdir}/${subdir}/${testfile}
+standard_ada_testfile foo
 
-file mkdir ${objdir}/${subdir}/${testdir}
 if {[gdb_compile_ada "${srcfile}" "${binfile}" executable [list debug additional_flags=-gnat05 ]] != "" } {
   return -1
 }
index 371dd51..fe5a559 100644 (file)
 
 load_lib "ada.exp"
 
-set testdir "start"
-set testfile "${testdir}/dummy"
-set srcfile ${srcdir}/${subdir}/${testfile}.adb
-set binfile ${objdir}/${subdir}/${testfile}
+standard_ada_testfile dummy start
 
-file mkdir ${objdir}/${subdir}/${testdir}
 if {[gdb_compile_ada "${srcfile}" "${binfile}" executable [list debug ]] != "" } {
   return -1
 }
index 8a3a4c7..ce6dd42 100644 (file)
 
 load_lib "ada.exp"
 
-set testdir "ptr_typedef"
-set testfile "${testdir}/foo"
-set srcfile ${srcdir}/${subdir}/${testfile}.adb
-set binfile ${objdir}/${subdir}/${testfile}
+standard_ada_testfile foo
 
-file mkdir ${objdir}/${subdir}/${testdir}
 if {[gdb_compile_ada "${srcfile}" "${binfile}" executable [list debug ]] != "" } {
   return -1
 }
index 03f8d8f..1ca94e8 100644 (file)
 
 load_lib "ada.exp"
 
-set testdir "ptype_field"
-set testfile "${testdir}/foo"
-set srcfile ${srcdir}/${subdir}/${testfile}.adb
-set binfile ${objdir}/${subdir}/${testfile}
+standard_ada_testfile foo
 
-file mkdir ${objdir}/${subdir}/${testdir}
 if {[gdb_compile_ada "${srcfile}" "${binfile}" executable [list debug additional_flags=-gnat05 ]] != "" } {
   return -1
 }
index d710729..e538b98 100644 (file)
 
 load_lib "ada.exp"
 
-set testdir "ptype_tagged_param"
-set testfile "${testdir}/foo"
-set srcfile ${srcdir}/${subdir}/${testfile}.adb
-set binfile ${objdir}/${subdir}/${testfile}
+standard_ada_testfile foo
 
-file mkdir ${objdir}/${subdir}/${testdir}
 if {[gdb_compile_ada "${srcfile}" "${binfile}" executable [list debug ]] != "" } {
   return -1
 }
index 06fe4e6..82d52ac 100644 (file)
 
 load_lib "ada.exp"
 
-set testdir "rec_return"
-set testfile "${testdir}/foo"
-set srcfile ${srcdir}/${subdir}/${testfile}.adb
-set binfile ${objdir}/${subdir}/${testfile}
+standard_ada_testfile foo
 
-file mkdir ${objdir}/${subdir}/${testdir}
 if {[gdb_compile_ada "${srcfile}" "${binfile}" executable [list debug ]] != "" } {
   return -1
 }
index 82fcc61..9d0a3a6 100644 (file)
 
 load_lib "ada.exp"
 
-set testdir "ref_param"
-set testfile "${testdir}/foo"
-set srcfile ${srcdir}/${subdir}/${testfile}.adb
-set binfile ${objdir}/${subdir}/${testfile}
+standard_ada_testfile foo
 
-file mkdir ${objdir}/${subdir}/${testdir}
 if {[gdb_compile_ada "${srcfile}" "${binfile}" executable [list debug ]] != "" } {
   return -1
 }
index 8036723..f71729b 100644 (file)
 
 load_lib "ada.exp"
 
-set testdir "ref_tick_size"
-set testfile "${testdir}/p"
-set srcfile ${srcdir}/${subdir}/${testfile}.adb
-set binfile ${objdir}/${subdir}/${testfile}
+standard_ada_testfile p
 
-file mkdir ${objdir}/${subdir}/${testdir}
 if {[gdb_compile_ada "${srcfile}" "${binfile}" executable [list debug]] != "" } {
   return -1
 }
index e9f1991..aa8826d 100644 (file)
 
 load_lib "ada.exp"
 
-set testdir "same_enum"
-set testfile "${testdir}/a"
-set srcfile ${srcdir}/${subdir}/${testfile}.adb
-set binfile ${objdir}/${subdir}/${testfile}
+standard_ada_testfile a
 
-file mkdir ${objdir}/${subdir}/${testdir}
 if {[gdb_compile_ada "${srcfile}" "${binfile}" executable [list debug ]] != "" } {
   return -1
 }
index 7f6f1d3..6539535 100644 (file)
@@ -17,12 +17,8 @@ load_lib "ada.exp"
 
 if { [skip_ada_tests] } { return -1 }
 
-set testdir "set_pckd_arr_elt"
-set testfile "${testdir}/foo"
-set srcfile ${srcdir}/${subdir}/${testfile}.adb
-set binfile ${objdir}/${subdir}/${testfile}
+standard_ada_testfile foo
 
-file mkdir ${objdir}/${subdir}/${testdir}
 if {[gdb_compile_ada "${srcfile}" "${binfile}" executable {debug}] != ""} {
     return -1
 }
index c8ab9cf..77d830f 100644 (file)
 
 load_lib "ada.exp"
 
-set testdir "small_reg_param"
-set testfile "${testdir}/foo"
-set srcfile ${srcdir}/${subdir}/${testfile}.adb
-set binfile ${objdir}/${subdir}/${testfile}
+standard_ada_testfile foo
 
-file mkdir ${objdir}/${subdir}/${testdir}
 if {[gdb_compile_ada "${srcfile}" "${binfile}" executable [list debug optimize=-O1]] != "" } {
   return -1
 }
index 6ba180d..7ccd171 100644 (file)
@@ -24,12 +24,8 @@ if [target_info exists use_gdb_stub] {
     return
 }
 
-set testdir "start"
-set testfile "${testdir}/dummy"
-set srcfile ${srcdir}/${subdir}/${testfile}.adb
-set binfile ${objdir}/${subdir}/${testfile}
+standard_ada_testfile dummy
 
-file mkdir ${objdir}/${subdir}/${testdir}
 if {[gdb_compile_ada "${srcfile}" "${binfile}" executable {debug}] != ""} {
     return -1
 }
index b0db6aa..6f24037 100644 (file)
 
 load_lib "ada.exp"
 
-set testdir "str_ref_cmp"
-set testfile "${testdir}/foo"
-set srcfile ${srcdir}/${subdir}/${testfile}.adb
-set binfile ${objdir}/${subdir}/${testfile}
+standard_ada_testfile foo
 
-file mkdir ${objdir}/${subdir}/${testdir}
 if {[gdb_compile_ada "${srcfile}" "${binfile}" executable [list debug]] != "" } {
   return -1
 }
index 7a8765a..73b89e1 100644 (file)
 
 load_lib "ada.exp"
 
-set testdir "sym_print_name"
-set testfile "${testdir}/foo"
-set srcfile ${srcdir}/${subdir}/${testfile}.adb
-set binfile ${objdir}/${subdir}/${testfile}
+standard_ada_testfile foo
 
-file mkdir ${objdir}/${subdir}/${testdir}
 if {[gdb_compile_ada "${srcfile}" "${binfile}" executable [list debug]] != "" } {
   return -1
 }
index b934ccc..cc14d48 100644 (file)
 
 load_lib "ada.exp"
 
-set testdir "taft_type"
-set testfile "${testdir}/p"
-set srcfile ${srcdir}/${subdir}/${testfile}.adb
-set binfile ${objdir}/${subdir}/${testfile}
+standard_ada_testfile p
 
-file mkdir ${objdir}/${subdir}/${testdir}
 if {[gdb_compile_ada "${srcfile}" "${binfile}" executable [list debug ]] != "" } {
   return -1
 }
index 6cc316e..dcfe978 100644 (file)
 
 load_lib "ada.exp"
 
-set testdir "tagged"
-set testfile "${testdir}/foo"
-set srcfile ${srcdir}/${subdir}/${testfile}.adb
-set binfile ${objdir}/${subdir}/${testfile}
+standard_ada_testfile foo
 
-file mkdir ${objdir}/${subdir}/${testdir}
 if {[gdb_compile_ada "${srcfile}" "${binfile}" executable [list debug]] != "" } {
   return -1
 }
index 013d76a..1113096 100644 (file)
@@ -17,12 +17,8 @@ load_lib "ada.exp"
 
 if { [skip_ada_tests] } { return -1 }
 
-set testdir "tagged_not_init"
-set testfile "${testdir}/foo"
-set srcfile ${srcdir}/${subdir}/${testfile}.adb
-set binfile ${objdir}/${subdir}/${testfile}
+standard_ada_testfile foo
 
-file mkdir ${objdir}/${subdir}/${testdir}
 if {[gdb_compile_ada "${srcfile}" "${binfile}" executable {debug}] != ""} {
     return -1
 }
index 11bdfac..1887bbd 100644 (file)
 
 load_lib "ada.exp"
 
-set testdir "task_bp"
-set testfile "${testdir}/foo"
-set srcfile ${srcdir}/${subdir}/${testfile}.adb
-set binfile ${objdir}/${subdir}/${testfile}
+standard_ada_testfile foo
 
-file mkdir ${objdir}/${subdir}/${testdir}
 if {[gdb_compile_ada "${srcfile}" "${binfile}" executable [list debug]] != "" } {
   return -1
 }
index 46a77ff..2807e2d 100644 (file)
 
 load_lib "ada.exp"
 
-set testdir "tasks"
-set testfile "${testdir}/foo"
-set srcfile ${srcdir}/${subdir}/${testfile}.adb
-set binfile ${objdir}/${subdir}/${testfile}
+standard_ada_testfile foo
 
-file mkdir ${objdir}/${subdir}/${testdir}
 if {[gdb_compile_ada "${srcfile}" "${binfile}" executable [list debug ]] != "" } {
   return -1
 }
index ce6782f..bcde512 100644 (file)
 
 load_lib "ada.exp"
 
-set testdir "tick_last_segv"
-set testfile "${testdir}/foo"
-set srcfile ${srcdir}/${subdir}/${testfile}.adb
-set binfile ${objdir}/${subdir}/${testfile}
+standard_ada_testfile foo
 
-file mkdir ${objdir}/${subdir}/${testdir}
 if {[gdb_compile_ada "${srcfile}" "${binfile}" executable [list debug ]] != "" } {
   return -1
 }
index 32b4136..cb060cf 100644 (file)
 
 load_lib "ada.exp"
 
-set testdir "type_coercion"
-set testfile "${testdir}/assign"
-set srcfile ${srcdir}/${subdir}/${testfile}.adb
-set binfile ${objdir}/${subdir}/${testfile}
+standard_ada_testfile assign
 
-file mkdir ${objdir}/${subdir}/${testdir}
 if {[gdb_compile_ada "${srcfile}" "${binfile}" executable [list debug]] != "" } {
   return -1
 }
index 0ce240e..412a285 100644 (file)
 
 load_lib "ada.exp"
 
-set testdir "uninitialized_vars"
-set testfile "${testdir}/parse"
-set srcfile ${srcdir}/${subdir}/${testfile}.adb
-set binfile ${objdir}/${subdir}/${testfile}
+standard_ada_testfile parse
 
-file mkdir ${objdir}/${subdir}/${testdir}
 if {[gdb_compile_ada "${srcfile}" "${binfile}" executable [list debug]] != "" } {
   return -1
 }
index 34bd3de..4df72ee 100644 (file)
 
 load_lib "ada.exp"
 
-set testdir "variant_record_packed_array"
-set testfile "${testdir}/foo"
-set srcfile ${srcdir}/${subdir}/${testfile}.adb
-set binfile ${objdir}/${subdir}/${testfile}
+standard_ada_testfile foo
 
-file mkdir ${objdir}/${subdir}/${testdir}
 if {[gdb_compile_ada "${srcfile}" "${binfile}" executable [list debug ]] != "" } {
   return -1
 }
index 1cb9eca..b7b2156 100644 (file)
@@ -17,12 +17,8 @@ load_lib "ada.exp"
 
 if { [skip_ada_tests] } { return -1 }
 
-set testdir "watch_arg"
-set testfile "${testdir}/watch"
-set srcfile ${srcdir}/${subdir}/${testfile}.adb
-set binfile ${objdir}/${subdir}/${testfile}
+standard_ada_testfile watch
 
-file mkdir ${objdir}/${subdir}/${testdir}
 if {[gdb_compile_ada "${srcfile}" "${binfile}" executable {debug}] != ""} {
     return -1
 }
index e937f0a..0ac8d16 100644 (file)
 
 load_lib "ada.exp"
 
-set testdir "whatis_array_val"
-set testfile "${testdir}/foo"
-set srcfile ${srcdir}/${subdir}/${testfile}.adb
-set binfile ${objdir}/${subdir}/${testfile}
+standard_ada_testfile foo
 
-file mkdir ${objdir}/${subdir}/${testdir}
 if {[gdb_compile_ada "${srcfile}" "${binfile}" executable [list debug ]] != "" } {
   return -1
 }
index dbc5e5b..ff7231a 100644 (file)
 
 load_lib "ada.exp"
 
-set testdir "widewide"
-set testfile "${testdir}/foo"
-set srcfile ${srcdir}/${subdir}/${testfile}.adb
-set binfile ${objdir}/${subdir}/${testfile}
+standard_ada_testfile foo
 
-file mkdir ${objdir}/${subdir}/${testdir}
 if {[gdb_compile_ada "${srcfile}" "${binfile}" executable [list debug ]] != "" } {
   return -1
 }
index 5845c1a..612bfef 100644 (file)
@@ -38,3 +38,25 @@ proc gdb_compile_ada {source dest type options} {
     return $result
 }
 
+# Like standard_testfile, but for Ada.  Historically the Ada tests
+# used a different naming convention from many of the other gdb tests,
+# and this difference was preserved during the conversion to
+# standard_testfile.  DIR defaults to the base name of the test case;
+# but can be overridden to find sources in a different subdirectory of
+# gdb.ada.
+
+proc standard_ada_testfile {base_file {dir ""}} {
+    global gdb_test_file_name srcdir subdir
+    global testdir testfile srcfile binfile
+
+    if {$dir == ""} {
+       set testdir $gdb_test_file_name
+    } else {
+       set testdir $dir
+    }
+    set testfile $testdir/$base_file
+    set srcfile $srcdir/$subdir/$testfile.adb
+    set binfile [standard_output_file $testfile]
+
+    file mkdir [standard_output_file $testdir]
+}