-
Notifications
You must be signed in to change notification settings - Fork 8.5k
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
Create tests that roundtrip output through a conpty to a Terminal #4213
Conversation
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.
I'm guessing there's no way to reuse the same tests without duplicate code?
…hich are blocked on #4213
At this point maybe but I kinda expect these tests to drift more over time, where re-using the code would make letting the tests drift apart and specialize harder. I guess I could just not have the |
Co-Authored-By: Carlos Zamora <[email protected]>
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.
Awesome. Glad to have these coming online. Just a few minor comments.
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.
Excellent, thanks. I'll try to fix the build issue given it's probably merge related and a bit late for you today.
Hello @miniksa! Because this pull request has the p.s. you can customize the way I help with merging this pull request, such as holding this pull request until a specific person approves. Simply @mention me (
|
// STEP 2: Set up the Conpty | ||
|
||
// Set up some sane defaults | ||
auto& g = ServiceLocator::LocateGlobals(); |
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.
Oh i am very deeply concerned that the TerminalCore tests have a dependency on CONSOLE_INFORMATION
😦
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.
I mean if it's going to straddle looking at conpty and terminal... it sort of has to. The alternative is breaking it into YET ANOTHER library.
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.
Yea it's kinda the whole point of this particular test. Yes I could move this to it's own project, but is that worth it?
Ugh it's still toast somehow. Unmarking automerge. Now I have to go for the day so @zadjii-msft will probably see this in the morning before me. |
tests got stuck 😢 /azp run |
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
…inal (microsoft#4213)" This reverts commit 62765f1.
## Summary of the Pull Request In #4213 I added a dependency to the `UnitTests_TerminalCore` project on basically all of conhost. This _worked on my machine_, but it's consistently not working on other machines. This should fix those issues. ## References ## PR Checklist * [x] Closes #4285 * [x] I work here * [n/a] Tests added/passed * [n/a] Requires documentation to be updated ## Validation Steps Performed Made a fresh clone and built it.
Summary of the Pull Request
This PR adds two tests:
ConptyOutputTests
in the host unit tests.Terminal
"? Hence, theConptyRoundtripTests
were born, into the TerminalCore unit tests.References
Done in pursuit of #4200, but I felt this warranted it's own atomic PR
PR Checklist
Detailed Description of the Pull Request / Additional comments
From the comment in
ConptyRoundtripTests
:Also, some other bits had to be updated:
pThread->NotifyPaint
CommonState
usedNTSTATUS_FROM_HRESULT
which did not work outside the host project. Since theNTSTATUS
didn't seem that important, I replaced that with aHRESULT
CommonState
likes to initialize the console to some weird defaults. I added an optional param to let us just use the defaults.