Skip to content
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

reduce test log noise #14705

Closed
wants to merge 1 commit into from
Closed

reduce test log noise #14705

wants to merge 1 commit into from

Conversation

pinzart90
Copy link
Contributor

Issue:
DynamoCoreTests and a couple of others are still targeting net6 (core, no wpf) because they are also part of the DynamoCore.sln
However a lot of tests in these projects still try to load/handle UI packages (that have WPF and windows references).

Fix:
In this PR I set all test projects that build part of the Dynamo.All.sln as UI libs (add windows and WPF references)
When building DynamoCore.sln we will still have the issue.

The proper fix would be to completely move out all UI related test from our core test. Until that happens we are going to see errors like "WindowsBase.dll not found" when running tests on DynamoCore

@@ -3,7 +3,8 @@
ToolsVersion="16.0"
DefaultTargets="Build">
<PropertyGroup>
<Solution>Dynamo.All.sln</Solution>
<SolutionName>Dynamo.All</SolutionName>
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

SolutionName is part of the msbuild common macros, but only in the VS IDE https://learn.microsoft.com/en-us/cpp/build/reference/common-macros-for-build-commands-and-properties?view=msvc-170
For console builds, we also set the property here

@mjkkirschner
Copy link
Member

I am worried this could allow a core test to pass that should really fail. Do you think that is a possibility?

@pinzart90
Copy link
Contributor Author

I am worried this could allow a core test to pass that should really fail. Do you think that is a possibility?

Yes, We already have this going almost all the tests (marked as UILib)
In this PR we're just making sure we get them all :)

To move out all the UI tests out of core projects might be a lot of work.
But maybe all we have to do is to recompile the assemblies that are loaded during core tests as core, i.e no wpf/windows references. Those would be the local packages assemblies in our test folder

@@ -22,7 +23,7 @@

<Target Name="RestorePackages">
<Exec Condition="!Exists($(NuGetPath))" Command="powershell.exe -ExecutionPolicy ByPass -Command Invoke-WebRequest -Uri https://dist.nuget.org/win-x86-commandline/latest/nuget.exe -OutFile $(NuGetPath)" />
<Exec Command="dotnet restore $(Solution) --runtime=$(RuntimeIdentifier) -p:DotNet=$(DotNet)"/>
<Exec Command="dotnet restore $(Solution) --runtime=$(RuntimeIdentifier) -p:DotNet=$(DotNet) -p:SolutionName=$(SolutionName)"/>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do we need to pass SolutionName to this command in addition to Solution?

@pinzart90 pinzart90 closed this Dec 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants