[Clang][ScanDeps] Change multiple-commands.c test to use -fmodules-cache-path on...
authorBruno Cardoso Lopes <bruno.cardoso@gmail.com>
Fri, 9 Sep 2022 22:10:31 +0000 (15:10 -0700)
committerBruno Cardoso Lopes <bruno.cardoso@gmail.com>
Fri, 9 Sep 2022 23:20:04 +0000 (16:20 -0700)
The module cache escapes the test output dirs in this test. Since its default location maybe
composed of system and user related path this can cause problems in some builders (e.g. not
accessible paths inherited in a chroot environment).

Clean the test a bit by passing `-fmodules-cache-path` inside the test output dirs.

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

clang/test/ClangScanDeps/multiple-commands.c

index 6640d40..bb169ea 100644 (file)
   },
   {
     "directory": "DIR"
-    "command": "clang_tool -target x86_64-apple-darwin -c DIR/tu_save_temps_module.c -save-temps=obj -o DIR/tu_save_temps_module.o -fmodules -fimplicit-modules -fimplicit-module-maps"
+    "command": "clang_tool -target x86_64-apple-darwin -c DIR/tu_save_temps_module.c -save-temps=obj -o DIR/tu_save_temps_module.o -fmodules -fimplicit-modules -fimplicit-module-maps -fmodules-cache-path=DIR/cache"
     "file": "DIR/tu_save_temps_module.c"
   }
 ]