@@ -31,6 +31,7 @@ module Test.Hls
3131 runSessionWithServerAndCaps ,
3232 runSessionWithServerInTmpDir ,
3333 runSessionWithServerAndCapsInTmpDir ,
34+ runSessionWithServerNoRootLock ,
3435 runSessionWithServer' ,
3536 runSessionWithServerInTmpDir' ,
3637 -- continuation version that take a FileSystem
@@ -618,7 +619,7 @@ lockForTempDirs = unsafePerformIO newLock
618619
619620-- | Host a server, and run a test session on it
620621-- Note: cwd will be shifted into @root@ in @Session a@
621- runSessionWithServer' ::
622+ runSessionWithServerNoRootLock ::
622623 (Pretty b ) =>
623624 -- | whether we disable the kick action or not
624625 Bool ->
@@ -632,7 +633,7 @@ runSessionWithServer' ::
632633 FilePath ->
633634 Session a ->
634635 IO a
635- runSessionWithServer' disableKick pluginsDp conf sconf caps root s = withLock lock $ keepCurrentDirectory $ do
636+ runSessionWithServerNoRootLock disableKick pluginsDp conf sconf caps root s = do
636637 (inR, inW) <- createPipe
637638 (outR, outW) <- createPipe
638639
@@ -676,6 +677,25 @@ runSessionWithServer' disableKick pluginsDp conf sconf caps root s = withLock l
676677 putStrLn $ " Finishing canceling (took " <> showDuration t <> " s)"
677678 pure x
678679
680+ -- | Host a server, and run a test session on it
681+ -- Note: cwd will be shifted into @root@ in @Session a@
682+ runSessionWithServer' ::
683+ (Pretty b ) =>
684+ -- | whether we disable the kick action or not
685+ Bool ->
686+ -- | Plugin to load on the server.
687+ PluginTestDescriptor b ->
688+ -- | lsp config for the server
689+ Config ->
690+ -- | config for the test session
691+ SessionConfig ->
692+ ClientCapabilities ->
693+ FilePath ->
694+ Session a ->
695+ IO a
696+ runSessionWithServer' disableKick pluginsDp conf sconf caps root s =
697+ withLock lock $ keepCurrentDirectory $ runSessionWithServerNoRootLock disableKick pluginsDp conf sconf caps root s
698+
679699-- | Wait for the next progress begin step
680700waitForProgressBegin :: Session ()
681701waitForProgressBegin = skipManyTill anyMessage $ satisfyMaybe $ \ case
0 commit comments