zixuw created this revision. Herald added a reviewer: dang. Herald added a project: All. zixuw requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits.
Fix path replacement in sed (properly this time) using lit regex_replacement. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D123526 Files: clang/test/ExtractAPI/enum.c clang/test/ExtractAPI/global_record.c clang/test/ExtractAPI/global_record_multifile.c clang/test/ExtractAPI/known_files_only.c clang/test/ExtractAPI/known_files_only_hmap.c clang/test/ExtractAPI/language.c clang/test/ExtractAPI/macro_undefined.c clang/test/ExtractAPI/macros.c clang/test/ExtractAPI/objc_category.m clang/test/ExtractAPI/objc_interface.m clang/test/ExtractAPI/objc_protocol.m clang/test/ExtractAPI/struct.c clang/test/ExtractAPI/typedef.c clang/test/ExtractAPI/typedef_anonymous_record.c clang/test/ExtractAPI/typedef_chain.c
Index: clang/test/ExtractAPI/typedef_chain.c =================================================================== --- clang/test/ExtractAPI/typedef_chain.c +++ clang/test/ExtractAPI/typedef_chain.c @@ -1,7 +1,7 @@ // RUN: rm -rf %t // RUN: split-file %s %t -// RUN: sed -e "s@INPUT_DIR@%/t@g" %t/reference.output.json.in >> \ -// RUN: %t/reference.output.json +// RUN: sed -e "s@INPUT_DIR@%{/t:regex_replacement}@g" \ +// RUN: %t/reference.output.json.in >> %t/reference.output.json // RUN: %clang -extract-api --product-name=TypedefChain -target arm64-apple-macosx \ // RUN: -x objective-c-header %t/input.h -o %t/output.json | FileCheck -allow-empty %s Index: clang/test/ExtractAPI/typedef_anonymous_record.c =================================================================== --- clang/test/ExtractAPI/typedef_anonymous_record.c +++ clang/test/ExtractAPI/typedef_anonymous_record.c @@ -1,7 +1,7 @@ // RUN: rm -rf %t // RUN: split-file %s %t -// RUN: sed -e "s@INPUT_DIR@%/t@g" %t/reference.output.json.in >> \ -// RUN: %t/reference.output.json +// RUN: sed -e "s@INPUT_DIR@%{/t:regex_replacement}@g" \ +// RUN: %t/reference.output.json.in >> %t/reference.output.json // RUN: %clang -extract-api --product-name=TypedefChain -target arm64-apple-macosx \ // RUN: -x objective-c-header %t/input.h -o %t/output.json | FileCheck -allow-empty %s Index: clang/test/ExtractAPI/typedef.c =================================================================== --- clang/test/ExtractAPI/typedef.c +++ clang/test/ExtractAPI/typedef.c @@ -1,7 +1,7 @@ // RUN: rm -rf %t // RUN: split-file %s %t -// RUN: sed -e "s@INPUT_DIR@%/t@g" %t/reference.output.json.in >> \ -// RUN: %t/reference.output.json +// RUN: sed -e "s@INPUT_DIR@%{/t:regex_replacement}@g" \ +// RUN: %t/reference.output.json.in >> %t/reference.output.json // RUN: %clang -extract-api --product-name=Typedef -target arm64-apple-macosx \ // RUN: -x objective-c-header %t/input.h -o %t/output.json | FileCheck -allow-empty %s Index: clang/test/ExtractAPI/struct.c =================================================================== --- clang/test/ExtractAPI/struct.c +++ clang/test/ExtractAPI/struct.c @@ -1,7 +1,7 @@ // RUN: rm -rf %t // RUN: split-file %s %t -// RUN: sed -e "s@INPUT_DIR@%/t@g" %t/reference.output.json.in >> \ -// RUN: %t/reference.output.json +// RUN: sed -e "s@INPUT_DIR@%{/t:regex_replacement}@g" \ +// RUN: %t/reference.output.json.in >> %t/reference.output.json // RUN: %clang -extract-api -target arm64-apple-macosx \ // RUN: %t/input.h -o %t/output.json | FileCheck -allow-empty %s Index: clang/test/ExtractAPI/objc_protocol.m =================================================================== --- clang/test/ExtractAPI/objc_protocol.m +++ clang/test/ExtractAPI/objc_protocol.m @@ -1,7 +1,7 @@ // RUN: rm -rf %t // RUN: split-file %s %t -// RUN: sed -e "s@INPUT_DIR@%/t@g" %t/reference.output.json.in >> \ -// RUN: %t/reference.output.json +// RUN: sed -e "s@INPUT_DIR@%{/t:regex_replacement}@g" \ +// RUN: %t/reference.output.json.in >> %t/reference.output.json // RUN: %clang -extract-api -x objective-c-header -target arm64-apple-macosx \ // RUN: %t/input.h -o %t/output.json | FileCheck -allow-empty %s Index: clang/test/ExtractAPI/objc_interface.m =================================================================== --- clang/test/ExtractAPI/objc_interface.m +++ clang/test/ExtractAPI/objc_interface.m @@ -1,7 +1,7 @@ // RUN: rm -rf %t // RUN: split-file %s %t -// RUN: sed -e "s@INPUT_DIR@%/t@g" %t/reference.output.json.in >> \ -// RUN: %t/reference.output.json +// RUN: sed -e "s@INPUT_DIR@%{/t:regex_replacement}@g" \ +// RUN: %t/reference.output.json.in >> %t/reference.output.json // RUN: %clang -extract-api -x objective-c-header -target arm64-apple-macosx \ // RUN: %t/input.h -o %t/output.json | FileCheck -allow-empty %s Index: clang/test/ExtractAPI/objc_category.m =================================================================== --- clang/test/ExtractAPI/objc_category.m +++ clang/test/ExtractAPI/objc_category.m @@ -1,7 +1,7 @@ // RUN: rm -rf %t // RUN: split-file %s %t -// RUN: sed -e "s@INPUT_DIR@%/t@g" %t/reference.output.json.in >> \ -// RUN: %t/reference.output.json +// RUN: sed -e "s@INPUT_DIR@%{/t:regex_replacement}@g" \ +// RUN: %t/reference.output.json.in >> %t/reference.output.json // RUN: %clang -extract-api -x objective-c-header -target arm64-apple-macosx \ // RUN: %t/input.h -o %t/output.json | FileCheck -allow-empty %s Index: clang/test/ExtractAPI/macros.c =================================================================== --- clang/test/ExtractAPI/macros.c +++ clang/test/ExtractAPI/macros.c @@ -1,7 +1,7 @@ // RUN: rm -rf %t // RUN: split-file %s %t -// RUN: sed -e "s@INPUT_DIR@%/t@g" %t/reference.output.json.in >> \ -// RUN: %t/reference.output.json +// RUN: sed -e "s@INPUT_DIR@%{/t:regex_replacement}@g" \ +// RUN: %t/reference.output.json.in >> %t/reference.output.json // RUN: %clang -extract-api --product-name=Macros -target arm64-apple-macosx \ // RUN: -x objective-c-header %t/input.h -o %t/output.json | FileCheck -allow-empty %s Index: clang/test/ExtractAPI/macro_undefined.c =================================================================== --- clang/test/ExtractAPI/macro_undefined.c +++ clang/test/ExtractAPI/macro_undefined.c @@ -1,7 +1,7 @@ // RUN: rm -rf %t // RUN: split-file %s %t -// RUN: sed -e "s@INPUT_DIR@%/t@g" %t/reference.output.json.in >> \ -// RUN: %t/reference.output.json +// RUN: sed -e "s@INPUT_DIR@%{/t:regex_replacement}@g" \ +// RUN: %t/reference.output.json.in >> %t/reference.output.json // RUN: %clang -extract-api --product-name=Macros -target arm64-apple-macosx \ // RUN: -x objective-c-header %t/input.h -o %t/output.json | FileCheck -allow-empty %s Index: clang/test/ExtractAPI/language.c =================================================================== --- clang/test/ExtractAPI/language.c +++ clang/test/ExtractAPI/language.c @@ -1,9 +1,9 @@ // RUN: rm -rf %t // RUN: split-file %s %t -// RUN: sed -e "s@INPUT_DIR@%/t@g" %t/c.reference.output.json.in >> \ -// RUN: %t/c.reference.output.json -// RUN: sed -e "s@INPUT_DIR@%/t@g" %t/objc.reference.output.json.in >> \ -// RUN: %t/objc.reference.output.json +// RUN: sed -e "s@INPUT_DIR@%{/t:regex_replacement}@g" \ +// RUN: %t/c.reference.output.json.in >> %t/c.reference.output.json +// RUN: sed -e "s@INPUT_DIR@%{/t:regex_replacement}@g" \ +// RUN: %t/objc.reference.output.json.in >> %t/objc.reference.output.json // RUN: %clang -extract-api -x c-header -target arm64-apple-macosx \ // RUN: %t/c.h -o %t/c.output.json | FileCheck -allow-empty %s Index: clang/test/ExtractAPI/known_files_only_hmap.c =================================================================== --- clang/test/ExtractAPI/known_files_only_hmap.c +++ clang/test/ExtractAPI/known_files_only_hmap.c @@ -1,9 +1,9 @@ // RUN: rm -rf %t // RUN: split-file %s %t -// RUN: sed -e "s@INPUT_DIR@%/t@g" %t/reference.output.json.in >> \ -// RUN: %t/reference.output.json -// RUN: sed -e "s@INPUT_DIR@%/t@g" %t/known_files_only.hmap.json.in >> \ -// RUN: %t/known_files_only.hmap.json +// RUN: sed -e "s@INPUT_DIR@%{/t:regex_replacement}@g" \ +// RUN: %t/reference.output.json.in >> %t/reference.output.json +// RUN: sed -e "s@INPUT_DIR@%{/t:regex_replacement}@g" \ +// RUN: %t/known_files_only.hmap.json.in >> %t/known_files_only.hmap.json // RUN: %hmaptool write %t/known_files_only.hmap.json %t/known_files_only.hmap // RUN: %clang -extract-api --product-name=KnownFilesOnlyHmap -target arm64-apple-macosx \ // RUN: -I%t/known_files_only.hmap -I%t/subdir %t/subdir/subdir1/input.h \ Index: clang/test/ExtractAPI/known_files_only.c =================================================================== --- clang/test/ExtractAPI/known_files_only.c +++ clang/test/ExtractAPI/known_files_only.c @@ -1,7 +1,7 @@ // RUN: rm -rf %t // RUN: split-file %s %t -// RUN: sed -e "s@INPUT_DIR@%/t@g" %t/reference.output.json.in >> \ -// RUN: %t/reference.output.json +// RUN: sed -e "s@INPUT_DIR@%{/t:regex_replacement}@g" \ +// RUN: %t/reference.output.json.in >> %t/reference.output.json // RUN: %clang -extract-api --product-name=GlobalRecord -target arm64-apple-macosx \ // RUN: %t/input1.h -o %t/output.json | FileCheck -allow-empty %s Index: clang/test/ExtractAPI/global_record_multifile.c =================================================================== --- clang/test/ExtractAPI/global_record_multifile.c +++ clang/test/ExtractAPI/global_record_multifile.c @@ -1,7 +1,7 @@ // RUN: rm -rf %t // RUN: split-file %s %t -// RUN: sed -e "s@INPUT_DIR@%/t@g" %t/reference.output.json.in >> \ -// RUN: %t/reference.output.json +// RUN: sed -e "s@INPUT_DIR@%{/t:regex_replacement}@g" \ +// RUN: %t/reference.output.json.in >> %t/reference.output.json // RUN: %clang -extract-api --product-name=GlobalRecord -target arm64-apple-macosx \ // RUN: %t/input1.h %t/input2.h %t/input3.h -o %t/output.json | FileCheck -allow-empty %s Index: clang/test/ExtractAPI/global_record.c =================================================================== --- clang/test/ExtractAPI/global_record.c +++ clang/test/ExtractAPI/global_record.c @@ -1,7 +1,7 @@ // RUN: rm -rf %t // RUN: split-file %s %t -// RUN: sed -e "s@INPUT_DIR@%/t@g" %t/reference.output.json.in >> \ -// RUN: %t/reference.output.json +// RUN: sed -e "s@INPUT_DIR@%{/t:regex_replacement}@g" \ +// RUN: %t/reference.output.json.in >> %t/reference.output.json // RUN: %clang -extract-api --product-name=GlobalRecord -target arm64-apple-macosx \ // RUN: %t/input.h -o %t/output.json | FileCheck -allow-empty %s Index: clang/test/ExtractAPI/enum.c =================================================================== --- clang/test/ExtractAPI/enum.c +++ clang/test/ExtractAPI/enum.c @@ -1,7 +1,7 @@ // RUN: rm -rf %t // RUN: split-file %s %t -// RUN: sed -e "s@INPUT_DIR@%/t@g" %t/reference.output.json.in >> \ -// RUN: %t/reference.output.json +// RUN: sed -e "s@INPUT_DIR@%{/t:regex_replacement}@g" \ +// RUN: %t/reference.output.json.in >> %t/reference.output.json // RUN: %clang -extract-api -target arm64-apple-macosx \ // RUN: %t/input.h -o %t/output.json | FileCheck -allow-empty %s
_______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits