-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
Switch over Loader/classloader/TypeGeneratorTests to use merged wrappers #61942
Conversation
Tagging subscribers to this area: @hoyosjs Issue DetailsThis is an initial attempt to introduce a group project. As of the initial commit it doesn't yet have any Helix identity of its own - in grouped (non-standalone) mode, the group project replaces its initial component projects and ends up with a single Helix xUnit result (as it still gets run through the xUnit wrapper logic). We need to decide whether this is acceptable or whether we need to retain the original behavior of each test case reporting its results individually in a way that can be parsed by our scripts. This is going to become even more important once we start pushing towards converting all tests to the new style. Assuming we want to keep the individual test cases visible in AzDO, this change will require an additional delta to implement the relevant logic. The change switches over the first 100 type generator tests (numbers 0-99); to facilitate lab coverage, it also sets BuildAsStandalone to false by default in contrast to Jeremy's original implementation. I have verified locally that by setting BuildAsStandalone to true I get the original 1501 tests with individual results. By not setting BuildAsStandalone or by setting it to false, I'm receiving the correct number of 1402 tests (1401 original non-merged tests from 100 onward and the one extra grouped test). Thanks Tomas
|
As a side note, the initial local testing confirmed the previously heralded perf wins - the |
Don't we want (need?) each test to get its own result? This is true for the libraries tests today, isn't it? Each test result needs to get uploaded to Kusto to be available for query over the results, as well as to be individually visible in AzDO. |
@BruceForstall - agreed, I've also come to the conclusion it's not acceptable even temporarily to change the lab behavior in this manner. Jeremy has already introduced logic for emitting the xUnit summaries, I'm now working on piping them through the Helix infrastructure next to the legacy xUnit console results. |
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.
fwiw, this change LGTM, but @jkoritzinsky should review it.
@BruceForstall - sure, this change is definitely not ready to be checked in tomorrow. I'm still hitting a couple of test build failures, I need to add the support for processing the new xUnit summaries and I'll definitely wait for Jeremy to review it. At this point I'm publishing it mostly as a heads-up regarding what the future merged projects are going to look like. |
@fanyang-mono and I are both takign some time off before the Thanksgiving holiday. I will give this a look over when I get back. |
Thanks @naricc for the heads-up, that's just fine of course; as you can see, the change is not even passing yet; furthermore Jeremy is also OOF for Thanksgiving and I definitely need his review too. |
49080dd
to
03cdc1d
Compare
@jkoritzinsky - I have improved local reporting in run.py to look somewhat like the pre-existing xunit console reporting. As you can see, the output is not yet ideal. I'd love to collect broad feedback regarding showstopper and nice-to-have improvements. Parsing test results from (D:\git\runtime4\artifacts\log\TestRunResults_windows_x64_Release) Analyzing D:\git\runtime4\artifacts\log\TestRun.xml Analyzing D:\git\runtime4\artifacts\log\TypeGeneratorTests0-99.testRun.xml Failed test: Generated42Main # Test output recorded in log file. Time [secs] | Total | Passed | Failed | Skipped | Assembly Execution Summary ============================================================================ 46.819 | 1401 | 1401 | 0 | 0 | Loader.classloader.XUnitWrapper.dll 0.417 | 100 | 99 | 1 | 0 | TypeGeneratorTests0-99 ---------------------------------------------------------------------------- 47.236 | 1501 | 1500 | 1 | 0 | (total) Most notably, neither the wrapper name nor the failed test case give any indication of their location in the test tree making developer orientation quite difficult. Thanks Tomas |
I've pushed up a change that should update the display name of a test to give the path to the assembly if it is the only test in the assembly (which is the initial simple migration path for tests and the likely forever story for IL tests) |
98e317b
to
9e3b38c
Compare
@jkoritzinsky - I have experimentally added one more wrapper project for the |
OK, so here is my TODO list to things to validate before merging this in:
|
@jkoritzinsky - big sigh of relief, the latest outerloop job finally does the right thing - it fails the one instrumented test and properly reports it. As you can easily see here, the lengthy log spanning the multiple tests is quite hard for orientation. I'm wondering whether we might be able to mitigate that by 2-3 small improvements to the source generator:
Thanks Tomas |
For item 8 in your list, that's the expected behavior. That's why the default for BuildAsStandalone is |
@jkoritzinsky - I'm not sure if I'm getting this, how can we then gradually transform the source tree to the new model? Your response seems to imply that we can only merge this PR in once all the tests have been transformed to merged wrappers while I believe the entire purpose of our current work so far is to allow for an intermediate heterogeneous phase where some tests have already been converted whereas others have not; I don't think it's realistic to fully convert the entire source tree in a single PR. |
@trylek The idea is to have everyone migrate their tests to use Then, we'll go through and add the merged test runners until we've covered the whole test tree. Once we've covered the whole test tree, then we will switch the default of |
Basically, as long as the transition to using the Xunit attributes is done within a subtree before we create the merged runners, then we can do this piecemeal through the whole test tree. |
OK, so for the TypeGeneratorTests the "transition to using the Xunit attributes" has already been carried out. So what else needs to be done beyond the gist of this PR to actually switch them over to the new model where by default they'll use the merged wrapper unless |
When you updated the IL tests to have the
I think the fact that this PR has some tests already converted (and IIRC you tentatively converted some C# tests as well), so the |
…d bad assumptions based on the old design that are no longer true)
…ple testResult.xml files
…as the relative path to the assembly.
9e9f958
to
a564138
Compare
@jkoritzinsky - is that blocking for this particular change that only converts Pri1 tests that are not exercised in Mono testing at all? I certainly agree that we need to fix that soon but I'm wondering whether for the sake of expediency we might be able to parallelize the efforts - i.o.w. if we agree that this particular change doesn't hurt Mono testing in any fundamental manner, merging it in would substantially simplify both your device support changes and my continued work on debugging the switch-over of additional tests. |
I don't think that's a blocker for this PR as it only switches over Pri1 tests that Mono doesn't run. Just wanted to make sure that the deficiency was known before the Mono folks went looking for it. |
The PR failures are known ongoing issues and aren't related to this work. I think this all looks great! |
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.
Let's get this in!
Thanks Jeremy for your supportive review. I'm merging this in based on our shared understanding that this particular change cannot regress Mono testing as it only involves Pri1 tests that aren't currently exercised in Mono testing. I'll make sure to address any feedback Mono developers might have in a follow-up change. |
This is an initial attempt to introduce a group project. As of the initial commit it doesn't yet have any Helix identity of its own - in grouped (non-standalone) mode, the group project replaces its initial component projects and ends up with a single Helix xUnit result (as it still gets run through the xUnit wrapper logic).
We need to decide whether this is acceptable or whether we need to retain the original behavior of each test case reporting its results individually in a way that can be parsed by our scripts. This is going to become even more important once we start pushing towards converting all tests to the new style. Assuming we want to keep the individual test cases visible in AzDO, this change will require an additional delta to implement the relevant logic.
The change switches over the first 100 type generator tests (numbers 0-99); to facilitate lab coverage, it also sets BuildAsStandalone to false by default in contrast to Jeremy's original implementation. I have verified locally that by setting BuildAsStandalone to true I get the original 1501 tests with individual results. By not setting BuildAsStandalone or by setting it to false, I'm receiving the correct number of 1402 tests (1401 original non-merged tests from 100 onward and the one extra grouped test).
Thanks
Tomas