Skip to content

Commit 9b5c397

Browse files
committed
Launch ghcide/HLS for tests with -j2 to limit amount of memory used
Reminder that ghcide requires at least 2 capabilities
1 parent df66518 commit 9b5c397

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

ghcide/test/exe/Main.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3869,7 +3869,7 @@ runInDir' dir startExeIn startSessionIn extraOptions s = do
38693869
createDirectoryIfMissing True $ projDir ++ "/Data"
38703870

38713871
let cmd = unwords $
3872-
[ghcideExe, "--lsp", "--test", "--verbose", "--cwd", startDir] ++ extraOptions
3872+
[ghcideExe, "--lsp", "--test", "--verbose", "-j2", "--cwd", startDir] ++ extraOptions
38733873
-- HIE calls getXgdDirectory which assumes that HOME is set.
38743874
-- Only sets HOME if it wasn't already set.
38753875
setEnv "HOME" "/homeless-shelter" False

test/utils/Test/Hls/Util.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ logFilePath = "hls-" ++ show ghcVersion ++ ".log"
160160
hlsCommand :: String
161161
hlsCommand = unsafePerformIO $ do
162162
testExe <- fromMaybe "haskell-language-server" <$> lookupEnv "HLS_TEST_EXE"
163-
pure $ testExe ++ " --lsp -d -l test-logs/" ++ logFilePath
163+
pure $ testExe ++ " --lsp -d -j2 -l test-logs/" ++ logFilePath
164164

165165
hlsCommandVomit :: String
166166
hlsCommandVomit = hlsCommand ++ " --vomit"

0 commit comments

Comments
 (0)