diff options
author | Péter Diviánszky <divipp@gmail.com> | 2016-02-15 16:07:04 +0100 |
---|---|---|
committer | Péter Diviánszky <divipp@gmail.com> | 2016-02-15 16:13:39 +0100 |
commit | ba107c3fde5013b779f4fc73b28a766413cdafa9 (patch) | |
tree | 5d6a4c28e4e0cdcc93746fed1fc51a7ff17143ea /test | |
parent | 3db0b64a6f3e28ae6cc351e6c84290d4db905fa7 (diff) |
remove main modules from module cache
Diffstat (limited to 'test')
-rw-r--r-- | test/runTests.hs | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/test/runTests.hs b/test/runTests.hs index 9d435806..45833f59 100644 --- a/test/runTests.hs +++ b/test/runTests.hs | |||
@@ -6,6 +6,7 @@ | |||
6 | module Main where | 6 | module Main where |
7 | 7 | ||
8 | import Data.List | 8 | import Data.List |
9 | import Data.Either | ||
9 | import Data.Time.Clock | 10 | import Data.Time.Clock |
10 | import Control.Applicative | 11 | import Control.Applicative |
11 | import Control.Concurrent | 12 | import Control.Concurrent |
@@ -181,7 +182,12 @@ doTest Config{..} (i, fn) = do | |||
181 | where | 182 | where |
182 | n = dropExtension fn | 183 | n = dropExtension fn |
183 | 184 | ||
184 | action = f <$> (Right <$> getDef n "main" Nothing) `catchMM` (\e is -> return $ Left (e, is)) | 185 | getMain n = do |
186 | r@(fname, x, _) <- getDef n "main" Nothing | ||
187 | when (isRight x) $ removeFromCache fname | ||
188 | return r | ||
189 | |||
190 | action = f <$> (Right <$> getMain n) `catchMM` (\e is -> return $ Left (e, is)) | ||
185 | 191 | ||
186 | f | not $ isReject fn = \case | 192 | f | not $ isReject fn = \case |
187 | Left (e, i) -> Left (unlines $ tab "!Failed" e: listTraceInfos i, Failed) | 193 | Left (e, i) -> Left (unlines $ tab "!Failed" e: listTraceInfos i, Failed) |