Skip to content

Commit

Permalink
[Android] Make sure AdditionalTimeZoneChecks trait is added to xunit-…
Browse files Browse the repository at this point in the history
…excludes (dotnet#70974)

The trait is supposed to be included in System.Runtime tests by default, but wasn't because the _withoutCategories property was in tests.props. As a result, the property was resolved before the .csproj properties. This fix moves the property definition to tests.targets.

Fixes dotnet#70482
  • Loading branch information
steveisok authored Jun 21, 2022
1 parent 30bf66a commit cb32ed3
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
12 changes: 0 additions & 12 deletions eng/testing/tests.props
Original file line number Diff line number Diff line change
Expand Up @@ -10,18 +10,6 @@
<TestSingleFile Condition="'$(TestNativeAot)' == 'true'">true</TestSingleFile>
</PropertyGroup>

<PropertyGroup>
<!-- Default and user defined categories -->
<_withCategories Condition="'$(WithCategories)' != ''">;$(WithCategories.Trim(';'))</_withCategories>
<_withoutCategories Condition="'$(WithoutCategories)' != ''">;$(WithoutCategories.Trim(';'))</_withoutCategories>

<TestScope Condition="'$(TestScope)' == '' and '$(Outerloop)' == 'true'">all</TestScope>
<_withCategories Condition="'$(TestScope)' == 'outerloop'">$(_withCategories);OuterLoop</_withCategories>
<_withoutCategories Condition="'$(ArchiveTests)' == 'true'">$(_withoutCategories);IgnoreForCI</_withoutCategories>
<_withoutCategories Condition="'$(TestScope)' == '' or '$(TestScope)' == 'innerloop'">$(_withoutCategories);OuterLoop</_withoutCategories>
<_withoutCategories Condition="!$(_withCategories.Contains('failing'))">$(_withoutCategories);failing</_withoutCategories>
</PropertyGroup>

<PropertyGroup Condition="'$(TargetsMobile)' == 'true'">
<!-- Test runners are built as part of libs.pretest so we need to use libraries configuration -->
<AppleTestRunnerDir>$([MSBuild]::NormalizeDirectory('$(ArtifactsBinDir)', 'AppleTestRunner', '$(Configuration)', '$(NetCoreAppCurrent)'))</AppleTestRunnerDir>
Expand Down
12 changes: 12 additions & 0 deletions eng/testing/tests.targets
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,18 @@
<RunScriptHost Condition="'$(RunScriptWindowsCmd)' != 'true'">$(RunScriptHostDir)dotnet</RunScriptHost>
</PropertyGroup>

<PropertyGroup>
<!-- Default and user defined categories -->
<_withCategories Condition="'$(WithCategories)' != ''">;$(WithCategories.Trim(';'))</_withCategories>
<_withoutCategories Condition="'$(WithoutCategories)' != ''">;$(WithoutCategories.Trim(';'))</_withoutCategories>

<TestScope Condition="'$(TestScope)' == '' and '$(Outerloop)' == 'true'">all</TestScope>
<_withCategories Condition="'$(TestScope)' == 'outerloop'">$(_withCategories);OuterLoop</_withCategories>
<_withoutCategories Condition="'$(ArchiveTests)' == 'true'">$(_withoutCategories);IgnoreForCI</_withoutCategories>
<_withoutCategories Condition="'$(TestScope)' == '' or '$(TestScope)' == 'innerloop'">$(_withoutCategories);OuterLoop</_withoutCategories>
<_withoutCategories Condition="!$(_withCategories.Contains('failing'))">$(_withoutCategories);failing</_withoutCategories>
</PropertyGroup>

<!-- For both tests.mobile.targets and tests.wasm.targets -->
<PropertyGroup>
<_MonoAotCrossCompilerPath>$([MSBuild]::NormalizePath($(MonoAotCrossDir), 'mono-aot-cross'))</_MonoAotCrossCompilerPath>
Expand Down

0 comments on commit cb32ed3

Please sign in to comment.