Skip to content

Commit 221d769

Browse files
Merge branch 'topic/als.1161.improve_testsuite_result' into 'master'
Reduce ALS testsuite output See merge request eng/ide/ada_language_server!1463
2 parents 80a91c4 + 853e703 commit 221d769

File tree

7 files changed

+482
-45
lines changed

7 files changed

+482
-45
lines changed

source/tester/tester-run.adb

Lines changed: 23 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
-- of the license. --
1616
------------------------------------------------------------------------------
1717

18+
with Ada.Characters.Latin_1;
1819
with Ada.Command_Line;
1920
with Ada.Directories;
2021
with Ada.Strings.Unbounded;
@@ -47,13 +48,30 @@ procedure Tester.Run is
4748
File : constant VSS.Command_Line.Positional_Option :=
4849
(Name => "test.json",
4950
Description => "JSON test script");
51+
52+
Output_Format : constant VSS.Command_Line.Value_Option :=
53+
(Short_Name => "",
54+
Long_Name => "output-format",
55+
Value_Name => "output_format_option",
56+
Description =>
57+
VSS.Strings.Conversions.To_Virtual_String
58+
("[diff | recent | verbose | min_diff]"
59+
& Ada.Characters.Latin_1.LF
60+
& "diff: diff computed on the fly (default)"
61+
& Ada.Characters.Latin_1.LF
62+
& "recent: recent output from the server"
63+
& Ada.Characters.Latin_1.LF
64+
& "verbose: full output from the server"
65+
& Ada.Characters.Latin_1.LF
66+
& "min_diff: only show the different values"));
5067
end Options;
5168

5269
JSON : GNATCOLL.JSON.JSON_Value;
5370
begin
5471
VSS.Command_Line.Add_Option (Options.Debug);
5572
VSS.Command_Line.Add_Option (Options.On_Hang);
5673
VSS.Command_Line.Add_Option (Options.File);
74+
VSS.Command_Line.Add_Option (Options.Output_Format);
5775
VSS.Command_Line.Process; -- This terminates process on option's error
5876

5977
if not Options.File.Is_Specified then
@@ -104,10 +122,11 @@ begin
104122
Test : Tester.Tests.Test;
105123
begin
106124
Test.Run
107-
(Commands => JSON.Get,
108-
File => Options.File.Value,
109-
On_Hang => Options.On_Hang.Value,
110-
Debug => Options.Debug.Is_Specified);
125+
(Commands => JSON.Get,
126+
File => Options.File.Value,
127+
On_Hang => Options.On_Hang.Value,
128+
Debug => Options.Debug.Is_Specified,
129+
Output_Format => Options.Output_Format.Value);
111130
end;
112131
end;
113132
end Tester.Run;

0 commit comments

Comments
 (0)