Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Check for exit code in compiler tests
  • Loading branch information
forki authored Jul 12, 2019
commit c930aa477fbd23ace7ff412dd57dfc05d4af5f05
3 changes: 3 additions & 0 deletions tests/fsharp/Compiler/CompilerAssert.fs
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,9 @@ module CompilerAssert =
let errors = p.StandardError.ReadToEnd ()
if not (String.IsNullOrWhiteSpace errors) then
Assert.Fail errors

if p.ExitCode <> 0 then
Assert.Fail(sprintf "Program exited with exit code %d" p.ExitCode)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It might be nice to see the program and arguments here as well. That may make it easier to diagnose the error?

)

let CompileLibraryAndVerifyIL (source: string) (f: ILVerifier -> unit) =
Expand Down