tests: Don't error out if HOME isn't present in t the environment.
authorDaniel Dunbar <daniel@zuster.org>
Tue, 10 Aug 2010 19:36:25 +0000 (19:36 +0000)
committerDaniel Dunbar <daniel@zuster.org>
Tue, 10 Aug 2010 19:36:25 +0000 (19:36 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110711 91177308-0d34-0410-b5e6-96231b3b80d8

test/lit.cfg

index 5e7e0e44498086e65eb81f4a9338db58c5050e9b..4eaa507ec42ee2da42dfa18a6c374bf91cbad8da 100644 (file)
@@ -46,7 +46,8 @@ if llvm_obj_root is not None:
         config.environment['PATH'] = path
 
 # Propogate 'HOME' through the environment.
-config.environment['HOME'] = os.environ['HOME']
+if 'HOME' in os.environ:
+    config.environment['HOME'] = os.environ['HOME']
 
 # Propogate LLVM_SRC_ROOT into the environment.
 config.environment['LLVM_SRC_ROOT'] = getattr(config, 'llvm_src_root', '')