This repository was archived by the owner on Jan 23, 2023. It is now read-only.
Repository navigation
Re-enable XmlSerializer.Generator tests - #23978
Merged
Merged
Conversation
Tests may want to copy a ReferenceFromRuntime to the test output directory. To do this, a test can set Private=true (same as you would for a Reference). By default we don't do this, because anything in the runtime folder will be part of the shared framework that the test runs on. In the case of Microsoft.XmlSerializer.Generator it's reference is an application and the project expects this to be next to the test assembly.
The test CLI uses the binaries that were just built as opposed to the tools CLI, which was previously being used, which contains whatever binaries were in that LKG version of the shared framework.
This was needed after dotnet@664ca95 changed the tests to run from a binplaced location rather than the outputpath of the test.
Previously these were disabled if the generated dll was missing, now they'll fail if the DLL is missing.
…etcoreapp The tests will also run on desktop (and potentially UWP). In those cases we'll use the tool's shared-framework for GenerateSerializationAssembly since we don't have a test shared framework (since we're not building netcoreapp).
ericstj
force-pushed
the
serializerTest
branch
2 times, most recently
from
September 12, 2017 21:16
33b5926 to
6d9c253
Compare
ericstj
force-pushed
the
serializerTest
branch
from
September 12, 2017 22:58
6d9c253 to
0ae834a
Compare
ericstj
force-pushed
the
serializerTest
branch
from
September 12, 2017 23:32
0ae834a to
43e9165
Compare
shmao
approved these changes
Sep 13, 2017
| <Exec Command="$(GeneratorCliPath)dotnet $(OutputPath)dotnet-Microsoft.XmlSerializer.Generator.dll $(OutputPath)Microsoft.XmlSerializer.Generator.Tests.dll /force /casesensitive" /> | ||
| <Warning Condition="Exists('$(OutputPath)$(SerializerName).cs') != 'true'" Text="Fail to generate $(OutputPath)$(SerializerName).cs"/> | ||
| <Csc Condition="Exists('$(OutputPath)$(SerializerName).cs') == 'true'" ContinueOnError="true" | ||
| <Csc Condition="Exists('$(OutputPath)$(SerializerName).cs') == 'true' AND '$(MSBuildRuntimeType)' != 'core'" ContinueOnError="true" |
Contributor
There was a problem hiding this comment.
We may want to remove ContinueOnError="true". But that can be done in a separate PR.
cc: @huanwu
Member
There is a problem in cross build environment, because we can't run on the test framework when we are cross-building corefx tests. I've opened the issue #24029 and PR #24030. |
picenka21
pushed a commit
to picenka21/runtime
that referenced
this pull request
Feb 18, 2022
Re-enable XmlSerializer.Generator tests Commit migrated from dotnet/corefx@6b948dd
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Please see individual commits.
In a nutshell this re-enables the tests and ensures they run on the test framework rather than the tool framework.