Skip to content

Expand SupportOSPlatform to mean minimum supported version#4569

Merged
manfred-brands merged 2 commits intonunit:masterfrom
manfred-brands:Issue4564-SupportedOSPlatform
Nov 29, 2023
Merged

Expand SupportOSPlatform to mean minimum supported version#4569
manfred-brands merged 2 commits intonunit:masterfrom
manfred-brands:Issue4564-SupportedOSPlatform

Conversation

@manfred-brands
Copy link
Copy Markdown
Member

Fixes #4564

Windows7 => WIndows7, Windows8, Windows10, Windows11
Windows10 => Windows10, Windows11

Added windows only test assembly with MS generated SupportOSPlatform attribute

Windows7 => WIndows7, Windows8, Windows10, Windows11
Windows10 => Windows10, Windows11

Added windows only test assembly with MS generated SupportOSPlatform attribute
@manfred-brands manfred-brands force-pushed the Issue4564-SupportedOSPlatform branch from a8b133b to 5e557a6 Compare November 29, 2023 02:44
Copy link
Copy Markdown
Member

@stevenaw stevenaw left a comment

Choose a reason for hiding this comment

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

Thanks for the prompt PR @manfred-brands !
No concerns from me, LGTM.

@manfred-brands manfred-brands merged commit 866d5a4 into nunit:master Nov 29, 2023
@manfred-brands manfred-brands deleted the Issue4564-SupportedOSPlatform branch November 29, 2023 03:51
@christophwille
Copy link
Copy Markdown

Could you please publish this somewhere (MyGet, ...) to easily try it?

@manfred-brands
Copy link
Copy Markdown
Member Author

Could you please publish this somewhere (MyGet, ...) to easily try it?

The nuget package is available from the build action
Extract it to a local nuget feed (on your own drive). See

@christophwille
Copy link
Copy Markdown

That doesn't quite cut it - icsharpcode/ILSpy#3132 in addition to local failures, we are also failing on GH actions. I don't want to check in a binary just for testing.

@OsirisTerje
Copy link
Copy Markdown
Member

I have pushed the latest up to MyGet at https://www.myget.org/feed/nunit/package/nuget/NUnit/4.1.0-adev.1

@christophwille
Copy link
Copy Markdown

Let's find out then how dotnet test fares on GH with the new package icsharpcode/ILSpy@d3de474

@christophwille
Copy link
Copy Markdown

No, it doesn't: https://github.com/icsharpcode/ILSpy/actions/runs/7030026378/job/19128743036 (note locally in VS it works a-ok). Is dotnet test behaving differently than VS in this case then?

Run dotnet test --logger "junit;LogFileName=Debug.xml" --results-directory test-results $env:Tests1 $env:Tests2 $env:Tests3
Microsoft (R) Test Execution Command Line Tool Version [17](https://github.com/icsharpcode/ILSpy/actions/runs/7030026378/job/19128743036#step:10:18).8.0 (x64)
Copyright (c) Microsoft Corporation.  All rights reserved.

Starting test execution, please wait...
A total of 3 test files matched the specified pattern.
No test is available in D:\a\ILSpy\ILSpy\ICSharpCode.Decompiler.Tests\bin\Debug\net8.0-windows\win-x64\ICSharpCode.Decompiler.Tests.dll. Make sure that test discoverer & executors are registered and platform & framework version settings are appropriate and try again.
No test is available in D:\a\ILSpy\ILSpy\ILSpy.Tests\bin\Debug\net8.0-windows\ILSpy.Tests.dll. Make sure that test discoverer & executors are registered and platform & framework version settings are appropriate and try again.
No test is available in D:\a\ILSpy\ILSpy\ILSpy.BamlDecompiler.Tests\bin\Debug\net8.0-windows\win-x64\ILSpy.BamlDecompiler.Tests.dll. Make sure that test discoverer & executors are registered and platform & framework version settings are appropriate and try again.
Results File: D:\a\ILSpy\ILSpy\test-results\Debug.xml

@OsirisTerje
Copy link
Copy Markdown
Member

It should not. Does it run on command line locally ?

@christophwille
Copy link
Copy Markdown

Very, very strange. Locally it works in all those variations:

PS D:\GitWorkspace\ILSpy\ILSpy.Tests> dotnet test
PS D:\GitWorkspace\ILSpy\ILSpy.Tests\bin\Debug\net8.0-windows> dotnet test ilspy.tests.dll
PS D:\GitWorkspace\ILSpy\ILSpy.Tests\bin\Debug\net8.0-windows> dotnet test --logger "junit;LogFileName=Debug.xml" --results-directory test-results ilspy.tests.dll

all report Passed! - Failed: 0, Passed: 118, Skipped: 0, Total: 118, Duration: 264 ms - ilspy.tests.dll (net8.0)

@OsirisTerje
Copy link
Copy Markdown
Member

OsirisTerje commented Nov 29, 2023

Yes, I got the same on that test project. 118 tests passing with no issues.

Interestingly enough, if I try to run the tests on the ICSharpCode.Decompiler.Tests, I am rewarded with the Virus Threat kicking off, about some
image

And a bunch of errors like:
image

@christophwille
Copy link
Copy Markdown

christophwille commented Nov 29, 2023

Test cases come from a submodule (git submodule update --init --recursive), and yes, we know that Antivirus doesn't like some of the code. ILSpy.Tests is the one with the least dependencies on "strange" use case that were submitted to us.

Edit: if there's anything you think might help in making dotnet test more verbose / actually work, please let me know. Editing the workflow yml is not a problem.

@OsirisTerje
Copy link
Copy Markdown
Member

OsirisTerje commented Nov 29, 2023

You can add "-- NUnit.Verbosity=5" That give you a little bit more information. Are you using any .runsettings file? Also, you can add "NUnit.DumpXmlTestDiscovery=true" and "NUnit.DumpXmlTestResults=true". Add them either on the command line after the Verbosity option, or add all of them to a .runsettings file,

Edit: Trying this locally, I can't see any dump folder below the bin/net8-windows folder. And that is weird.

@christophwille
Copy link
Copy Markdown

No, no .runsettings. Locally adding -- NUnit.Verbosity=5 doesn't really change much in the output at all.

dotnet test --logger "junit;LogFileName=Debug.xml" --results-directory test-results ilspy.tests.dll -- NUnit.Verbosity=5

@christophwille
Copy link
Copy Markdown

I have added --diag to icsharpcode/ILSpy@9982e1c
dotnettestdiag-Debug.txt

btw, should we move the discussion to a new issue maybe?

@OsirisTerje
Copy link
Copy Markdown
Member

btw, should we move the discussion to a new issue maybe?

Yes, please do.

Did you also add the NUnit.DumpXmlTestResults=true? And, did you get anything in the Dump folder ?

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.

Tests not discovered for .NET Windows-specific TFM without Windows build number

4 participants