r371578 - [clang-scan-deps][NFC] Fix tests - prevent FileCheck matching test dir path

Jan Korous via cfe-commits cfe-commits at lists.llvm.org
Tue Sep 10 17:30:26 PDT 2019


Author: jkorous
Date: Tue Sep 10 17:30:26 2019
New Revision: 371578

URL: http://llvm.org/viewvc/llvm-project?rev=371578&view=rev
Log:
[clang-scan-deps][NFC] Fix tests - prevent FileCheck matching test dir path

Differential Revision: https://reviews.llvm.org/D67379

Modified:
    cfe/trunk/test/ClangScanDeps/Inputs/header_stat_before_open_cdb.json
    cfe/trunk/test/ClangScanDeps/Inputs/no-werror.json
    cfe/trunk/test/ClangScanDeps/Inputs/regular_cdb.json
    cfe/trunk/test/ClangScanDeps/Inputs/subframework_header_dir_symlink_cdb.json
    cfe/trunk/test/ClangScanDeps/Inputs/symlink_cdb.json
    cfe/trunk/test/ClangScanDeps/Inputs/vfsoverlay_cdb.json
    cfe/trunk/test/ClangScanDeps/error.cpp
    cfe/trunk/test/ClangScanDeps/header_stat_before_open.m
    cfe/trunk/test/ClangScanDeps/no-werror.cpp
    cfe/trunk/test/ClangScanDeps/regular_cdb.cpp
    cfe/trunk/test/ClangScanDeps/subframework_header_dir_symlink.m
    cfe/trunk/test/ClangScanDeps/symlink.cpp
    cfe/trunk/test/ClangScanDeps/vfsoverlay.cpp

Modified: cfe/trunk/test/ClangScanDeps/Inputs/header_stat_before_open_cdb.json
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/ClangScanDeps/Inputs/header_stat_before_open_cdb.json?rev=371578&r1=371577&r2=371578&view=diff
==============================================================================
--- cfe/trunk/test/ClangScanDeps/Inputs/header_stat_before_open_cdb.json (original)
+++ cfe/trunk/test/ClangScanDeps/Inputs/header_stat_before_open_cdb.json Tue Sep 10 17:30:26 2019
@@ -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"
 }
 ]

Modified: cfe/trunk/test/ClangScanDeps/Inputs/no-werror.json
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/ClangScanDeps/Inputs/no-werror.json?rev=371578&r1=371577&r2=371578&view=diff
==============================================================================
--- cfe/trunk/test/ClangScanDeps/Inputs/no-werror.json (original)
+++ cfe/trunk/test/ClangScanDeps/Inputs/no-werror.json Tue Sep 10 17:30:26 2019
@@ -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"
 }
 ]

Modified: cfe/trunk/test/ClangScanDeps/Inputs/regular_cdb.json
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/ClangScanDeps/Inputs/regular_cdb.json?rev=371578&r1=371577&r2=371578&view=diff
==============================================================================
--- cfe/trunk/test/ClangScanDeps/Inputs/regular_cdb.json (original)
+++ cfe/trunk/test/ClangScanDeps/Inputs/regular_cdb.json Tue Sep 10 17:30:26 2019
@@ -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"
 }
 ]

Modified: cfe/trunk/test/ClangScanDeps/Inputs/subframework_header_dir_symlink_cdb.json
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/ClangScanDeps/Inputs/subframework_header_dir_symlink_cdb.json?rev=371578&r1=371577&r2=371578&view=diff
==============================================================================
--- cfe/trunk/test/ClangScanDeps/Inputs/subframework_header_dir_symlink_cdb.json (original)
+++ cfe/trunk/test/ClangScanDeps/Inputs/subframework_header_dir_symlink_cdb.json Tue Sep 10 17:30:26 2019
@@ -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"
 }
 ]

