diff options
Diffstat (limited to 'devel/ahven/files/extra-src_ahven-framework.adb')
-rw-r--r-- | devel/ahven/files/extra-src_ahven-framework.adb | 59 |
1 files changed, 0 insertions, 59 deletions
diff --git a/devel/ahven/files/extra-src_ahven-framework.adb b/devel/ahven/files/extra-src_ahven-framework.adb deleted file mode 100644 index a25d65d0620f..000000000000 --- a/devel/ahven/files/extra-src_ahven-framework.adb +++ /dev/null @@ -1,59 +0,0 @@ ---- src/ahven-framework.adb.orig 2014-02-08 21:21:51.000000000 +0000 -+++ src/ahven-framework.adb -@@ -14,6 +14,8 @@ - -- OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - -- - -+with GNAT.Traceback.Symbolic; -+with GNAT.Regpat; - with Ada.Strings; - with Ada.Unchecked_Deallocation; - with Ada.Exceptions; -@@ -22,6 +24,24 @@ with Ahven.Long_AStrings; - package body Ahven.Framework is - use Ahven.AStrings; - -+ -- Convert an exception into a traceback, but truncate it at the first -+ -- line matching "0x.* in ahven.framework" as this is unwanted trace. -+ function Filtered_Traceback (E : in Ada.Exceptions.Exception_Occurrence) -+ return String is -+ ftb : constant String := GNAT.Traceback.Symbolic.Symbolic_Traceback (E); -+ pat : constant String := "(0x[0-9a-f]* in ahven\.framework)"; -+ reg : constant GNAT.Regpat.Pattern_Matcher := GNAT.Regpat.Compile (pat); -+ result : GNAT.Regpat.Match_Array (0 .. 1); -+ use type GNAT.Regpat.Match_Location; -+ begin -+ GNAT.Regpat.Match (reg, ftb, result); -+ if result (0) = GNAT.Regpat.No_Match then -+ return ftb; -+ else -+ return ftb (1 .. result (1).First - 2); -+ end if; -+ end Filtered_Traceback; -+ - -- A few local procedures, so we do not need to duplicate code. - procedure Free_Test is - new Ada.Unchecked_Deallocation (Object => Test'Class, -@@ -346,19 +366,19 @@ package body Ahven.Framework is - Set_Status - (S => TEST_FAIL, - Message => Ada.Exceptions.Exception_Message (E), -- Long_Message => Ada.Exceptions.Exception_Information (E), -+ Long_Message => Filtered_Traceback (E), - R => Result); - when E : Test_Skipped_Error => - Set_Status - (S => TEST_SKIP, - Message => Ada.Exceptions.Exception_Message (E), -- Long_Message => Ada.Exceptions.Exception_Information (E), -+ Long_Message => Filtered_Traceback (E), - R => Result); - when E : others => - Set_Status - (S => TEST_ERROR, - Message => Ada.Exceptions.Exception_Message (E), -- Long_Message => Ada.Exceptions.Exception_Information (E), -+ Long_Message => Filtered_Traceback (E), - R => Result); - end; - end Run_A_Command; |