[clang][deps] Simplify PREFIX definitions in tests
authorJan Svoboda <jan_svoboda@apple.com>
Sat, 12 Mar 2022 15:44:29 +0000 (16:44 +0100)
committerJan Svoboda <jan_svoboda@apple.com>
Sat, 12 Mar 2022 15:45:09 +0000 (16:45 +0100)
commitc4b13f7a2f7f74006f2436ef431093d13d94f1f3
tree6081b51486383da07779ea0d6ade4f557922f331
parentaea31f62d44adf9d6e51d2ee323692b6efadcede
[clang][deps] Simplify PREFIX definitions in tests

Instead of outputting the test directory into the JSON result file, parsing it with `FileCheck` and then potentially stripping it, simply use `FileCheck`'s `-D` option.

Note that we use `%/t` instead of `%t` in order to normalize to forward slashes on Windows, which matches what we do with `sed 's:\\\\\?:/:g'`.

Differential Revision: https://reviews.llvm.org/D121516
clang/test/ClangScanDeps/diagnostics.c
clang/test/ClangScanDeps/modules-context-hash.c
clang/test/ClangScanDeps/modules-fmodule-name-no-module-built.m
clang/test/ClangScanDeps/modules-full-by-mod-name.cpp
clang/test/ClangScanDeps/modules-full.cpp
clang/test/ClangScanDeps/modules-inferred.m
clang/test/ClangScanDeps/modules-pch-common-submodule.c
clang/test/ClangScanDeps/modules-pch-common-via-submodule.c
clang/test/ClangScanDeps/modules-pch.c
clang/test/ClangScanDeps/preserved-args.c
clang/test/ClangScanDeps/removed-args.c