From: Jan Korous Date: Wed, 11 Sep 2019 00:30:26 +0000 (+0000) Subject: [clang-scan-deps][NFC] Fix tests - prevent FileCheck matching test dir path X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=9e36d0177be5c87b7280ce4abae1775056c83e6c;p=clang [clang-scan-deps][NFC] Fix tests - prevent FileCheck matching test dir path Differential Revision: https://reviews.llvm.org/D67379 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@371578 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/test/ClangScanDeps/Inputs/header_stat_before_open_cdb.json b/test/ClangScanDeps/Inputs/header_stat_before_open_cdb.json index 2428eec50c..c5f027e9fd 100644 --- a/test/ClangScanDeps/Inputs/header_stat_before_open_cdb.json +++ b/test/ClangScanDeps/Inputs/header_stat_before_open_cdb.json @@ -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" } ] diff --git a/test/ClangScanDeps/Inputs/no-werror.json b/test/ClangScanDeps/Inputs/no-werror.json index c9590f88fb..2d1f46cf3a 100644 --- a/test/ClangScanDeps/Inputs/no-werror.json +++ b/test/ClangScanDeps/Inputs/no-werror.json @@ -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" } ] diff --git a/test/ClangScanDeps/Inputs/regular_cdb.json b/test/ClangScanDeps/Inputs/regular_cdb.json index 25e4300153..b851a30c32 100644 --- a/test/ClangScanDeps/Inputs/regular_cdb.json +++ b/test/ClangScanDeps/Inputs/regular_cdb.json @@ -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" } ] diff --git a/test/ClangScanDeps/Inputs/subframework_header_dir_symlink_cdb.json b/test/ClangScanDeps/Inputs/subframework_header_dir_symlink_cdb.json index 8daeff1759..62627c482c 100644 --- a/test/ClangScanDeps/Inputs/subframework_header_dir_symlink_cdb.json +++ b/test/ClangScanDeps/Inputs/subframework_header_dir_symlink_cdb.json @@ -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" } ] diff --git a/test/ClangScanDeps/Inputs/symlink_cdb.json b/test/ClangScanDeps/Inputs/symlink_cdb.json index 43bb418adb..8e911da1e5 100644 --- a/test/ClangScanDeps/Inputs/symlink_cdb.json +++ b/test/ClangScanDeps/Inputs/symlink_cdb.json @@ -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" } ] diff --git a/test/ClangScanDeps/Inputs/vfsoverlay_cdb.json b/test/ClangScanDeps/Inputs/vfsoverlay_cdb.json index 3b08055523..c5cf6f5899 100644 --- a/test/ClangScanDeps/Inputs/vfsoverlay_cdb.json +++ b/test/ClangScanDeps/Inputs/vfsoverlay_cdb.json @@ -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" } ] diff --git a/test/ClangScanDeps/error.cpp b/test/ClangScanDeps/error.cpp index 9eca87bdd9..00bc2eac97 100644 --- a/test/ClangScanDeps/error.cpp +++ b/test/ClangScanDeps/error.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 diff --git a/test/ClangScanDeps/header_stat_before_open.m b/test/ClangScanDeps/header_stat_before_open.m index f3fe401fdb..3f63189466 100644 --- a/test/ClangScanDeps/header_stat_before_open.m +++ b/test/ClangScanDeps/header_stat_before_open.m @@ -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 diff --git a/test/ClangScanDeps/no-werror.cpp b/test/ClangScanDeps/no-werror.cpp index 4a5eff2e0e..95407c51b3 100644 --- a/test/ClangScanDeps/no-werror.cpp +++ b/test/ClangScanDeps/no-werror.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/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 diff --git a/test/ClangScanDeps/regular_cdb.cpp b/test/ClangScanDeps/regular_cdb.cpp index fd3157b7d7..9d367a402f 100644 --- a/test/ClangScanDeps/regular_cdb.cpp +++ b/test/ClangScanDeps/regular_cdb.cpp @@ -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 diff --git a/test/ClangScanDeps/subframework_header_dir_symlink.m b/test/ClangScanDeps/subframework_header_dir_symlink.m index ae7f884803..f3d302f2ce 100644 --- a/test/ClangScanDeps/subframework_header_dir_symlink.m +++ b/test/ClangScanDeps/subframework_header_dir_symlink.m @@ -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 diff --git a/test/ClangScanDeps/symlink.cpp b/test/ClangScanDeps/symlink.cpp index e1a6ac931a..a4394c0da2 100644 --- a/test/ClangScanDeps/symlink.cpp +++ b/test/ClangScanDeps/symlink.cpp @@ -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 diff --git a/test/ClangScanDeps/vfsoverlay.cpp b/test/ClangScanDeps/vfsoverlay.cpp index 2ba2de5f4a..a5f4dc437f 100644 --- a/test/ClangScanDeps/vfsoverlay.cpp +++ b/test/ClangScanDeps/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/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