diff options
Diffstat (limited to 'gdb/testsuite/lib/ada.exp')
-rw-r--r-- | gdb/testsuite/lib/ada.exp | 22 |
1 files changed, 22 insertions, 0 deletions
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] +} |