Adding builds files to the test projects#6572
Adding builds files to the test projects#6572jonmill merged 1 commit intodotnet:masterfrom jonmill:builds
Conversation
|
@sokket As we talked about last time you shouldn't include TargetGroup configurations in the builds file right now as the tests currently don't support anything beyond the default empty TargetGroup. So please exclude any configurations that define a TargetGroup from the builds files. |
|
Sorry about that, I changed my script and it included the TargetGroup nodes...I'll fix it now |
|
Something goofy is going on. The Winodws_NT legs failed because they were running at least some tests that were marked as AnyUnix. |
|
@ellismg it looks like there isn't any xunit filtering done per-OS...the ZipFile tests had the same problem: CoreRun.exe xunit.console.netcore.exe System.IO.Compression.ZipFile.Tests.dll -xml testResults.xml -notrait Benchmark=true -notrait category=OuterLoop -notrait category=failing @weshaggard what generates the xunit command to run? It looks like we need to add the |
It's handled by tests.targets in build tools. |
|
|
|
@ellismg Thanks for pointing me to that. Maybe that file should be changed to filter based on the OS that it is running on instead of the OSGroup parameter? |
The only issue with that is I don't believe today we have a property that describes the OS your are running on. AFAIK we only distinguish between "Windows" and "Unix" for the host OS, so we'd need to add something and then plumb things through. |
|
Makes sense... @weshaggard any thoughts on if this will be the right approach? |
|
@weshaggard The problem with any of the variables I found is that they do not match up with our test case filters seen here...for instance, we turn FreeBSD distros into Ubuntu runtime but have BSD test filters. I think we will need to plumb something fully through the system to get the right traits |
|
Adding some logging to check the state of MSBuild variables on all the platforms... |
|
Windows failure is #6732, will retest since it shouldn't be a 100% repro |
|
@chcosta FYI |
dir.targets
Outdated
| <TestFilterCategory Condition="'$(OS)' == 'Linux'">-notrait category=nonlinuxtests</TestFilterCategory> | ||
| <TestFilterCategory Condition="'$(OS)' == 'FreeBSD'">-notrait category=nonfreebsdtests</TestFilterCategory> | ||
| <TestFilterCategory Condition="'$(OS)' == 'NetBSD'">-notrait category=nonnetbsdtests</TestFilterCategory> | ||
| <TestCommandLine>$(TestCommandLine) $(TestFilterCategory)</TestCommandLine> |
There was a problem hiding this comment.
I'm grabbing a copy of this code change to dir.targets, as-is, for a change I am currently working on. I'll be sure to cc you on the PR so that you are aware of any conflicts if you make additional changes. This change is simpler than the build tools change I was considering, only because coordination between buildtools and corefx won't be required. Is there a plan to move this into BuildTools? This seems somewhat redundant and likely to cause conflicts at some point given that these are additive and keying off of different properties...
There was a problem hiding this comment.
When I last spoke with @weshaggard he mentioned that he usually puts changes like this into CoreFx to vet it first and then moves it over to build tools after.
There was a problem hiding this comment.
Yes I'm cool with staging this in corefx and then prompting to buildtools.
As for the specific change I'm not entirely sure $(OS) is the right way to go here. Msbuild will currently only set it to Unix, OSX, or Windows (https://github.com/radical/msbuild/blob/fix-isosx/src/Shared/NativeMethodsShared.cs#L534). I think we probably should start passing it through the builds file as TestOSGroup or something like that which we can default to the OSGroup passed in at the root or we can start explicitly passing it.
|
Some infrastructure failures, sent emails about them. Will retest |
|
Machines went offline during the build...retrying |
|
@dotnet-bot test this please |
|
Stand by, I'm restarting the system with an update or two |
|
@mmitche cool, let me know when you've completed the update so I can re-test? |
|
@dotnet-bot test this please |
|
@weshaggard Things are green! Can you take another look please? |
dir.targets
Outdated
| <TargetFrameworkProfile></TargetFrameworkProfile> | ||
| <!-- We set this property to avoid MSBuild errors regarding not setting TargetFrameworkProfile (see above line) --> | ||
| <PortableNuGetMode>true</PortableNuGetMode> | ||
|
|
There was a problem hiding this comment.
This needs to be reconciled with @Priya91 recent BuildTools PR dotnet/buildtools#564
There was a problem hiding this comment.
Looks like I can just use TargetOS instead
There was a problem hiding this comment.
When will the BuildTools change be picked up by CoreFx?
| <Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | ||
| <PropertyGroup> | ||
| <Configuration Condition="'$(Configuration)'==''">Windows_Debug</Configuration> | ||
| <Configuration Condition="'$(Configuration)'==''">$(TargetOS)_Debug</Configuration> |
There was a problem hiding this comment.
TargetOS isn't set by the time this is evaluated so you are essentially setting it to _Debug which isn't going to help.
|
Looks like network timeouts. Trying tests again |
|
@dotnet-bot test Innerloop CentOS7.1 Debug Build and Test |
|
@weshaggard Any further feedback or can I merge this change? |
| <TestOsTarget Condition="'$(OSGroup)'==''">$(OSEnvironment)</TestOsTarget> | ||
| </PropertyGroup> | ||
| <PropertyGroup> | ||
| <InputOSGroup>$(OSGroup)</InputOSGroup> |
There was a problem hiding this comment.
InputOSGroup - Are you trying to use this to capture what is passed at the command line?
There was a problem hiding this comment.
Yes. It will capture whatever is put from the command line OR it will generate it based on the current running platform. This gives me a variable that is guaranteed to be there and have data so I can use it anywhere in the csproj
|
FYI @maririos |
| <Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | ||
| <PropertyGroup> | ||
| <Configuration Condition="'$(Configuration)'==''">Windows_Debug</Configuration> | ||
| <Configuration Condition=" '$(Configuration)' == '' ">$(OS)_Debug</Configuration> |
There was a problem hiding this comment.
Lets try this for now but I suspect this isn't going to give us the full experience we want in all scenario.
There was a problem hiding this comment.
I can probably change that to $(InputOSGroup)...that would give the desired effect
There was a problem hiding this comment.
Yes it won't but I also don't have a better answer here right now either.
|
OK after the removal of the OS fallback please squash and then LGTM Thanks for tackling this. |
|
Merging. Thanks everyone! |
Since dotnet#6572 was merged, we only build test projects for the platforms they test. This means the UnsupportedPlatforms metadata is no longer needed (instead using the .builds file to control when the project is built is the right thing to do). Leverage this in run-test.sh, we now simply loop over all the tests in the relevent folders under bin/tests, depending on the platform in question.
Since dotnet#6572 was merged, we only build test projects for the platforms they test. This means the UnsupportedPlatforms metadata is no longer needed (instead using the .builds file to control when the project is built is the right thing to do). Leverage this in run-test.sh, we now simply loop over all the tests in the relevent folders under bin/tests, depending on the platform in question.
Adding builds files to the test projects Commit migrated from dotnet/corefx@e8326c3
Adding builds files to the test projects Commit migrated from dotnet/corefx@e8326c3
Since dotnet/corefx#6572 was merged, we only build test projects for the platforms they test. This means the UnsupportedPlatforms metadata is no longer needed (instead using the .builds file to control when the project is built is the right thing to do). Leverage this in run-test.sh, we now simply loop over all the tests in the relevent folders under bin/tests, depending on the platform in question. Commit migrated from dotnet/corefx@001983b
Adding builds files to the test projects so we will only build a test project on the platform (and only with the configuration) that it should build for.
cc @weshaggard