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

Expand SupportOSPlatform to mean minimum supported version #4569

Merged

Conversation

manfred-brands
Copy link
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
Copy link
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
5 checks passed
@manfred-brands manfred-brands deleted the Issue4564-SupportedOSPlatform branch November 29, 2023 03:51
@christophwille
Copy link

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

@manfred-brands
Copy link
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

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
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

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

@christophwille
Copy link

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
Member

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

@christophwille
Copy link

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
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

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
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

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

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
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