Skip to content

Commit

Permalink
Redirect standard output now
Browse files Browse the repository at this point in the history
  • Loading branch information
cheese3660 committed Jan 14, 2024
1 parent 2cba35f commit d9c40ad
Showing 1 changed file with 14 additions and 6 deletions.
20 changes: 14 additions & 6 deletions PremonitionPreTester/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,23 @@
File.Delete("DummyGame.dll");
File.Copy("PatchedDummyGame.dll", "DummyGame.Dll");


var info = Process.Start(RuntimeInformation.IsOSPlatform(OSPlatform.Linux) ? "PremonitionTester" : "PremonitionTester.exe");

while (!info.HasExited)
using (var tester = new Process())
{
// Spin
tester.StartInfo.FileName = RuntimeInformation.IsOSPlatform(OSPlatform.Linux)
? "PremonitionTester"
: "PremonitionTester.exe";

tester.StartInfo.UseShellExecute = false;
tester.StartInfo.RedirectStandardOutput = true;
tester.Start();
while (!tester.HasExited)
{
}

Console.WriteLine(tester.StandardOutput.ReadToEnd());
return tester.ExitCode;
}

return info.ExitCode;

// return TestRunner.RunTests() ? 0 : 1;

Expand Down

0 comments on commit d9c40ad

Please sign in to comment.