Modified: cfe/trunk/test/ClangScanDeps/Inputs/symlink_cdb.json
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/ClangScanDeps/Inputs/symlink_cdb.json?rev=371578&r1=371577&r2=371578&view=diff
==============================================================================
--- cfe/trunk/test/ClangScanDeps/Inputs/symlink_cdb.json (original)
+++ cfe/trunk/test/ClangScanDeps/Inputs/symlink_cdb.json Tue Sep 10 17:30:26 2019
@@ -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"
 }
 ]

Modified: cfe/trunk/test/ClangScanDeps/Inputs/vfsoverlay_cdb.json
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/ClangScanDeps/Inputs/vfsoverlay_cdb.json?rev=371578&r1=371577&r2=371578&view=diff
==============================================================================
--- cfe/trunk/test/ClangScanDeps/Inputs/vfsoverlay_cdb.json (original)
+++ cfe/trunk/test/ClangScanDeps/Inputs/vfsoverlay_cdb.json Tue Sep 10 17:30:26 2019
@@ -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"
 }
 ]

Modified: cfe/trunk/test/ClangScanDeps/error.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/ClangScanDeps/error.cpp?rev=371578&r1=371577&r2=371578&view=diff
==============================================================================
--- cfe/trunk/test/ClangScanDeps/error.cpp (original)
+++ cfe/trunk/test/ClangScanDeps/error.cpp Tue Sep 10 17:30:26 2019
@@ -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

Modified: cfe/trunk/test/ClangScanDeps/header_stat_before_open.m
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/ClangScanDeps/header_stat_before_open.m?rev=371578&r1=371577&r2=371578&view=diff
==============================================================================
--- cfe/trunk/test/ClangScanDeps/header_stat_before_open.m (original)
+++ cfe/trunk/test/ClangScanDeps/header_stat_before_open.m Tue Sep 10 17:30:26 2019
@@ -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

Modified: cfe/trunk/test/ClangScanDeps/no-werror.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/ClangScanDeps/no-werror.cpp?rev=371578&r1=371577&r2=371578&view=diff
==============================================================================
--- cfe/trunk/test/ClangScanDeps/no-werror.cpp (original)
+++ cfe/trunk/test/ClangScanDeps/no-werror.cpp Tue Sep 10 17:30:26 2019
@@ -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

Modified: cfe/trunk/test/ClangScanDeps/regular_cdb.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/ClangScanDeps/regular_cdb.cpp?rev=371578&r1=371577&r2=371578&view=diff
==============================================================================
--- cfe/trunk/test/ClangScanDeps/regular_cdb.cpp (original)
+++ cfe/trunk/test/ClangScanDeps/regular_cdb.cpp Tue Sep 10 17:30:26 2019
@@ -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

Modified: cfe/trunk/test/ClangScanDeps/subframework_header_dir_symlink.m
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/ClangScanDeps/subframework_header_dir_symlink.m?rev=371578&r1=371577&r2=371578&view=diff
==============================================================================
--- cfe/trunk/test/ClangScanDeps/subframework_header_dir_symlink.m (original)
+++ cfe/trunk/test/ClangScanDeps/subframework_header_dir_symlink.m Tue Sep 10 17:30:26 2019
@@ -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

Modified: cfe/trunk/test/ClangScanDeps/symlink.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/ClangScanDeps/symlink.cpp?rev=371578&r1=371577&r2=371578&view=diff
==============================================================================
--- cfe/trunk/test/ClangScanDeps/symlink.cpp (original)
+++ cfe/trunk/test/ClangScanDeps/symlink.cpp Tue Sep 10 17:30:26 2019
@@ -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

Modified: cfe/trunk/test/ClangScanDeps/vfsoverlay.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/ClangScanDeps/vfsoverlay.cpp?rev=371578&r1=371577&r2=371578&view=diff
==============================================================================
--- cfe/trunk/test/ClangScanDeps/vfsoverlay.cpp (original)
+++ cfe/trunk/test/ClangScanDeps/vfsoverlay.cpp Tue Sep 10 17:30:26 2019
@@ -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




More information about the cfe-commits mailing list