@@ -58,21 +58,24 @@ loadPackageDB core deps = do
58 | not $ withinRange v vrange -> return pdb
58 | not $ withinRange v vrange -> return pdb
60 case Tar.entryContent e of
60 case Tar.entryContent e of
61+ Tar.NormalFile bs _ -> do
62+ let (deps', hasTests) = parseDeps bs
61− Tar.NormalFile bs _ -> return $ mappend pdb $ PackageDB $ Map.singleton p PackageInfo
63+ return $ mappend pdb $ PackageDB $ Map.singleton p PackageInfo
62− { piVersion = v
64+ { piVersion = v
63− , piDeps = parseDeps bs
65+ , piDeps = deps'
66+ , piHasTests = hasTests
65 _ -> return pdb
68 _ -> return pdb
67 parseDeps lbs =
70 parseDeps lbs =
68 case parsePackageDescription $ L8.unpack lbs of
71 case parsePackageDescription $ L8.unpack lbs of
69− ParseOk _ gpd -> mconcat
72+ ParseOk _ gpd -> (mconcat
70 [ maybe mempty (go gpd) $ condLibrary gpd
73 [ maybe mempty (go gpd) $ condLibrary gpd
71 , mconcat $ map (go gpd . snd) $ condExecutables gpd
74 , mconcat $ map (go gpd . snd) $ condExecutables gpd
72 , mconcat $ map (go gpd . snd) $ condTestSuites gpd
75 , mconcat $ map (go gpd . snd) $ condTestSuites gpd
73 , mconcat $ map (go gpd . snd) $ condBenchmarks gpd
76 , mconcat $ map (go gpd . snd) $ condBenchmarks gpd
74− ]
77+ ], not $ null $ condTestSuites gpd)
75− _ -> mempty
78+ _ -> (mempty, defaultHasTestSuites)
77 go gpd tree
80 go gpd tree
78 = Set.unions
81 = Set.unions