-
Notifications
You must be signed in to change notification settings - Fork 274
Show colors in AzDo and GH actions #5535
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
nohwnd
commented
Apr 28, 2025
•
edited
Loading
edited
@@ -83,7 +84,7 @@ public sealed class TestAssetFixture() : TestAssetFixtureBase(AcceptanceFixture. | |||
using Microsoft.Testing.Platform.Extensions.Messages; | |||
using Microsoft.Testing.Platform.Extensions.TestFramework; | |||
|
|||
if (args.Length == 0) | |||
if (!args.Contains("--exit-on-process-exit")) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This test assumed no args, but we now set --no-progress --no-ansi, so it never got setup, and was just sitting there stuck.
@@ -93,7 +94,7 @@ public sealed class TestAssetFixture() : TestAssetFixtureBase(AcceptanceFixture. | |||
Environment.SetEnvironmentVariable("WaitTestHost", mutexName); | |||
ProcessStartInfo processStartInfo = new(); | |||
processStartInfo.FileName = currentEntryPoint; | |||
processStartInfo.Arguments = $"--exit-on-process-exit {currentPid}"; | |||
processStartInfo.Arguments = $"--exit-on-process-exit {currentPid} --no-progress --no-ansi"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Adding the parameters here so we don't end up writing into the output.
@@ -48,7 +48,8 @@ public void ExitOnProcessExit_Succeed(string tfm) | |||
startTime = Stopwatch.StartNew(); | |||
while (!process.HasExited) | |||
{ | |||
if (startTime.Elapsed.TotalSeconds > 55) | |||
Thread.Sleep(1000); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Avoid the tight loop that checks for process exit to save cpu.
So far I am only butchering the ansi output, I will need to:
|
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #5535 +/- ##
==========================================
- Coverage 76.49% 73.94% -2.56%
==========================================
Files 602 604 +2
Lines 36472 36516 +44
==========================================
- Hits 27901 27000 -901
- Misses 8571 9516 +945
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
src/Platform/Microsoft.Testing.Platform/OutputDevice/Terminal/AnsiTerminalTestProgressFrame.cs
Show resolved
Hide resolved
src/Platform/Microsoft.Testing.Platform/OutputDevice/Terminal/NonAnsiTerminal.cs
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
merge after snap to 3.9
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |