mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2025-01-15 20:51:35 +00:00
[clang-scan-deps][NFC] Fix tests - prevent FileCheck matching test dir path
Differential Revision: https://reviews.llvm.org/D67379 llvm-svn: 371578
This commit is contained in:
parent
b2b0ccab2f
commit
9607f5d802
@ -1,7 +1,7 @@
|
||||
[
|
||||
{
|
||||
"directory": "DIR",
|
||||
"command": "clang -E DIR/header_stat_before_open.m -iframework Inputs/frameworks",
|
||||
"file": "DIR/header_stat_before_open.m"
|
||||
"command": "clang -E DIR/header_stat_before_open_input.m -iframework Inputs/frameworks",
|
||||
"file": "DIR/header_stat_before_open_input.m"
|
||||
}
|
||||
]
|
||||
|
@ -1,7 +1,7 @@
|
||||
[
|
||||
{
|
||||
"directory": "DIR",
|
||||
"command": "clang -E DIR/no-werror.cpp -IInputs -std=c++17 -Weverything -Werror",
|
||||
"command": "clang -E DIR/no-werror_input.cpp -IInputs -std=c++17 -Weverything -Werror",
|
||||
"file": "DIR/no-werror.cpp"
|
||||
}
|
||||
]
|
||||
|
@ -1,12 +1,12 @@
|
||||
[
|
||||
{
|
||||
"directory": "DIR",
|
||||
"command": "clang -E -fsyntax-only DIR/regular_cdb2.cpp -IInputs -D INCLUDE_HEADER2 -MD -MF DIR/regular_cdb2.d",
|
||||
"file": "DIR/regular_cdb2.cpp"
|
||||
"command": "clang -E -fsyntax-only DIR/regular_cdb_input2.cpp -IInputs -D INCLUDE_HEADER2 -MD -MF DIR/regular_cdb2.d",
|
||||
"file": "DIR/regular_cdb_input2.cpp"
|
||||
},
|
||||
{
|
||||
"directory": "DIR",
|
||||
"command": "clang -E DIR/regular_cdb.cpp -IInputs",
|
||||
"file": "DIR/regular_cdb.cpp"
|
||||
"command": "clang -E DIR/regular_cdb_input.cpp -IInputs",
|
||||
"file": "DIR/regular_cdb_input.cpp"
|
||||
}
|
||||
]
|
||||
|
@ -1,12 +1,12 @@
|
||||
[
|
||||
{
|
||||
"directory": "DIR",
|
||||
"command": "clang -E DIR/subframework_header_dir_symlink.m -D EMPTY -iframework Inputs/frameworks",
|
||||
"command": "clang -E DIR/subframework_header_dir_symlink_input.m -D EMPTY -iframework Inputs/frameworks",
|
||||
"file": "DIR/subframework_header_dir_symlink.m"
|
||||
},
|
||||
{
|
||||
"directory": "DIR",
|
||||
"command": "clang -E DIR/subframework_header_dir_symlink2.m -FInputs/frameworks -iframework Inputs/frameworks_symlink",
|
||||
"command": "clang -E DIR/subframework_header_dir_symlink_input2.m -FInputs/frameworks -iframework Inputs/frameworks_symlink",
|
||||
"file": "DIR/subframework_header_dir_symlink2.m"
|
||||
}
|
||||
]
|
||||
|
@ -1,12 +1,12 @@
|
||||
[
|
||||
{
|
||||
"directory": "DIR",
|
||||
"command": "clang -E DIR/symlink.cpp -IInputs",
|
||||
"command": "clang -E DIR/symlink_input.cpp -IInputs",
|
||||
"file": "DIR/symlink.cpp"
|
||||
},
|
||||
{
|
||||
"directory": "DIR",
|
||||
"command": "clang -E DIR/symlink2.cpp -IInputs",
|
||||
"command": "clang -E DIR/symlink_input2.cpp -IInputs",
|
||||
"file": "DIR/symlink2.cpp"
|
||||
}
|
||||
]
|
||||
|
@ -1,7 +1,7 @@
|
||||
[
|
||||
{
|
||||
"directory": "DIR",
|
||||
"command": "clang -E DIR/vfsoverlay.cpp -IInputs -ivfsoverlay DIR/vfsoverlay.yaml",
|
||||
"command": "clang -E DIR/vfsoverlay_input.cpp -IInputs -ivfsoverlay DIR/vfsoverlay.yaml",
|
||||
"file": "DIR/vfsoverlay.cpp"
|
||||
}
|
||||
]
|
||||
|
@ -1,7 +1,7 @@
|
||||
// RUN: rm -rf %t.dir
|
||||
// RUN: rm -rf %t.cdb
|
||||
// RUN: mkdir -p %t.dir
|
||||
// RUN: cp %s %t.dir/regular_cdb.cpp
|
||||
// RUN: cp %s %t.dir/regular_cdb_input.cpp
|
||||
// RUN: sed -e "s|DIR|%/t.dir|g" %S/Inputs/regular_cdb.json > %t.cdb
|
||||
//
|
||||
// RUN: not clang-scan-deps -compilation-database %t.cdb -j 1 2>%t.dir/errs
|
||||
|
@ -1,7 +1,7 @@
|
||||
// RUN: rm -rf %t.dir
|
||||
// RUN: rm -rf %t.cdb
|
||||
// RUN: mkdir -p %t.dir
|
||||
// RUN: cp %s %t.dir/header_stat_before_open.m
|
||||
// RUN: cp %s %t.dir/header_stat_before_open_input.m
|
||||
// RUN: mkdir %t.dir/Inputs
|
||||
// RUN: cp -R %S/Inputs/frameworks %t.dir/Inputs/frameworks
|
||||
// RUN: sed -e "s|DIR|%/t.dir|g" %S/Inputs/header_stat_before_open_cdb.json > %t.cdb
|
||||
@ -13,6 +13,6 @@
|
||||
#include "Framework/PrivateHeader.h"
|
||||
|
||||
// CHECK: clang-scan-deps dependency
|
||||
// CHECK-NEXT: header_stat_before_open.m
|
||||
// CHECK-NEXT: header_stat_before_open_input.m
|
||||
// CHECK-NEXT: Inputs{{/|\\}}frameworks{{/|\\}}Framework.framework{{/|\\}}Headers{{/|\\}}Framework.h
|
||||
// CHECK-NEXT: Inputs{{/|\\}}frameworks{{/|\\}}Framework.framework{{/|\\}}PrivateHeaders{{/|\\}}PrivateHeader.h
|
||||
|
@ -1,7 +1,7 @@
|
||||
// RUN: rm -rf %t.dir
|
||||
// RUN: rm -rf %t.cdb
|
||||
// RUN: mkdir -p %t.dir
|
||||
// RUN: cp %s %t.dir/no-werror.cpp
|
||||
// RUN: cp %s %t.dir/no-werror_input.cpp
|
||||
// RUN: mkdir %t.dir/Inputs
|
||||
// RUN: cp %S/Inputs/sys-header.h %t.dir/Inputs/sys-header.h
|
||||
// RUN: sed -e "s|DIR|%/t.dir|g" %S/Inputs/no-werror.json > %t.cdb
|
||||
@ -12,5 +12,5 @@
|
||||
|
||||
#include "sys-header.h"
|
||||
|
||||
// CHECK: no-werror.cpp
|
||||
// CHECK: no-werror_input.cpp
|
||||
// CHECK-NEXT: Inputs{{/|\\}}sys-header.h
|
||||
|
@ -1,8 +1,8 @@
|
||||
// RUN: rm -rf %t.dir
|
||||
// RUN: rm -rf %t.cdb
|
||||
// RUN: mkdir -p %t.dir
|
||||
// RUN: cp %s %t.dir/regular_cdb.cpp
|
||||
// RUN: cp %s %t.dir/regular_cdb2.cpp
|
||||
// RUN: cp %s %t.dir/regular_cdb_input.cpp
|
||||
// RUN: cp %s %t.dir/regular_cdb_input2.cpp
|
||||
// RUN: mkdir %t.dir/Inputs
|
||||
// RUN: cp %S/Inputs/header.h %t.dir/Inputs/header.h
|
||||
// RUN: cp %S/Inputs/header2.h %t.dir/Inputs/header2.h
|
||||
@ -19,8 +19,8 @@
|
||||
//
|
||||
// The output order is non-deterministic when using more than one thread,
|
||||
// so check the output using two runs. Note that the 'NOT' check is not used
|
||||
// as it might fail if the results for `regular_cdb.cpp` are reported before
|
||||
// `regular_cdb2.cpp`.
|
||||
// as it might fail if the results for `regular_cdb_input.cpp` are reported before
|
||||
// `regular_cdb_input2.cpp`.
|
||||
//
|
||||
// RUN: clang-scan-deps -compilation-database %t.cdb -j 2 -mode preprocess-minimized-sources | \
|
||||
// RUN: FileCheck --check-prefix=CHECK1 %s
|
||||
@ -33,10 +33,10 @@
|
||||
|
||||
#include "header.h"
|
||||
|
||||
// CHECK1: regular_cdb2.cpp
|
||||
// CHECK1: regular_cdb_input2.cpp
|
||||
// CHECK1-NEXT: Inputs{{/|\\}}header.h
|
||||
// CHECK1-NEXT: Inputs{{/|\\}}header2.h
|
||||
|
||||
// CHECK2: regular_cdb.cpp
|
||||
// CHECK2: regular_cdb_input.cpp
|
||||
// CHECK2-NEXT: Inputs{{/|\\}}header.h
|
||||
// CHECK2NO-NOT: header2
|
||||
|
@ -2,13 +2,13 @@
|
||||
// RUN: rm -rf %t.dir
|
||||
// RUN: rm -rf %t.cdb
|
||||
// RUN: mkdir -p %t.dir
|
||||
// RUN: cp %s %t.dir/subframework_header_dir_symlink.m
|
||||
// RUN: cp %s %t.dir/subframework_header_dir_symlink2.m
|
||||
// RUN: cp %s %t.dir/subframework_header_dir_symlink_input.m
|
||||
// RUN: cp %s %t.dir/subframework_header_dir_symlink_input2.m
|
||||
// RUN: mkdir %t.dir/Inputs
|
||||
// RUN: cp -R %S/Inputs/frameworks %t.dir/Inputs/frameworks
|
||||
// RUN: ln -s %t.dir/Inputs/frameworks %t.dir/Inputs/frameworks_symlink
|
||||
// RUN: sed -e "s|DIR|%/t.dir|g" %S/Inputs/subframework_header_dir_symlink_cdb.json > %t.cdb
|
||||
// RUN: clang-scan-deps -compilation-database %t.cdb -j 1 -reuse-filemanager=0 | \
|
||||
// RUN: clang-scan-deps -compilation-database %t.cdb -j 1 -reuse-filemanager=0 | \
|
||||
// RUN: FileCheck %s
|
||||
// RUN: clang-scan-deps -compilation-database %t.cdb -j 1 -reuse-filemanager=1 | \
|
||||
// RUN: FileCheck %s
|
||||
@ -18,7 +18,7 @@
|
||||
#endif
|
||||
|
||||
// CHECK: clang-scan-deps dependency
|
||||
// CHECK-NEXT: subframework_header_dir_symlink.m
|
||||
// CHECK-NEXT: subframework_header_dir_symlink_input.m
|
||||
// CHECK: clang-scan-deps dependency
|
||||
// CHECK-NEXT: subframework_header_dir_symlink.m
|
||||
// CHECK-NEXT: subframework_header_dir_symlink_input2.m
|
||||
// CHECK-NEXT: Inputs{{/|\\}}frameworks_symlink{{/|\\}}Framework.framework{{/|\\}}Headers{{/|\\}}Framework.h
|
||||
|
@ -2,8 +2,8 @@
|
||||
// RUN: rm -rf %t.dir
|
||||
// RUN: rm -rf %t.cdb
|
||||
// RUN: mkdir -p %t.dir
|
||||
// RUN: cp %s %t.dir/symlink.cpp
|
||||
// RUN: cp %s %t.dir/symlink2.cpp
|
||||
// RUN: cp %s %t.dir/symlink_input.cpp
|
||||
// RUN: cp %s %t.dir/symlink_input2.cpp
|
||||
// RUN: mkdir %t.dir/Inputs
|
||||
// RUN: cp %S/Inputs/header.h %t.dir/Inputs/header.h
|
||||
// RUN: ln -s %t.dir/Inputs/header.h %t.dir/Inputs/symlink.h
|
||||
@ -14,10 +14,10 @@
|
||||
#include "symlink.h"
|
||||
#include "header.h"
|
||||
|
||||
// CHECK: symlink.cpp
|
||||
// CHECK: symlink_input.cpp
|
||||
// CHECK-NEXT: Inputs{{/|\\}}symlink.h
|
||||
// CHECK-NEXT: Inputs{{/|\\}}header.h
|
||||
|
||||
// CHECK: symlink2.cpp
|
||||
// CHECK: symlink_input2.cpp
|
||||
// CHECK-NEXT: Inputs{{/|\\}}symlink.h
|
||||
// CHECK-NEXT: Inputs{{/|\\}}header.h
|
||||
|
@ -1,7 +1,7 @@
|
||||
// RUN: rm -rf %t.dir
|
||||
// RUN: rm -rf %t.cdb
|
||||
// RUN: mkdir -p %t.dir
|
||||
// RUN: cp %s %t.dir/vfsoverlay.cpp
|
||||
// RUN: cp %s %t.dir/vfsoverlay_input.cpp
|
||||
// RUN: sed -e "s|DIR|%/t.dir|g" %S/Inputs/vfsoverlay.yaml > %t.dir/vfsoverlay.yaml
|
||||
// RUN: mkdir %t.dir/Inputs
|
||||
// RUN: cp %S/Inputs/header.h %t.dir/Inputs/header.h
|
||||
@ -13,5 +13,5 @@
|
||||
#include "not_real.h"
|
||||
|
||||
// CHECK: clang-scan-deps dependency
|
||||
// CHECK-NEXT: vfsoverlay.cpp
|
||||
// CHECK-NEXT: vfsoverlay_input.cpp
|
||||
// CHECK-NEXT: Inputs{{/|\\}}header.h
|
||||
|
Loading…
x
Reference in New Issue
Block a user