Commit 835dfc67 authored by Ben Gamari's avatar Ben Gamari 🐢

ci: Describe cause for failure

parent 850615b4
Pipeline #12142 failed with stage
in 119 minutes and 43 seconds
......@@ -122,11 +122,18 @@ testPatches cfg = do
print $ resultSummary (configExpectedBrokenPkgs cfg) runResult
BSL.writeFile "results.json" $ encode runResult
exitWith $ if anyFailures (configExpectedBrokenPkgs cfg) runResult then ExitFailure 1 else ExitSuccess
anyFailures :: BrokenPackages -> RunResult -> Bool
anyFailures broken (RunResult testedPatches) =
any failed testedPatches
case failedPatches (configExpectedBrokenPkgs cfg) runResult of
[] -> return ()
badPatches -> do
print $ "Failed due to unexpected failures in:" PP.<$$> PP.indent 2 (
vcat [ prettyPkgVer (patchedPackageName tp) (patchedPackageVersion tp)
| tp <- badPatches
])
exitWith $ ExitFailure 1
failedPatches :: BrokenPackages -> RunResult -> [TestedPatch]
failedPatches broken (RunResult testedPatches) =
filter failed testedPatches
where
failed tp =
patchFailed tp /= failureExpected broken (patchedPackageName tp)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment