From 8223e12c0883caa58d81f5ff6b7f1a17c7a53120 Mon Sep 17 00:00:00 2001 From: Tom Tromey Date: Thu, 26 Jul 2012 18:43:02 +0000 Subject: [PATCH] * 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. --- gdb/testsuite/ChangeLog | 78 +++++++++++++++++++ gdb/testsuite/gdb.ada/aliased_array.exp | 6 +- gdb/testsuite/gdb.ada/array_bounds.exp | 6 +- gdb/testsuite/gdb.ada/array_return.exp | 6 +- .../gdb.ada/array_subscript_addr.exp | 6 +- gdb/testsuite/gdb.ada/arrayidx.exp | 6 +- gdb/testsuite/gdb.ada/arrayparam.exp | 6 +- gdb/testsuite/gdb.ada/arrayptr.exp | 6 +- gdb/testsuite/gdb.ada/atomic_enum.exp | 6 +- gdb/testsuite/gdb.ada/bad-task-bp-keyword.exp | 6 +- gdb/testsuite/gdb.ada/bp_enum_homonym.exp | 6 +- gdb/testsuite/gdb.ada/bp_on_var.exp | 6 +- gdb/testsuite/gdb.ada/bp_range_type.exp | 6 +- gdb/testsuite/gdb.ada/call_pn.exp | 6 +- gdb/testsuite/gdb.ada/catch_ex.exp | 6 +- gdb/testsuite/gdb.ada/char_enum.exp | 6 +- gdb/testsuite/gdb.ada/char_param.exp | 6 +- gdb/testsuite/gdb.ada/complete.exp | 6 +- gdb/testsuite/gdb.ada/cond_lang.exp | 11 +-- gdb/testsuite/gdb.ada/dyn_loc.exp | 6 +- gdb/testsuite/gdb.ada/enum_idx_packed.exp | 6 +- gdb/testsuite/gdb.ada/exec_changed.exp | 24 +++--- gdb/testsuite/gdb.ada/exprs.exp | 6 +- gdb/testsuite/gdb.ada/fixed_cmp.exp | 6 +- gdb/testsuite/gdb.ada/fixed_points.exp | 6 +- gdb/testsuite/gdb.ada/formatted_ref.exp | 7 +- gdb/testsuite/gdb.ada/frame_args.exp | 6 +- gdb/testsuite/gdb.ada/fullname_bp.exp | 6 +- gdb/testsuite/gdb.ada/fun_addr.exp | 6 +- gdb/testsuite/gdb.ada/fun_in_declare.exp | 6 +- gdb/testsuite/gdb.ada/funcall_param.exp | 6 +- gdb/testsuite/gdb.ada/homonym.exp | 6 +- .../gdb.ada/info_locals_renaming.exp | 6 +- gdb/testsuite/gdb.ada/int_deref.exp | 6 +- gdb/testsuite/gdb.ada/interface.exp | 6 +- gdb/testsuite/gdb.ada/lang_switch.exp | 10 +-- gdb/testsuite/gdb.ada/mi_catch_ex.exp | 6 +- gdb/testsuite/gdb.ada/mi_task_arg.exp | 6 +- gdb/testsuite/gdb.ada/mi_task_info.exp | 6 +- gdb/testsuite/gdb.ada/mod_from_name.exp | 6 +- gdb/testsuite/gdb.ada/nested.exp | 6 +- gdb/testsuite/gdb.ada/null_array.exp | 6 +- gdb/testsuite/gdb.ada/null_record.exp | 6 +- gdb/testsuite/gdb.ada/operator_bp.exp | 6 +- gdb/testsuite/gdb.ada/packed_array.exp | 6 +- gdb/testsuite/gdb.ada/packed_tagged.exp | 6 +- gdb/testsuite/gdb.ada/print_chars.exp | 6 +- gdb/testsuite/gdb.ada/print_pc.exp | 6 +- gdb/testsuite/gdb.ada/ptr_typedef.exp | 6 +- gdb/testsuite/gdb.ada/ptype_field.exp | 6 +- gdb/testsuite/gdb.ada/ptype_tagged_param.exp | 6 +- gdb/testsuite/gdb.ada/rec_return.exp | 6 +- gdb/testsuite/gdb.ada/ref_param.exp | 6 +- gdb/testsuite/gdb.ada/ref_tick_size.exp | 6 +- gdb/testsuite/gdb.ada/same_enum.exp | 6 +- gdb/testsuite/gdb.ada/set_pckd_arr_elt.exp | 6 +- gdb/testsuite/gdb.ada/small_reg_param.exp | 6 +- gdb/testsuite/gdb.ada/start.exp | 6 +- gdb/testsuite/gdb.ada/str_ref_cmp.exp | 6 +- gdb/testsuite/gdb.ada/sym_print_name.exp | 6 +- gdb/testsuite/gdb.ada/taft_type.exp | 6 +- gdb/testsuite/gdb.ada/tagged.exp | 6 +- gdb/testsuite/gdb.ada/tagged_not_init.exp | 6 +- gdb/testsuite/gdb.ada/task_bp.exp | 6 +- gdb/testsuite/gdb.ada/tasks.exp | 6 +- gdb/testsuite/gdb.ada/tick_last_segv.exp | 6 +- gdb/testsuite/gdb.ada/type_coercion.exp | 6 +- gdb/testsuite/gdb.ada/uninitialized_vars.exp | 6 +- .../gdb.ada/variant_record_packed_array.exp | 6 +- gdb/testsuite/gdb.ada/watch_arg.exp | 6 +- gdb/testsuite/gdb.ada/whatis_array_val.exp | 6 +- gdb/testsuite/gdb.ada/widewide.exp | 6 +- gdb/testsuite/lib/ada.exp | 22 ++++++ 73 files changed, 184 insertions(+), 370 deletions(-) diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index 4e6723071bc..0c11c2b4a36 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,3 +1,81 @@ +2012-07-26 Tom Tromey + + * 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 Fix testsuite regression after --use-deprecated-index-sections removal. diff --git a/gdb/testsuite/gdb.ada/aliased_array.exp b/gdb/testsuite/gdb.ada/aliased_array.exp index 9fe30df9cde..09bddf88763 100644 --- a/gdb/testsuite/gdb.ada/aliased_array.exp +++ b/gdb/testsuite/gdb.ada/aliased_array.exp @@ -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 } diff --git a/gdb/testsuite/gdb.ada/array_bounds.exp b/gdb/testsuite/gdb.ada/array_bounds.exp index 493c7c3c606..104a492b8ae 100644 --- a/gdb/testsuite/gdb.ada/array_bounds.exp +++ b/gdb/testsuite/gdb.ada/array_bounds.exp @@ -15,12 +15,8 @@ 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 } diff --git a/gdb/testsuite/gdb.ada/array_return.exp b/gdb/testsuite/gdb.ada/array_return.exp index c72f8cfbc02..1d02e9e8b5e 100644 --- a/gdb/testsuite/gdb.ada/array_return.exp +++ b/gdb/testsuite/gdb.ada/array_return.exp @@ -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 } diff --git a/gdb/testsuite/gdb.ada/array_subscript_addr.exp b/gdb/testsuite/gdb.ada/array_subscript_addr.exp index aa10b272656..5a04631f8d5 100644 --- a/gdb/testsuite/gdb.ada/array_subscript_addr.exp +++ b/gdb/testsuite/gdb.ada/array_subscript_addr.exp @@ -15,12 +15,8 @@ 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 } diff --git a/gdb/testsuite/gdb.ada/arrayidx.exp b/gdb/testsuite/gdb.ada/arrayidx.exp index 5de1145098d..30450262a23 100644 --- a/gdb/testsuite/gdb.ada/arrayidx.exp +++ b/gdb/testsuite/gdb.ada/arrayidx.exp @@ -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 } diff --git a/gdb/testsuite/gdb.ada/arrayparam.exp b/gdb/testsuite/gdb.ada/arrayparam.exp index d1549df2719..b487797997d 100644 --- a/gdb/testsuite/gdb.ada/arrayparam.exp +++ b/gdb/testsuite/gdb.ada/arrayparam.exp @@ -15,12 +15,8 @@ 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 } diff --git a/gdb/testsuite/gdb.ada/arrayptr.exp b/gdb/testsuite/gdb.ada/arrayptr.exp index 192feb12f15..a31749863ce 100644 --- a/gdb/testsuite/gdb.ada/arrayptr.exp +++ b/gdb/testsuite/gdb.ada/arrayptr.exp @@ -15,12 +15,8 @@ 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 } diff --git a/gdb/testsuite/gdb.ada/atomic_enum.exp b/gdb/testsuite/gdb.ada/atomic_enum.exp index e0ac2146f5e..eb9269d36a8 100644 --- a/gdb/testsuite/gdb.ada/atomic_enum.exp +++ b/gdb/testsuite/gdb.ada/atomic_enum.exp @@ -15,12 +15,8 @@ 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 } diff --git a/gdb/testsuite/gdb.ada/bad-task-bp-keyword.exp b/gdb/testsuite/gdb.ada/bad-task-bp-keyword.exp index 2d2c891dc1e..201079e7639 100644 --- a/gdb/testsuite/gdb.ada/bad-task-bp-keyword.exp +++ b/gdb/testsuite/gdb.ada/bad-task-bp-keyword.exp @@ -15,12 +15,8 @@ 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 } diff --git a/gdb/testsuite/gdb.ada/bp_enum_homonym.exp b/gdb/testsuite/gdb.ada/bp_enum_homonym.exp index 5d6aa923758..3f11c2fd72b 100644 --- a/gdb/testsuite/gdb.ada/bp_enum_homonym.exp +++ b/gdb/testsuite/gdb.ada/bp_enum_homonym.exp @@ -15,12 +15,8 @@ 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 } diff --git a/gdb/testsuite/gdb.ada/bp_on_var.exp b/gdb/testsuite/gdb.ada/bp_on_var.exp index 73b5cd759b3..dc56db51f3e 100644 --- a/gdb/testsuite/gdb.ada/bp_on_var.exp +++ b/gdb/testsuite/gdb.ada/bp_on_var.exp @@ -15,12 +15,8 @@ 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 } diff --git a/gdb/testsuite/gdb.ada/bp_range_type.exp b/gdb/testsuite/gdb.ada/bp_range_type.exp index f65e0c71edb..057bf16b746 100644 --- a/gdb/testsuite/gdb.ada/bp_range_type.exp +++ b/gdb/testsuite/gdb.ada/bp_range_type.exp @@ -15,12 +15,8 @@ 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 } diff --git a/gdb/testsuite/gdb.ada/call_pn.exp b/gdb/testsuite/gdb.ada/call_pn.exp index 1b99252e80b..01549972349 100644 --- a/gdb/testsuite/gdb.ada/call_pn.exp +++ b/gdb/testsuite/gdb.ada/call_pn.exp @@ -15,12 +15,8 @@ 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 } diff --git a/gdb/testsuite/gdb.ada/catch_ex.exp b/gdb/testsuite/gdb.ada/catch_ex.exp index f132355721b..b5adb31c6a6 100644 --- a/gdb/testsuite/gdb.ada/catch_ex.exp +++ b/gdb/testsuite/gdb.ada/catch_ex.exp @@ -15,12 +15,8 @@ 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 } diff --git a/gdb/testsuite/gdb.ada/char_enum.exp b/gdb/testsuite/gdb.ada/char_enum.exp index 4115ff31be7..e55ceb11ee8 100644 --- a/gdb/testsuite/gdb.ada/char_enum.exp +++ b/gdb/testsuite/gdb.ada/char_enum.exp @@ -15,12 +15,8 @@ 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 } diff --git a/gdb/testsuite/gdb.ada/char_param.exp b/gdb/testsuite/gdb.ada/char_param.exp index e43772116db..773ad652824 100644 --- a/gdb/testsuite/gdb.ada/char_param.exp +++ b/gdb/testsuite/gdb.ada/char_param.exp @@ -15,12 +15,8 @@ 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 } diff --git a/gdb/testsuite/gdb.ada/complete.exp b/gdb/testsuite/gdb.ada/complete.exp index 4a0f2b4859c..b748a8b46cd 100644 --- a/gdb/testsuite/gdb.ada/complete.exp +++ b/gdb/testsuite/gdb.ada/complete.exp @@ -15,12 +15,8 @@ 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 } diff --git a/gdb/testsuite/gdb.ada/cond_lang.exp b/gdb/testsuite/gdb.ada/cond_lang.exp index b2aed95567b..68b3e9a8a3f 100644 --- a/gdb/testsuite/gdb.ada/cond_lang.exp +++ b/gdb/testsuite/gdb.ada/cond_lang.exp @@ -15,17 +15,14 @@ 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 } diff --git a/gdb/testsuite/gdb.ada/dyn_loc.exp b/gdb/testsuite/gdb.ada/dyn_loc.exp index 1f7b9c2ca99..82fe8d11204 100644 --- a/gdb/testsuite/gdb.ada/dyn_loc.exp +++ b/gdb/testsuite/gdb.ada/dyn_loc.exp @@ -15,12 +15,8 @@ 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 } diff --git a/gdb/testsuite/gdb.ada/enum_idx_packed.exp b/gdb/testsuite/gdb.ada/enum_idx_packed.exp index 61284bb21a2..87bc1685437 100644 --- a/gdb/testsuite/gdb.ada/enum_idx_packed.exp +++ b/gdb/testsuite/gdb.ada/enum_idx_packed.exp @@ -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 } diff --git a/gdb/testsuite/gdb.ada/exec_changed.exp b/gdb/testsuite/gdb.ada/exec_changed.exp index 4a3792b80e0..583ee0a1985 100644 --- a/gdb/testsuite/gdb.ada/exec_changed.exp +++ b/gdb/testsuite/gdb.ada/exec_changed.exp @@ -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. diff --git a/gdb/testsuite/gdb.ada/exprs.exp b/gdb/testsuite/gdb.ada/exprs.exp index 764cd57fc18..43d9befb05b 100644 --- a/gdb/testsuite/gdb.ada/exprs.exp +++ b/gdb/testsuite/gdb.ada/exprs.exp @@ -15,12 +15,8 @@ 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 } diff --git a/gdb/testsuite/gdb.ada/fixed_cmp.exp b/gdb/testsuite/gdb.ada/fixed_cmp.exp index 1d0f9605ebb..8fdb6f169d5 100644 --- a/gdb/testsuite/gdb.ada/fixed_cmp.exp +++ b/gdb/testsuite/gdb.ada/fixed_cmp.exp @@ -15,12 +15,8 @@ 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 } diff --git a/gdb/testsuite/gdb.ada/fixed_points.exp b/gdb/testsuite/gdb.ada/fixed_points.exp index d86a00b1181..b9e42ca6473 100644 --- a/gdb/testsuite/gdb.ada/fixed_points.exp +++ b/gdb/testsuite/gdb.ada/fixed_points.exp @@ -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 } diff --git a/gdb/testsuite/gdb.ada/formatted_ref.exp b/gdb/testsuite/gdb.ada/formatted_ref.exp index 8341dca43c6..7858ffcb94d 100644 --- a/gdb/testsuite/gdb.ada/formatted_ref.exp +++ b/gdb/testsuite/gdb.ada/formatted_ref.exp @@ -26,13 +26,8 @@ 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 diff --git a/gdb/testsuite/gdb.ada/frame_args.exp b/gdb/testsuite/gdb.ada/frame_args.exp index 98c1a440ced..7f409a15e02 100644 --- a/gdb/testsuite/gdb.ada/frame_args.exp +++ b/gdb/testsuite/gdb.ada/frame_args.exp @@ -15,12 +15,8 @@ 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 } diff --git a/gdb/testsuite/gdb.ada/fullname_bp.exp b/gdb/testsuite/gdb.ada/fullname_bp.exp index 0cc49894409..a092d8444da 100644 --- a/gdb/testsuite/gdb.ada/fullname_bp.exp +++ b/gdb/testsuite/gdb.ada/fullname_bp.exp @@ -15,12 +15,8 @@ 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 } diff --git a/gdb/testsuite/gdb.ada/fun_addr.exp b/gdb/testsuite/gdb.ada/fun_addr.exp index 99249954532..ac945b37e63 100644 --- a/gdb/testsuite/gdb.ada/fun_addr.exp +++ b/gdb/testsuite/gdb.ada/fun_addr.exp @@ -15,12 +15,8 @@ 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 } diff --git a/gdb/testsuite/gdb.ada/fun_in_declare.exp b/gdb/testsuite/gdb.ada/fun_in_declare.exp index b73c74a9c65..64b680dce20 100644 --- a/gdb/testsuite/gdb.ada/fun_in_declare.exp +++ b/gdb/testsuite/gdb.ada/fun_in_declare.exp @@ -15,12 +15,8 @@ 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 } diff --git a/gdb/testsuite/gdb.ada/funcall_param.exp b/gdb/testsuite/gdb.ada/funcall_param.exp index ac0da83ee15..757071c73f0 100644 --- a/gdb/testsuite/gdb.ada/funcall_param.exp +++ b/gdb/testsuite/gdb.ada/funcall_param.exp @@ -15,12 +15,8 @@ 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 } diff --git a/gdb/testsuite/gdb.ada/homonym.exp b/gdb/testsuite/gdb.ada/homonym.exp index a81135ac022..21ab66b9f95 100644 --- a/gdb/testsuite/gdb.ada/homonym.exp +++ b/gdb/testsuite/gdb.ada/homonym.exp @@ -15,12 +15,8 @@ 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 } diff --git a/gdb/testsuite/gdb.ada/info_locals_renaming.exp b/gdb/testsuite/gdb.ada/info_locals_renaming.exp index a8c646997d3..8655c7536ab 100644 --- a/gdb/testsuite/gdb.ada/info_locals_renaming.exp +++ b/gdb/testsuite/gdb.ada/info_locals_renaming.exp @@ -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 } diff --git a/gdb/testsuite/gdb.ada/int_deref.exp b/gdb/testsuite/gdb.ada/int_deref.exp index 51705bc6a2f..5a95feddcca 100644 --- a/gdb/testsuite/gdb.ada/int_deref.exp +++ b/gdb/testsuite/gdb.ada/int_deref.exp @@ -15,12 +15,8 @@ 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 } diff --git a/gdb/testsuite/gdb.ada/interface.exp b/gdb/testsuite/gdb.ada/interface.exp index ae21a5374ca..ede2f683e6a 100644 --- a/gdb/testsuite/gdb.ada/interface.exp +++ b/gdb/testsuite/gdb.ada/interface.exp @@ -15,12 +15,8 @@ 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 } diff --git a/gdb/testsuite/gdb.ada/lang_switch.exp b/gdb/testsuite/gdb.ada/lang_switch.exp index 9e1468751aa..6ee4c238a86 100644 --- a/gdb/testsuite/gdb.ada/lang_switch.exp +++ b/gdb/testsuite/gdb.ada/lang_switch.exp @@ -15,17 +15,13 @@ 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 } diff --git a/gdb/testsuite/gdb.ada/mi_catch_ex.exp b/gdb/testsuite/gdb.ada/mi_catch_ex.exp index 8d140b2b302..4bbbf5a7f7c 100644 --- a/gdb/testsuite/gdb.ada/mi_catch_ex.exp +++ b/gdb/testsuite/gdb.ada/mi_catch_ex.exp @@ -15,12 +15,8 @@ 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 } diff --git a/gdb/testsuite/gdb.ada/mi_task_arg.exp b/gdb/testsuite/gdb.ada/mi_task_arg.exp index 0b2013cecd3..efafed2af0a 100644 --- a/gdb/testsuite/gdb.ada/mi_task_arg.exp +++ b/gdb/testsuite/gdb.ada/mi_task_arg.exp @@ -15,12 +15,8 @@ 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 } diff --git a/gdb/testsuite/gdb.ada/mi_task_info.exp b/gdb/testsuite/gdb.ada/mi_task_info.exp index 22e33757c58..9625e98823c 100644 --- a/gdb/testsuite/gdb.ada/mi_task_info.exp +++ b/gdb/testsuite/gdb.ada/mi_task_info.exp @@ -15,12 +15,8 @@ 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 } diff --git a/gdb/testsuite/gdb.ada/mod_from_name.exp b/gdb/testsuite/gdb.ada/mod_from_name.exp index fe972451f79..ab1b2cab812 100644 --- a/gdb/testsuite/gdb.ada/mod_from_name.exp +++ b/gdb/testsuite/gdb.ada/mod_from_name.exp @@ -15,12 +15,8 @@ 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 } diff --git a/gdb/testsuite/gdb.ada/nested.exp b/gdb/testsuite/gdb.ada/nested.exp index 079577bf87c..33ea5217206 100644 --- a/gdb/testsuite/gdb.ada/nested.exp +++ b/gdb/testsuite/gdb.ada/nested.exp @@ -15,12 +15,8 @@ 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 } diff --git a/gdb/testsuite/gdb.ada/null_array.exp b/gdb/testsuite/gdb.ada/null_array.exp index 4a0541824e2..22bc629e8e9 100644 --- a/gdb/testsuite/gdb.ada/null_array.exp +++ b/gdb/testsuite/gdb.ada/null_array.exp @@ -15,12 +15,8 @@ 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 } diff --git a/gdb/testsuite/gdb.ada/null_record.exp b/gdb/testsuite/gdb.ada/null_record.exp index 97508b23efc..af12b7e932b 100644 --- a/gdb/testsuite/gdb.ada/null_record.exp +++ b/gdb/testsuite/gdb.ada/null_record.exp @@ -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 } diff --git a/gdb/testsuite/gdb.ada/operator_bp.exp b/gdb/testsuite/gdb.ada/operator_bp.exp index 18cf46df286..b0386f54c47 100644 --- a/gdb/testsuite/gdb.ada/operator_bp.exp +++ b/gdb/testsuite/gdb.ada/operator_bp.exp @@ -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 } diff --git a/gdb/testsuite/gdb.ada/packed_array.exp b/gdb/testsuite/gdb.ada/packed_array.exp index 678639cba42..ef7b4d5f2ce 100644 --- a/gdb/testsuite/gdb.ada/packed_array.exp +++ b/gdb/testsuite/gdb.ada/packed_array.exp @@ -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 } diff --git a/gdb/testsuite/gdb.ada/packed_tagged.exp b/gdb/testsuite/gdb.ada/packed_tagged.exp index 3cf8a2895ad..9ddc0a88788 100644 --- a/gdb/testsuite/gdb.ada/packed_tagged.exp +++ b/gdb/testsuite/gdb.ada/packed_tagged.exp @@ -15,12 +15,8 @@ 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 } diff --git a/gdb/testsuite/gdb.ada/print_chars.exp b/gdb/testsuite/gdb.ada/print_chars.exp index 35dfcc6b85d..76bfa16e49a 100644 --- a/gdb/testsuite/gdb.ada/print_chars.exp +++ b/gdb/testsuite/gdb.ada/print_chars.exp @@ -15,12 +15,8 @@ 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 } diff --git a/gdb/testsuite/gdb.ada/print_pc.exp b/gdb/testsuite/gdb.ada/print_pc.exp index 371dd513cf8..fe5a5595852 100644 --- a/gdb/testsuite/gdb.ada/print_pc.exp +++ b/gdb/testsuite/gdb.ada/print_pc.exp @@ -15,12 +15,8 @@ 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 } diff --git a/gdb/testsuite/gdb.ada/ptr_typedef.exp b/gdb/testsuite/gdb.ada/ptr_typedef.exp index 8a3a4c71971..ce6dd421162 100644 --- a/gdb/testsuite/gdb.ada/ptr_typedef.exp +++ b/gdb/testsuite/gdb.ada/ptr_typedef.exp @@ -15,12 +15,8 @@ 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 } diff --git a/gdb/testsuite/gdb.ada/ptype_field.exp b/gdb/testsuite/gdb.ada/ptype_field.exp index 03f8d8f3da6..1ca94e8d00a 100644 --- a/gdb/testsuite/gdb.ada/ptype_field.exp +++ b/gdb/testsuite/gdb.ada/ptype_field.exp @@ -15,12 +15,8 @@ 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 } diff --git a/gdb/testsuite/gdb.ada/ptype_tagged_param.exp b/gdb/testsuite/gdb.ada/ptype_tagged_param.exp index d7107297b95..e538b980d48 100644 --- a/gdb/testsuite/gdb.ada/ptype_tagged_param.exp +++ b/gdb/testsuite/gdb.ada/ptype_tagged_param.exp @@ -15,12 +15,8 @@ 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 } diff --git a/gdb/testsuite/gdb.ada/rec_return.exp b/gdb/testsuite/gdb.ada/rec_return.exp index 06fe4e63464..82d52ac1ce6 100644 --- a/gdb/testsuite/gdb.ada/rec_return.exp +++ b/gdb/testsuite/gdb.ada/rec_return.exp @@ -15,12 +15,8 @@ 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 } diff --git a/gdb/testsuite/gdb.ada/ref_param.exp b/gdb/testsuite/gdb.ada/ref_param.exp index 82fcc6163f6..9d0a3a69877 100644 --- a/gdb/testsuite/gdb.ada/ref_param.exp +++ b/gdb/testsuite/gdb.ada/ref_param.exp @@ -15,12 +15,8 @@ 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 } diff --git a/gdb/testsuite/gdb.ada/ref_tick_size.exp b/gdb/testsuite/gdb.ada/ref_tick_size.exp index 8036723ec2e..f71729b6512 100644 --- a/gdb/testsuite/gdb.ada/ref_tick_size.exp +++ b/gdb/testsuite/gdb.ada/ref_tick_size.exp @@ -15,12 +15,8 @@ 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 } diff --git a/gdb/testsuite/gdb.ada/same_enum.exp b/gdb/testsuite/gdb.ada/same_enum.exp index e9f1991a27d..aa8826d0d4b 100644 --- a/gdb/testsuite/gdb.ada/same_enum.exp +++ b/gdb/testsuite/gdb.ada/same_enum.exp @@ -15,12 +15,8 @@ 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 } diff --git a/gdb/testsuite/gdb.ada/set_pckd_arr_elt.exp b/gdb/testsuite/gdb.ada/set_pckd_arr_elt.exp index 7f6f1d3ad95..6539535d02c 100644 --- a/gdb/testsuite/gdb.ada/set_pckd_arr_elt.exp +++ b/gdb/testsuite/gdb.ada/set_pckd_arr_elt.exp @@ -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 } diff --git a/gdb/testsuite/gdb.ada/small_reg_param.exp b/gdb/testsuite/gdb.ada/small_reg_param.exp index c8ab9cf82db..77d830fae5d 100644 --- a/gdb/testsuite/gdb.ada/small_reg_param.exp +++ b/gdb/testsuite/gdb.ada/small_reg_param.exp @@ -15,12 +15,8 @@ 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 } diff --git a/gdb/testsuite/gdb.ada/start.exp b/gdb/testsuite/gdb.ada/start.exp index 6ba180d0bca..7ccd17176c0 100644 --- a/gdb/testsuite/gdb.ada/start.exp +++ b/gdb/testsuite/gdb.ada/start.exp @@ -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 } diff --git a/gdb/testsuite/gdb.ada/str_ref_cmp.exp b/gdb/testsuite/gdb.ada/str_ref_cmp.exp index b0db6aacc27..6f24037f4a7 100644 --- a/gdb/testsuite/gdb.ada/str_ref_cmp.exp +++ b/gdb/testsuite/gdb.ada/str_ref_cmp.exp @@ -15,12 +15,8 @@ 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 } diff --git a/gdb/testsuite/gdb.ada/sym_print_name.exp b/gdb/testsuite/gdb.ada/sym_print_name.exp index 7a8765a7b7d..73b89e14780 100644 --- a/gdb/testsuite/gdb.ada/sym_print_name.exp +++ b/gdb/testsuite/gdb.ada/sym_print_name.exp @@ -15,12 +15,8 @@ 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 } diff --git a/gdb/testsuite/gdb.ada/taft_type.exp b/gdb/testsuite/gdb.ada/taft_type.exp index b934ccc6c6b..cc14d48b547 100644 --- a/gdb/testsuite/gdb.ada/taft_type.exp +++ b/gdb/testsuite/gdb.ada/taft_type.exp @@ -15,12 +15,8 @@ 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 } diff --git a/gdb/testsuite/gdb.ada/tagged.exp b/gdb/testsuite/gdb.ada/tagged.exp index 6cc316eb43e..dcfe97843c3 100644 --- a/gdb/testsuite/gdb.ada/tagged.exp +++ b/gdb/testsuite/gdb.ada/tagged.exp @@ -15,12 +15,8 @@ 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 } diff --git a/gdb/testsuite/gdb.ada/tagged_not_init.exp b/gdb/testsuite/gdb.ada/tagged_not_init.exp index 013d76ab578..1113096b771 100644 --- a/gdb/testsuite/gdb.ada/tagged_not_init.exp +++ b/gdb/testsuite/gdb.ada/tagged_not_init.exp @@ -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 } diff --git a/gdb/testsuite/gdb.ada/task_bp.exp b/gdb/testsuite/gdb.ada/task_bp.exp index 11bdfacaea5..1887bbd8e91 100644 --- a/gdb/testsuite/gdb.ada/task_bp.exp +++ b/gdb/testsuite/gdb.ada/task_bp.exp @@ -15,12 +15,8 @@ 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 } diff --git a/gdb/testsuite/gdb.ada/tasks.exp b/gdb/testsuite/gdb.ada/tasks.exp index 46a77ffbf0f..2807e2dfab3 100644 --- a/gdb/testsuite/gdb.ada/tasks.exp +++ b/gdb/testsuite/gdb.ada/tasks.exp @@ -15,12 +15,8 @@ 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 } diff --git a/gdb/testsuite/gdb.ada/tick_last_segv.exp b/gdb/testsuite/gdb.ada/tick_last_segv.exp index ce6782f7ef1..bcde512e1a0 100644 --- a/gdb/testsuite/gdb.ada/tick_last_segv.exp +++ b/gdb/testsuite/gdb.ada/tick_last_segv.exp @@ -15,12 +15,8 @@ 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 } diff --git a/gdb/testsuite/gdb.ada/type_coercion.exp b/gdb/testsuite/gdb.ada/type_coercion.exp index 32b4136633d..cb060cf38fd 100644 --- a/gdb/testsuite/gdb.ada/type_coercion.exp +++ b/gdb/testsuite/gdb.ada/type_coercion.exp @@ -15,12 +15,8 @@ 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 } diff --git a/gdb/testsuite/gdb.ada/uninitialized_vars.exp b/gdb/testsuite/gdb.ada/uninitialized_vars.exp index 0ce240e470d..412a2859b5f 100644 --- a/gdb/testsuite/gdb.ada/uninitialized_vars.exp +++ b/gdb/testsuite/gdb.ada/uninitialized_vars.exp @@ -18,12 +18,8 @@ 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 } diff --git a/gdb/testsuite/gdb.ada/variant_record_packed_array.exp b/gdb/testsuite/gdb.ada/variant_record_packed_array.exp index 34bd3de789c..4df72ee48a2 100644 --- a/gdb/testsuite/gdb.ada/variant_record_packed_array.exp +++ b/gdb/testsuite/gdb.ada/variant_record_packed_array.exp @@ -15,12 +15,8 @@ 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 } diff --git a/gdb/testsuite/gdb.ada/watch_arg.exp b/gdb/testsuite/gdb.ada/watch_arg.exp index 1cb9ecaf494..b7b2156737d 100644 --- a/gdb/testsuite/gdb.ada/watch_arg.exp +++ b/gdb/testsuite/gdb.ada/watch_arg.exp @@ -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 } diff --git a/gdb/testsuite/gdb.ada/whatis_array_val.exp b/gdb/testsuite/gdb.ada/whatis_array_val.exp index e937f0a5745..0ac8d16f7c8 100644 --- a/gdb/testsuite/gdb.ada/whatis_array_val.exp +++ b/gdb/testsuite/gdb.ada/whatis_array_val.exp @@ -15,12 +15,8 @@ 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 } diff --git a/gdb/testsuite/gdb.ada/widewide.exp b/gdb/testsuite/gdb.ada/widewide.exp index dbc5e5b4960..ff7231a7b3c 100644 --- a/gdb/testsuite/gdb.ada/widewide.exp +++ b/gdb/testsuite/gdb.ada/widewide.exp @@ -15,12 +15,8 @@ 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 } diff --git a/gdb/testsuite/lib/ada.exp b/gdb/testsuite/lib/ada.exp index 5845c1ace0c..612bfefdd69 100644 --- a/gdb/testsuite/lib/ada.exp +++ b/gdb/testsuite/lib/ada.exp @@ -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] +} -- 2.30.2