diff --git a/tests/fsharp/Compiler/CompilerAssert.fs b/tests/fsharp/Compiler/CompilerAssert.fs index 9c748455498..d5f93d7810e 100644 --- a/tests/fsharp/Compiler/CompilerAssert.fs +++ b/tests/fsharp/Compiler/CompilerAssert.fs @@ -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) ) let CompileLibraryAndVerifyIL (source: string) (f: ILVerifier -> unit) =