diff options
author | Tom Tromey <tromey@redhat.com> | 2012-07-26 18:43:02 +0000 |
---|---|---|
committer | Tom Tromey <tromey@redhat.com> | 2012-07-26 18:43:02 +0000 |
commit | 8223e12c0883caa58d81f5ff6b7f1a17c7a53120 (patch) | |
tree | 04cac77f7e05058fed8813c0aca9d0d6f17ff58c | |
parent | 7cfe01b4b36c6e349f692f7ea8f80a9d93aa0453 (diff) | |
download | fsf-binutils-gdb-8223e12c0883caa58d81f5ff6b7f1a17c7a53120.zip fsf-binutils-gdb-8223e12c0883caa58d81f5ff6b7f1a17c7a53120.tar.gz fsf-binutils-gdb-8223e12c0883caa58d81f5ff6b7f1a17c7a53120.tar.bz2 |
* 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.
73 files changed, 184 insertions, 370 deletions
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index 4e67230..0c11c2b 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -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. diff --git a/gdb/testsuite/gdb.ada/aliased_array.exp b/gdb/testsuite/gdb.ada/aliased_array.exp index 9fe30df..09bddf8 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 493c7c3..104a492 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 c72f8cf..1d02e9e 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 aa10b27..5a04631 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 5de1145..3045026 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 d1549df..b487797 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 192feb1..a317498 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 e0ac214..eb9269d 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 2d2c891..201079e 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 5d6aa92..3f11c2f 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 73b5cd7..dc56db5 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 f65e0c7..057bf16 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 1b99252..0154997 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 f132355..b5adb31 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 4115ff3..e55ceb1 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 e437721..773ad65 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 4a0f2b4..b748a8b 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 b2aed95..68b3e9a 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 1f7b9c2..82fe8d1 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 61284bb2..87bc168 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 4a3792b..583ee0a 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 764cd57..43d9bef 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 1d0f960..8fdb6f1 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 d86a00b..b9e42ca 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 8341dca..7858ffc 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 98c1a44..7f409a1 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 0cc4989..a092d84 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 9924995..ac945b3 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 b73c74a..64b680d 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 ac0da83..757071c 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 a81135a..21ab66b 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 a8c6469..8655c75 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 51705bc..5a95fed 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 ae21a53..ede2f68 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 9e14687..6ee4c23 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 8d140b2..4bbbf5a 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 0b2013c..efafed2 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 22e3375..9625e98 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 fe97245..ab1b2ca 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 079577b..33ea521 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 4a05418..22bc629 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 97508b2..af12b7e 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 18cf46d..b0386f5 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 678639c..ef7b4d5 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 3cf8a28..9ddc0a8 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 35dfcc6..76bfa16 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 371dd51..fe5a559 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 8a3a4c7..ce6dd42 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 03f8d8f..1ca94e8 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 d710729..e538b98 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 06fe4e6..82d52ac 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 82fcc61..9d0a3a6 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 8036723..f71729b 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 e9f1991..aa8826d 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 7f6f1d3..6539535 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 c8ab9cf..77d830f 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 6ba180d..7ccd171 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 b0db6aa..6f24037 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 7a8765a..73b89e1 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 b934ccc..cc14d48 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 6cc316e..dcfe978 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 013d76a..1113096 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 11bdfac..1887bbd 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 46a77ff..2807e2d 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 ce6782f..bcde512 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 32b4136..cb060cf 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 0ce240e..412a285 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 34bd3de..4df72ee 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 1cb9eca..b7b2156 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 e937f0a..0ac8d16 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 dbc5e5b..ff7231a 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 5845c1a..612bfef 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] +} |