summaryrefslogtreecommitdiff
path: root/tests/Main.hs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/Main.hs')
-rw-r--r--tests/Main.hs7
1 files changed, 5 insertions, 2 deletions
diff --git a/tests/Main.hs b/tests/Main.hs
index 66283339..32ee3992 100644
--- a/tests/Main.hs
+++ b/tests/Main.hs
@@ -4,6 +4,7 @@ import Spec
4import System.Exit 4import System.Exit
5import System.Environment 5import System.Environment
6import System.Process 6import System.Process
7import System.Directory
7import Control.Exception 8import Control.Exception
8import Data.List 9import Data.List
9import Data.Maybe 10import Data.Maybe
@@ -11,7 +12,7 @@ import Data.Functor
11 12
12clients :: [(String, String)] 13clients :: [(String, String)]
13clients = [ 14clients = [
14 ("rtorrent","rtorrent -p 51234-51234 res/testfile.torrent") ] 15 ("rtorrent","rtorrent -p 51234-51234 testfile.torrent") ]
15 16
16main :: IO () 17main :: IO ()
17main = do 18main = do
@@ -24,7 +25,9 @@ main = do
24 return cmd 25 return cmd
25 case cmd' of 26 case cmd' of
26 Just cmd -> do _ <- system "screen -S bittorrent-testsuite -X quit" 27 Just cmd -> do _ <- system "screen -S bittorrent-testsuite -X quit"
27 createProcess (shell cmd) >> return () 28 dir <- getCurrentDirectory
29 _ <- createProcess (shell cmd) { cwd = Just (dir ++ "/res") }
30 return ()
28 Nothing -> return () 31 Nothing -> return ()
29 32
30 let args' = (filter (not . isPrefixOf "--bittorrent-client=") args) 33 let args' = (filter (not . isPrefixOf "--bittorrent-client=") args)