From d31d07b2a7d01902c3ed3a1b23d74b6fd549c75f Mon Sep 17 00:00:00 2001 From: E M <5089238+emizzle@users.noreply.github.com> Date: Mon, 4 May 2026 17:02:23 +1000 Subject: [PATCH] write test results file contents to stdout on process exit Attempts to fix NUnit logs not appearing in stdout/stderr --- Tests/DistTestCore/DistTest.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Tests/DistTestCore/DistTest.cs b/Tests/DistTestCore/DistTest.cs index d5687f6e..da24ecea 100644 --- a/Tests/DistTestCore/DistTest.cs +++ b/Tests/DistTestCore/DistTest.cs @@ -97,8 +97,8 @@ namespace DistTestCore ["success"] = result.Success, ["duration"] = lifecycle.GetTestDuration().ToString(@"hh\:mm\:ss"), }; - using var raw = new StreamWriter(Console.OpenStandardError(), leaveOpen: true) { AutoFlush = true }; - raw.WriteLine(Newtonsoft.Json.JsonConvert.SerializeObject(entry)); + var json = Newtonsoft.Json.JsonConvert.SerializeObject(entry); + File.AppendAllText(Global.TestResultsFile, json + "\n"); } catch (Exception ex) {