Skip to content

Commit ec8a424

Browse files
forkiKevinRansom
authored andcommitted
Check for exit code in compiler tests (#7211)
1 parent c79a8ab commit ec8a424

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

tests/fsharp/Compiler/CompilerAssert.fs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -168,6 +168,9 @@ module CompilerAssert =
168168
let errors = p.StandardError.ReadToEnd ()
169169
if not (String.IsNullOrWhiteSpace errors) then
170170
Assert.Fail errors
171+
172+
if p.ExitCode <> 0 then
173+
Assert.Fail(sprintf "Program exited with exit code %d" p.ExitCode)
171174
)
172175

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

0 commit comments

Comments
 (0)