[clang][test] Disallow using the default module cache path in lit tests
authorBen Langmuir <blangmuir@apple.com>
Fri, 9 Sep 2022 22:56:08 +0000 (15:56 -0700)
committerBen Langmuir <blangmuir@apple.com>
Mon, 12 Sep 2022 16:54:56 +0000 (09:54 -0700)
commitd96f526196ac4cebfdd318473816f6d4b9d76707
tree9468eb6144d342d7ec65c140dba9fd3b68c06253
parent2b882f844e41f02ad0569062d1f1e02d91ad6ba2
[clang][test] Disallow using the default module cache path in lit tests

Make the default module cache path invalid when running lit tests so
that tests are forced to provide a cache path. This avoids accidentally
escaping to the system default location, and would have caught the
failure recently found in ClangScanDeps/multiple-commands.c.

Differential Revision: https://reviews.llvm.org/D133622
clang/test/Driver/modules-cache-path.m
clang/test/Modules/driver.c
llvm/utils/lit/lit/llvm/config.py