| 1 |
# RUN: rm -rf %t |
| 2 |
# RUN: clangd-indexer %S/Inputs/Source.cpp > %t.idx |
| 3 |
# RUN: %python %S/pipeline_helper.py --input-file-name=%s --server-arg=--log=verbose --server-arg=-log-public --server-log=%t.public.log --project-root=%S --index-file=%t.idx > /dev/null |
| 4 |
# RUN: %python %S/pipeline_helper.py --input-file-name=%s --server-arg=--log=verbose --server-log=%t.log --project-root=%S --index-file=%t.idx > /dev/null |
| 5 |
# RUN: FileCheck --check-prefixes=LOG,LOG-PUBLIC %s < %t.public.log |
| 6 |
# RUN: FileCheck --check-prefixes=LOG,LOG-ALL %s < %t.log |
| 7 |
# REQUIRES: clangd-remote-index |
| 8 |
|
| 9 |
# LOG: Server listening on |
| 10 |
{"jsonrpc":"2.0","id":0,"method":"initialize","params":{"processId":123,"rootPath":"clangd","capabilities":{},"trace":"off"}} |
| 11 |
--- |
| 12 |
# Verify that request and response bodies are included in the verbose logs, |
| 13 |
# but not when --log-public is on. |
| 14 |
# The request summary should be included in either case. |
| 15 |
{"jsonrpc":"2.0","id":1,"method":"workspace/symbol","params":{"query":"gFoo"}} |
| 16 |
# LOG-ALL: <<< FuzzyFindRequest |
| 17 |
# LOG-ALL: query: "gFoo" |
| 18 |
# LOG-ALL: >>> FuzzyFindReply |
| 19 |
# LOG-ALL: name: "getFoo" |
| 20 |
# LOG-PUBLIC-NOT: gFoo |
| 21 |
# LOG-PUBLIC-NOT: getFoo |
| 22 |
# LOG: request v1/FuzzyFind => OK: 1 results in {{.*}}ms |
| 23 |
--- |
| 24 |
{"jsonrpc":"2.0","id":4,"method":"shutdown"} |
| 25 |
--- |
| 26 |
{"jsonrpc":"2.0","method":"exit"} |