~shimon/dismaltc

ref: 461e0617cb03f1d5027af4fbb3da0722791022e9 dismaltc/clang/disable-test/Index/compile_commands.json -rw-r--r-- 1.4 KiB
461e0617Itoh Shimon re-enable tests. 1 year, 6 months ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
[
{
  "directory": "/home/john.doe/MyProject",
  "command": "clang++  -o project.o -c /home/john.doe/MyProject/project.cpp",
  "file": "/home/john.doe/MyProject/project.cpp"
},
{
  "directory": "/home/john.doe/MyProjectA",
  "command": "clang++ -o project2.o -c /home/john.doe/MyProject/project2.cpp",
  "file": "/home/john.doe/MyProject/project2.cpp"
},
{
  "directory": "/home/john.doe/MyProjectB",
  "command": "clang++  -DFEATURE=1 -o project2-feature.o -c /home/john.doe/MyProject/project2.cpp",
  "file": "/home/john.doe/MyProject/project2.cpp"
}
]
# RUN: c-index-test -compilation-db %s
# RUN: c-index-test -compilation-db lookup file_does_not_exists.cpp %s | FileCheck -check-prefix=FILE-NOT-FOUND %s
# FILE-NOT-FOUND: file file_does_not_exists.cpp not found in compilation db

# RUN: c-index-test -compilation-db lookup /home/john.doe/MyProject/project.cpp %s | FileCheck -check-prefix=FILE-1-CMD %s
# FILE-1-CMD: workdir:'/home/john.doe/MyProject' cmdline:'clang++  -o project.o -c /home/john.doe/MyProject/project.cpp'

# RUN: c-index-test -compilation-db lookup /home/john.doe/MyProject/project2.cpp %s | FileCheck -check-prefix=FILE-2-CMD %s
# FILE-2-CMD: workdir:'/home/john.doe/MyProjectA' cmdline:'clang++ -o project2.o -c /home/john.doe/MyProject/project2.cpp'
# FILE-2-CMD: workdir:'/home/john.doe/MyProjectB' cmdline:'clang++ -DFEATURE=1 -o project2-feature.o -c /home/john.doe/MyProject/project2.cpp'