[PATCH] D132984: Set HOME for tests that use module cache path

Pirama Arumuga Nainar via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Sep 15 17:10:11 PDT 2022


This revision was automatically updated to reflect the committed changes.
Closed by commit rG7fe475756b26: Set HOME for tests that use module cache path (authored by ccross, committed by pirama).

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D132984/new/

https://reviews.llvm.org/D132984

Files:
  clang/test/Driver/modules-cache-path.m
  clang/test/Modules/driver.c
  clang/test/Unit/lit.cfg.py


Index: clang/test/Unit/lit.cfg.py
===================================================================
--- clang/test/Unit/lit.cfg.py
+++ clang/test/Unit/lit.cfg.py
@@ -30,6 +30,9 @@
 if 'TEMP' in os.environ:
     config.environment['TEMP'] = os.environ['TEMP']
 
+if 'HOME' in os.environ:
+    config.environment['HOME'] = os.environ['HOME']
+
 # Propagate sanitizer options.
 for var in [
     'ASAN_SYMBOLIZER_PATH',
Index: clang/test/Modules/driver.c
===================================================================
--- clang/test/Modules/driver.c
+++ clang/test/Modules/driver.c
@@ -1,4 +1,4 @@
-// RUN: %clang -fmodules -fimplicit-module-maps %s -### 2>&1 | FileCheck -check-prefix CHECK-NO_MODULE_CACHE %s
+// RUN: env HOME=%t.home %clang -fmodules -fimplicit-module-maps %s -### 2>&1 | FileCheck -check-prefix CHECK-NO_MODULE_CACHE %s
 // RUN: %clang -fmodules -fimplicit-module-maps -fmodules-cache-path=blarg %s -### 2>&1 | FileCheck -check-prefix CHECK-WITH_MODULE_CACHE %s
 
 // CHECK-NO_MODULE_CACHE: {{clang.*"-fmodules-cache-path=.*ModuleCache"}}
Index: clang/test/Driver/modules-cache-path.m
===================================================================
--- clang/test/Driver/modules-cache-path.m
+++ clang/test/Driver/modules-cache-path.m
@@ -1,4 +1,4 @@
-// RUN: %clang -fmodules -### %s 2>&1 | FileCheck %s -check-prefix=CHECK-DEFAULT
+// RUN: env HOME=%t.home %clang -fmodules -### %s 2>&1 | FileCheck %s -check-prefix=CHECK-DEFAULT
 // CHECK-DEFAULT: -fmodules-cache-path={{.*}}clang{{[/\\]+}}ModuleCache
 
 // RUN: env CLANG_MODULE_CACHE_PATH=/dev/null \


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D132984.460558.patch
Type: text/x-patch
Size: 1585 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20220916/0aaa063b/attachment-0001.bin>


More information about the cfe-commits mailing list