Commit 1255b189 authored by Maxime Perrotin's avatar Maxime Perrotin
Browse files

Use colored output

parent d48c71d2
......@@ -965,8 +965,8 @@ begin
Ocarina.Reset;
exception
when Error : AADL_Parser_Error =>
Put ("[ERROR] ");
Put_Line (Exception_Message (Error));
Put (Red_Bold & "[ERROR] " & White);
Put_Line (Exception_Message (Error) & No_Color);
OS_Exit (1);
when E : others =>
Errors.Display_Bug_Box (E);
......
......@@ -21,11 +21,13 @@ package body Parser_Utils is
procedure Banner is
The_Banner : constant String :=
"TASTE AADL Parser (Version "
Yellow_Bold & "TASTE AADL Parser" & No_Color & " (Version "
& Parser_Version.Parser_Release & ") "
& ASCII.LF & ASCII.CR
& "Contact: Maxime.Perrotin@esa.int or Thanassis.Tsiodras@esa.int"
& ASCII.LF & ASCII.CR
& ASCII.LF & ASCII.CR & No_Color
& "Contact: " & Underscore
& "Maxime.Perrotin@esa.int" & No_Color & " or " & Underscore
& "Thanassis.Tsiodras@esa.int"
& ASCII.LF & ASCII.CR & No_Color
& "Based on " & Parser_Version.Ocarina_Version;
begin
Put_Line (The_Banner);
......
......@@ -28,6 +28,12 @@ package Parser_Utils is
function US (Source : String) return Unbounded_String renames
To_Unbounded_String;
Yellow_Bold : constant String := ASCII.ESC & "[33m" & ASCII.ESC & "[1m";
White : constant String := ASCII.ESC & "[37m";
Red_Bold : constant String := ASCII.ESC & "[31m" & ASCII.ESC & "[1m";
Underscore : constant String := ASCII.ESC & "[4m";
No_Color : constant String := ASCII.ESC & "[0m";
procedure Banner;
procedure Usage;
......
package Parser_Version is
Parser_Release : constant String :=
"26af2bc ; Commit Date: Tue Nov 28 10:15:49 2017 ";
"d48c71d ; Commit Date: Tue Nov 28 13:54:14 2017 ";
Ocarina_Version : constant String :=
"Ocarina 2017.x (Working Copy from r0b92ed3)";
end Parser_Version;
\ No newline at end of file
......@@ -3,7 +3,12 @@ AADL_PARSER=../../aadl_parser
all: test-parse
test-parse:
$(AADL_PARSER) -glue -i interfaceview.aadl -c deploymentview.aadl -d dataview.aadl ../common/ocarina_components.aadl ../common/TASTE_DV_Properties.aadl 2>&1 | tail -2 | diff expected -
$(AADL_PARSER) -glue -i interfaceview.aadl \
-c deploymentview.aadl \
-d dataview.aadl \
../common/ocarina_components.aadl \
../common/TASTE_DV_Properties.aadl \
2>&1 | tail -2 | sed "s,\x1B\[[0-9;]*[a-zA-Z],,g" | tail -2 | diff expected -
clean:
rm -rf obj $(exec) *~
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment