summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWill Thompson <will@willthompson.co.uk>2012-11-05 15:29:18 +0000
committerWill Thompson <will@willthompson.co.uk>2012-11-05 15:29:18 +0000
commit680f8f56934b899842adfe9e8692364653e4b2a8 (patch)
tree1d1f4410b6eec59c627010739b9bb3f11aa77f2b
parentb0a786fe24d56df94905f3677e48601fa716e4d0 (diff)
Set GABBLE_NODELAY=1
-rwxr-xr-xtt.hs9
1 files changed, 7 insertions, 2 deletions
diff --git a/tt.hs b/tt.hs
index a7ea98a..e289e88 100755
--- a/tt.hs
+++ b/tt.hs
@@ -10,7 +10,7 @@ import Data.List (intercalate, stripPrefix, isSuffixOf)
import Data.Maybe (fromMaybe, listToMaybe, isNothing, fromJust)
import Control.Applicative ((<$>), (<*>))
import Control.Monad (when, filterM, forever, replicateM_)
-import System.Environment (getArgs)
+import System.Environment (getArgs, getEnvironment)
import System.FilePath ((</>))
import System.IO (hPutStr, hPutStrLn, stderr)
import System.Process
@@ -90,7 +90,12 @@ usage = usageInfo header optionDefinitions
{- Building and execution of a `make check-twisted` invocation -}
invokeMake :: [String] -> IO ()
invokeMake args = do
- (_, _, _, h) <- createProcess $ proc "make" args
+ -- Speed up Gabble's tests.
+ environment <- getEnvironment
+ let env' = ("GABBLE_NODELAY", "1"):environment
+
+ let processSpec = (proc "make" args) { env = Just env' }
+ (_, _, _, h) <- createProcess processSpec
exitCode <- waitForProcess h
case exitCode of
ExitSuccess -> return ()