File tree 4 files changed +96
-5
lines changed
testsuite/ada_lsp/als.1663.no_crash_when_gnatdebug
4 files changed +96
-5
lines changed Original file line number Diff line number Diff line change @@ -342,8 +342,6 @@ procedure LSP.Ada_Driver is
342
342
343
343
ALS_Log_Dir : Virtual_File := LSP.Env.ALS_Log_Dir;
344
344
Clean_ALS_Dir : Boolean := False;
345
- GNATdebug : constant Virtual_File := Create_From_Base
346
- (" .gnatdebug" );
347
345
348
346
Traces_File : Virtual_File;
349
347
@@ -424,7 +422,6 @@ begin
424
422
begin
425
423
-- Look for a traces file, in this order:
426
424
-- - passed on the command line via --tracefile,
427
- -- - in a .gnatdebug file locally
428
425
-- - in "traces.cfg" in the ALS home directory
429
426
if VSS.Command_Line.Is_Specified (Trace_File_Option) then
430
427
Traces_File :=
@@ -436,8 +433,6 @@ begin
436
433
GNAT.OS_Lib.OS_Exit (1 );
437
434
end if ;
438
435
439
- elsif GNATdebug.Is_Regular_File then
440
- Traces_File := GNATdebug;
441
436
else
442
437
-- No $HOME/.als directory: create one first
443
438
if not ALS_Log_Dir.Is_Directory then
Original file line number Diff line number Diff line change
1
+ # .gnatdebug file that makes the ALS to crash when parsed, since
2
+ # it emits logs directly on the standard output
3
+ +
4
+ PROCESS_MANAGER=yes
Original file line number Diff line number Diff line change
1
+ [
2
+ {
3
+ "comment" : [
4
+ " This test just checks that the ALS does not crash in presence of " ,
5
+ " a .gnatdebug file in the working directory"
6
+ ]
7
+ },
8
+ {
9
+ "start" : {
10
+ "cmd" : [" ${ALS}" ]
11
+ }
12
+ },
13
+ {
14
+ "send" : {
15
+ "request" : {
16
+ "params" : {
17
+ "capabilities" : {
18
+ "workspace" : {
19
+ "applyEdit" : false
20
+ }
21
+ },
22
+ "rootUri" : " $URI{.}"
23
+ },
24
+ "jsonrpc" : " 2.0" ,
25
+ "id" : 1 ,
26
+ "method" : " initialize"
27
+ },
28
+ "wait" : [
29
+ {
30
+ "id" : 1 ,
31
+ "result" : {
32
+ "capabilities" : {
33
+ "textDocumentSync" : 2 ,
34
+ "signatureHelpProvider" : {
35
+ "triggerCharacters" : [" ," , " (" ],
36
+ "retriggerCharacters" : [" \b " ]
37
+ }
38
+ }
39
+ }
40
+ }
41
+ ]
42
+ }
43
+ },
44
+ {
45
+ "send" : {
46
+ "request" : {
47
+ "jsonrpc" : " 2.0" ,
48
+ "method" : " initialized"
49
+ },
50
+ "wait" : []
51
+ }
52
+ },
53
+ {
54
+ "send" : {
55
+ "request" : {
56
+ "jsonrpc" : " 2.0" ,
57
+ "method" : " workspace/didChangeConfiguration" ,
58
+ "params" : {
59
+ "settings" : {
60
+ "ada" : {
61
+ "defaultCharset" : " ISO-8859-1" ,
62
+ "projectFile" : " $URI{default.gpr}" ,
63
+ "scenarioVariables" : {}
64
+ }
65
+ }
66
+ }
67
+ },
68
+ "wait" : []
69
+ }
70
+ },
71
+ {
72
+ "send" : {
73
+ "request" : {
74
+ "jsonrpc" : " 2.0" ,
75
+ "id" : 8 ,
76
+ "method" : " shutdown"
77
+ },
78
+ "wait" : [
79
+ {
80
+ "id" : 8 ,
81
+ "result" : null
82
+ }
83
+ ]
84
+ }
85
+ },
86
+ {
87
+ "stop" : {
88
+ "exit_code" : 0
89
+ }
90
+ }
91
+ ]
Original file line number Diff line number Diff line change
1
+ title : ' als.1663.no_crash_when_gnatdebug'
You can’t perform that action at this time.
0 commit comments