Merge branch 'develop' into MonadAtomicRef-UnrunnableT

This commit is contained in:
Elliot Cameron 2020-06-03 10:32:26 -04:00 committed by GitHub
commit 441f6e245f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 5 additions and 5 deletions

View File

@ -1,5 +1,5 @@
Name: chrome-test-utils
Version: 0.4
Version: 0.5
Synopsis: Utilities to write headless Chromium tests
License: BSD3
License-file: LICENSE

View File

@ -4,8 +4,8 @@ import System.Linux.Namespaces
import System.Posix
import System.Process
unshareNetork :: IO ()
unshareNetork = do
unshareNetwork :: IO ()
unshareNetwork = do
uid <- getEffectiveUserID
unshare [User, Network]
writeUserMappings Nothing [UserMapping 0 uid 1]

View File

@ -47,7 +47,7 @@ failureLimit = 0
main :: IO ()
main = do
handle (\(_ :: IOError) -> return ()) $ unshareNetork -- If we run into an exception with sandboxing, just don't bother
handle (\(_ :: IOError) -> return ()) $ unshareNetwork -- If we run into an exception with sandboxing, just don't bother
withSandboxedChromeFlags True $ \chromeFlags -> do
mainThread <- myThreadId
browserProcess <- spawnCommand $ mconcat

View File

@ -137,7 +137,7 @@ deriving instance MonadFail WD
main :: IO ()
main = do
unshareNetork
unshareNetwork
isHeadless <- (== Nothing) <$> lookupEnv "NO_HEADLESS"
withSandboxedChromeFlags isHeadless $ \chromeFlags -> do
withSeleniumServer $ \selenium -> do