Skip to content

Commit

Permalink
chore: manifest out of date doesn't count as test noise (#818)
Browse files Browse the repository at this point in the history
* chore: manifest out of date doesn't count as test noise

* still print manifest warning
  • Loading branch information
kim-em authored Jun 5, 2024
1 parent 63d7c6f commit 7110da5
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions scripts/test.lean
Original file line number Diff line number Diff line change
Expand Up @@ -36,16 +36,20 @@ def main (args : List String) : IO Unit := do
args := #["env", "lean", t.toString],
env := #[("LEAN_ABORT_ON_PANIC", "1")] }
let mut exitCode := out.exitCode
let stdout := out.stdout
let stderr := "\n".intercalate <|
-- We don't count manifest out of date warnings as noise.
out.stderr.splitOn "\n" |>.filter (!·.startsWith "warning: manifest out of date: ")
if exitCode = 0 then
if out.stdout.isEmpty && out.stderr.isEmpty then
if stdout.isEmpty && stderr.isEmpty then
IO.println s!"Test succeeded: {t}"
else
IO.println s!"Test succeeded with noisy output: {t}"
unless allowNoisy do exitCode := 1
else
IO.eprintln s!"Test failed: `lake env lean {t}` produced:"
unless out.stdout.isEmpty do IO.eprintln out.stdout
unless out.stderr.isEmpty do IO.eprintln out.stderr
unless stdout.isEmpty do IO.eprintln stdout
unless out.stderr.isEmpty do IO.eprintln out.stderr -- We still print the manifest warning.
pure exitCode
-- Wait on all the jobs and exit with 1 if any failed.
let mut exitCode : UInt8 := 0
Expand Down

0 comments on commit 7110da5

Please sign in to comment.