summaryrefslogtreecommitdiff
path: root/src/Main.hs
diff options
context:
space:
mode:
authorRoman Smrž <roman.smrz@seznam.cz>2026-05-23 12:37:36 +0200
committerRoman Smrž <roman.smrz@seznam.cz>2026-05-23 12:37:36 +0200
commit858403fc3ea0888ea748cb23b04fcefe1d21c117 (patch)
treec95361c9945d7bcaf6ff366933ebc86147dac1d4 /src/Main.hs
parentb3bf16872222058395c6224e862c1e12f7d829dc (diff)
Loaded modules data type to store related infoHEADmaster
Diffstat (limited to 'src/Main.hs')
-rw-r--r--src/Main.hs10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/Main.hs b/src/Main.hs
index a77e8cc..9969109 100644
--- a/src/Main.hs
+++ b/src/Main.hs
@@ -194,11 +194,11 @@ main = do
| otherwise = OutputStyleQuiet
out <- startOutput outputStyle useColor
- ( modules, tags, globalDefs ) <- loadModules (map fst files)
+ LoadedModules {..} <- loadModules (map fst files)
- let excludedTests = optExclude opts ++ map (snd . fst) (filter (\( ( _, _ ), ts ) -> any (\(Tag _ t) -> textVarName t `elem` optExclude opts) ts) tags)
+ let excludedTests = optExclude opts ++ map (snd . fst) (filter (\( ( _, _ ), ts ) -> any (\(Tag _ t) -> textVarName t `elem` optExclude opts) ts) lmTags)
tests <- filter ((`notElem` excludedTests) . testName) <$> if null otests
- then fmap concat $ forM (zip modules files) $ \( Module {..}, ( filePath, mbTestName )) -> do
+ then fmap concat $ forM (zip lmModules files) $ \( Module {..}, ( filePath, mbTestName )) -> do
case mbTestName of
Nothing -> return moduleTests
Just name
@@ -209,7 +209,7 @@ main = do
hPutStrLn stderr $ "Test ‘" <> T.unpack name <> "’ not found in ‘" <> filePath <> "’"
exitFailure
else forM otests $ \name -> if
- | Just test <- find ((name ==) . testName) $ concatMap moduleTests modules
+ | Just test <- find ((name ==) . testName) $ concatMap moduleTests lmModules
-> return test
| otherwise
-> do
@@ -224,7 +224,7 @@ main = do
let topts = (optTest opts)
{ optTcpdump = tcpdump
}
- ok <- allM (runTest out topts globalDefs) $
+ ok <- allM (runTest out topts lmGlobalDefs) $
concat $ replicate (optRepeat opts) tests
when (not ok) exitFailure