-
Notifications
You must be signed in to change notification settings - Fork 634
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
Support Net6 target for DynamoCoreTests.dll (WIP for feedback) #13766
Conversation
build portable pdbs
update nuspec
unclear if tests pass
add back ms test sdk - its needed in bin folder.
…ot precise enough.
@@ -293,7 +293,8 @@ public static void CompareWorkspaceModels(serializationTestUtils.WorkspaceCompar | |||
// When values are geometry, sometimes the creation | |||
// of the string representation for forming this message | |||
// fails. | |||
Assert.AreEqual(valueA, valueB, | |||
|
|||
Assert.That(valueA, Is.EqualTo(valueB).Using<Dictionary>(DynamoDictionaryEquality), |
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.
👍
@@ -1,4 +1,4 @@ | |||
<Project Sdk="Microsoft.NET.Sdk"> | |||
<Project Sdk="Microsoft.NET.Sdk"> |
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.
how are we running tests for a wpf project ?
Or what is this change about ?
I see there is also a new Setup.cs file ? why ?
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.
because now Moq
(v 4.18 - even on net48) has new dependencies which I only copy to the test/test_dependencies
folder. So we need to setup a setupfixture resolve handler to find them.
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.
It just seemed to me that most of the Visualization tests are derived from SystemTestBase which already uses an AssemblyResolver which we could use
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.
yes, but not all of them - then we'd have two places to remember to look for this resolve to occur.
<Copy SourceFiles="$(PkgSystem_Buffers)\lib\netstandard2.0\System.Buffers.dll" DestinationFolder="$(TestDependenciesPath)" /> | ||
</Target> | ||
|
||
<Target Name="MoveSomeTestDepsOutOfBin_net48" AfterTargets="Build" Condition=" '$(TargetFramework)' == 'net48' "> |
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.
so we are moving stuff out even on net48 ? That will not break Revit installers ?
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.
no because these are new dependencies of Moq
- and I put Moq
back in the bin folder as the last step:
<Copy SourceFiles="$(PkgMoq)\lib\netstandard2.0\Moq.dll" DestinationFolder="$(OutputPath)" />
@@ -0,0 +1,43 @@ | |||
using Dynamo.Utilities; |
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.
why is a new Setup.cs needed ?
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.
same reason as above, this assembly uses moq.
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.
A couple of questions, then LGTM
the test failure appears to have come from here: |
…oDS#13766) * add new action * try general var syntax * update * dont use regen in core * try also not generating resource binaries for string resources * pull actual code changes * linux paths * test command * add single test project to sln * add new nuspec * add post script * revert adding test proj build portable pdbs * build portable in release update nuspec * remove publish script * remove test from github action * review comments * by hook or by crook we'll reuse existing test base classes. * this works * both solutions build at this point unclear if tests pass * try running some linux tests * build current branch from fork * updates * updates * update * ugh fix bug * fix test * fix more tests * fix more tests * fix mono build * try cat = unittests * linux not finding any tests * Update dynamoNet6.0_linux_build.yml * dont run tests * dont include castle core in build upgrade moq * remove net60smoketests unify on 17 version of ms.net.test.sdk * update python and fix refs * remove duplicate ms.net.test.sdk ref * introduce junit logger add back ms test sdk - its needed in bin folder. * use custom dictionary comparison function in nunit * compare keys and values when encountering dictionary - toString was not precise enough. * fix test mark test failure * introduce a failure * update dscpython with split * fix build for nunit2 * remove failure * copy moqs deps to test deps directory * fix * find moq for tests that were failing * review comments * review comments * mark failure
* add new action * try general var syntax * update * dont use regen in core * try also not generating resource binaries for string resources * pull actual code changes * linux paths * test command * add single test project to sln * add new nuspec * add post script * revert adding test proj build portable pdbs * build portable in release update nuspec * remove publish script * remove test from github action * review comments * by hook or by crook we'll reuse existing test base classes. * this works * both solutions build at this point unclear if tests pass * try running some linux tests * build current branch from fork * updates * updates * update * ugh fix bug * fix test * fix more tests * fix more tests * fix mono build * try cat = unittests * linux not finding any tests * Update dynamoNet6.0_linux_build.yml * dont run tests * dont include castle core in build upgrade moq * remove net60smoketests unify on 17 version of ms.net.test.sdk * update python and fix refs * remove duplicate ms.net.test.sdk ref * introduce junit logger add back ms test sdk - its needed in bin folder. * use custom dictionary comparison function in nunit * compare keys and values when encountering dictionary - toString was not precise enough. * fix test mark test failure * introduce a failure * update dscpython with split * fix build for nunit2 * remove failure * copy moqs deps to test deps directory * fix * find moq for tests that were failing * review comments * review comments * mark failure
Purpose
This PR starts to move tests in DynamoCoreTests to .NET6.
It's still a WIP - but I think it's ready for feedback.
does the following:
-g
for geometryPath / geometry mode in CLI and moves toGeometry
onlyDisableAnalytics
to unify tests that use CLI.Moq
which can be referenced from NET6 -I have tried to filter them out during theThese are now copied to theinstall.sln
so they are not deliveredtest/test_dependencies
folder and resolvers added to look here during testing.(FFITarget,Moq, Nunit.Framework)
- it appears that exclusions need to be added to the robo copy step indynamoinstall.csproj
- hopefully we come up with a more holistic solution before the next GL. https://jira.autodesk.com/browse/DYN-5673Nunit3
for NET6#ifdefs
to move to newNUnit3
asserts and attributes.Category("FailureNET6")]
- some of these can be fixed with more complex refactoring so we can file a followup.Microsoft.NET.Test.Sdk
17 between both solutions.TestExtensions
fromSystemTestServices
toTestServices
so it can be used in DynamoCoreTests without transitive WPF dep.Declarations
Check these if you believe they are true
*.resx
filesRelease Notes
Support Net6 target for DynamoCoreTests.dll
Reviewers