Index: gdb/testsuite/lib/ada.exp |
diff --git a/gdb/testsuite/lib/ada.exp b/gdb/testsuite/lib/ada.exp |
index 5845c1ace0cad3a124ea5024c8770fe0148676ab..c530f6849a64fda6e0d8cf354efa47aa59853e5b 100644 |
--- a/gdb/testsuite/lib/ada.exp |
+++ b/gdb/testsuite/lib/ada.exp |
@@ -1,4 +1,4 @@ |
-# Copyright 2004, 2007-2012 Free Software Foundation, Inc. |
+# Copyright 2004-2013 Free Software Foundation, Inc. |
# |
# This program is free software; you can redistribute it and/or modify |
# it under the terms of the GNU General Public License as published by |
@@ -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] |
+} |