Create tests that roundtrip output through a conpty to a Terminal#4213
Create tests that roundtrip output through a conpty to a Terminal#42138 commits merged intomasterfrom
Conversation
carlos-zamora
left a comment
There was a problem hiding this comment.
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]>
miniksa
left a comment
There was a problem hiding this comment.
Awesome. Glad to have these coming online. Just a few minor comments.
miniksa
left a comment
There was a problem hiding this comment.
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.
Oh i am very deeply concerned that the TerminalCore tests have a dependency on CONSOLE_INFORMATION 😦
There was a problem hiding this comment.
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.
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:
ConptyOutputTestsin the host unit tests.Terminal"? Hence, theConptyRoundtripTestswere 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->NotifyPaintCommonStateusedNTSTATUS_FROM_HRESULTwhich did not work outside the host project. Since theNTSTATUSdidn't seem that important, I replaced that with aHRESULTCommonStatelikes to initialize the console to some weird defaults. I added an optional param to let us just use the defaults.