Support Net6 target for DynamoCoreTests.dll (WIP for feedback)#13766
Support Net6 target for DynamoCoreTests.dll (WIP for feedback)#13766mjkkirschner merged 54 commits intoDynamoDS:masterfrom
Conversation
build portable pdbs
update nuspec
unclear if tests pass
add back ms test sdk - its needed in bin folder.
…ot precise enough.
| // fails. | ||
| Assert.AreEqual(valueA, valueB, | ||
|
|
||
| Assert.That(valueA, Is.EqualTo(valueB).Using<Dictionary>(DynamoDictionaryEquality), |
| @@ -1,4 +1,4 @@ | |||
| <Project Sdk="Microsoft.NET.Sdk"> | |||
| <Project Sdk="Microsoft.NET.Sdk"> | |||
There was a problem hiding this comment.
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.
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.
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.
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.
so we are moving stuff out even on net48 ? That will not break Revit installers ?
There was a problem hiding this comment.
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.
why is a new Setup.cs needed ?
There was a problem hiding this comment.
same reason as above, this assembly uses moq.
pinzart90
left a comment
There was a problem hiding this comment.
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:
-gfor geometryPath / geometry mode in CLI and moves toGeometryonlyDisableAnalyticsto unify tests that use CLI.Moqwhich can be referenced from NET6 -I have tried to filter them out during theThese are now copied to theinstall.slnso they are not deliveredtest/test_dependenciesfolder 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-5673Nunit3for NET6#ifdefsto move to newNUnit3asserts and attributes.Category("FailureNET6")]- some of these can be fixed with more complex refactoring so we can file a followup.Microsoft.NET.Test.Sdk17 between both solutions.TestExtensionsfromSystemTestServicestoTestServicesso it can be used in DynamoCoreTests without transitive WPF dep.Declarations
Check these if you believe they are true
*.resxfilesRelease Notes
Support Net6 target for DynamoCoreTests.dll
Reviewers