Skip to content

Commit 019575a

Browse files
committed
Remove unused XDG_CACHE_HOME from setupTestEnvironment
We are now setting up a separate $XDG_CACHE_HOME for each test case. This allows us to make the tests more deterministic on local systems.
1 parent fd0aaee commit 019575a

File tree

1 file changed

+0
-8
lines changed

1 file changed

+0
-8
lines changed

hls-test-utils/src/Test/Hls.hs

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,6 @@ import qualified Language.LSP.Server as LSP
129129
import Language.LSP.Test
130130
import Prelude hiding (log)
131131
import System.Directory (canonicalizePath,
132-
createDirectoryIfMissing,
133132
getCurrentDirectory,
134133
getTemporaryDirectory,
135134
makeAbsolute,
@@ -587,17 +586,10 @@ instance Default (TestConfig b) where
587586
-- It returns the root to the testing directory that tests should use.
588587
-- This directory is not fully cleaned between reruns.
589588
-- However, it is totally safe to delete the directory between runs.
590-
--
591-
-- Additionally, this overwrites the 'XDG_CACHE_HOME' variable to isolate
592-
-- the tests from existing caches. 'hie-bios' and 'ghcide' honour the
593-
-- 'XDG_CACHE_HOME' environment variable and generate their caches there.
594589
setupTestEnvironment :: IO FilePath
595590
setupTestEnvironment = do
596591
tmpDirRoot <- getTemporaryDirectory
597592
let testRoot = tmpDirRoot </> "hls-test-root"
598-
testCacheDir = testRoot </> ".cache"
599-
createDirectoryIfMissing True testCacheDir
600-
setEnv "XDG_CACHE_HOME" testCacheDir
601593
pure testRoot
602594

603595
goldenWithHaskellDocFormatter

0 commit comments

Comments
 (0)