summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/Process.hs3
-rw-r--r--src/Run.hs2
2 files changed, 3 insertions, 2 deletions
diff --git a/src/Process.hs b/src/Process.hs
index 48ed40f..376b1ba 100644
--- a/src/Process.hs
+++ b/src/Process.hs
@@ -93,7 +93,8 @@ spawnOn target pname killWith cmd = do
let prefix = T.unpack $ "ip netns exec \"" <> textNetnsName netns <> "\" "
(Just hin, Just hout, Just herr, handle) <- liftIO $ createProcess (shell $ prefix ++ cmd)
{ std_in = CreatePipe, std_out = CreatePipe, std_err = CreatePipe
- , env = Just [("EREBOS_DIR", either netDir nodeDir target)]
+ , cwd = Just (either netDir nodeDir target)
+ , env = Just [ ( "EREBOS_DIR", "." ) ]
}
pout <- liftIO $ newTVarIO []
diff --git a/src/Run.hs b/src/Run.hs
index b623f52..001d887 100644
--- a/src/Run.hs
+++ b/src/Run.hs
@@ -177,7 +177,7 @@ withNetwork :: Network -> (Network -> TestRun a) -> TestRun a
withNetwork net inner = do
tcpdump <- liftIO (findExecutable "tcpdump") >>= return . \case
Just path -> withProcess (Left net) ProcNameTcpdump (Just softwareTermination)
- (path ++ " -i br0 -w '" ++ netDir net ++ "/br0.pcap' -U -Z root") . const
+ (path ++ " -i br0 -w './br0.pcap' -U -Z root") . const
Nothing -> id
tcpdump $ inner net