From 492a4f72b152fb7c238ad7859d9527c00105e39b Mon Sep 17 00:00:00 2001 From: "Andres G. Aragoneses" Date: Tue, 1 Aug 2023 15:52:07 +0800 Subject: [PATCH] scripts/make: ignore unitTests warns if legacy Somehow, unit tests started to throw strings to StdErr (like 'WARNING: The runtime version supported by this application is unavailable.') while using dotnet6 it doesn't happen so we ignore the warnings only if running in legacy mode. This should fix CI after the last merge. --- scripts/make.fsx | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/scripts/make.fsx b/scripts/make.fsx index 64a94a4e4..03cec75e9 100755 --- a/scripts/make.fsx +++ b/scripts/make.fsx @@ -433,8 +433,17 @@ match maybeTarget with } #endif - Process.Execute(runnerCommand, Echo.All).UnwrapDefault() + let procResult = Process.Execute(runnerCommand, Echo.All) +#if !LEGACY_FRAMEWORK + procResult.UnwrapDefault() |> ignore +#else // in legacy mode, warnings (output to StdErr) happen even if exitCode=0 + match procResult.Result with + | ProcessResultState.Error (_, _) -> + failwith "Unit tests failed ^" + | _ -> + () +#endif | Some("install") -> let buildConfig = BinaryConfig.Release