Skip to content

Commit

Permalink
Build all src in Linux (#1920)
Browse files Browse the repository at this point in the history
  • Loading branch information
Evangelink authored Dec 11, 2023
1 parent 933faf4 commit 197b50d
Show file tree
Hide file tree
Showing 16 changed files with 344 additions and 135 deletions.
6 changes: 3 additions & 3 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,9 @@ insert_final_newline = true
trim_trailing_whitespace = true

[*.{cs,vb}]
end_of_line = crlf

# Do not set end_of_line property, this is causing issues with Linux,
# see https://github.com/dotnet/roslyn/issues/55526

#### .NET Coding Conventions ####

Expand All @@ -71,8 +73,6 @@ file_header_template = Copyright (c) Microsoft Corporation. All rights reserved.

## Styling conventions

end_of_line = crlf

csharp_indent_labels = one_less_than_current
csharp_prefer_braces = true:silent
csharp_prefer_simple_default_expression = true:suggestion
Expand Down
13 changes: 7 additions & 6 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
###############################################################################
# Set default behavior to automatically normalize line endings.
###############################################################################
* text=auto
* text=auto encoding=UTF-8

*.sh text=auto eol=lf
*.cmd text=auto eol=crlf
*.bat text=auto eol=crlf

###############################################################################
# Set default behavior for command prompt diff.
Expand All @@ -10,7 +14,8 @@
# default for csharp files.
# Note: This is only used by command line
###############################################################################
#*.cs diff=csharp
*.cs diff=csharp text
*.vb text

###############################################################################
# Set the merge driver for project and solution files
Expand Down Expand Up @@ -61,7 +66,3 @@
#*.PDF diff=astextplain
#*.rtf diff=astextplain
#*.RTF diff=astextplain

# Force bash scripts to always use lf line endings so that if a repo is accessed
# in Unix via a file share from Windows, the scripts will work.
*.sh text eol=lf
202 changes: 101 additions & 101 deletions .github/policies/resourceManagement.yml
Original file line number Diff line number Diff line change
@@ -1,101 +1,101 @@
id:
name: GitOps.PullRequestIssueManagement
description: GitOps.PullRequestIssueManagement primitive
owner:
resource: repository
disabled: false
where:
configuration:
resourceManagementConfiguration:
scheduledSearches:
- description:
frequencies:
- hourly:
hour: 6
filters:
- isIssue
- isOpen
- hasLabel:
label: 'Needs: Author Feedback'
- hasLabel:
label: 'State: No Recent Activity'
- noActivitySince:
days: 10
actions:
- closeIssue
- description:
frequencies:
- hourly:
hour: 6
filters:
- isIssue
- isOpen
- hasLabel:
label: 'Needs: Author Feedback'
- noActivitySince:
days: 4
- isNotLabeledWith:
label: 'State: No Recent Activity'
actions:
- addLabel:
label: 'State: No Recent Activity'
- addReply:
reply: This issue has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for **4 days**. It will be closed if no further activity occurs **within 10 days of this comment**.
- description:
frequencies:
- hourly:
hour: 6
filters:
- isIssue
- isOpen
- hasLabel:
label: 'Resolution: Duplicate'
- noActivitySince:
days: 1
actions:
- addReply:
reply: This issue has been marked as duplicate and has not had any activity for **1 day**. It will be closed for housekeeping purposes.
- closeIssue
eventResponderTasks:
- if:
- payloadType: Issue_Comment
- isAction:
action: Created
- isActivitySender:
issueAuthor: True
- hasLabel:
label: 'Needs: Author Feedback'
- isOpen
then:
- addLabel:
label: 'Needs: Attention :wave:'
- removeLabel:
label: 'Needs: Author Feedback'
description:
- if:
- payloadType: Issues
- not:
isAction:
action: Closed
- hasLabel:
label: 'State: No Recent Activity'
then:
- removeLabel:
label: 'State: No Recent Activity'
description:
- if:
- payloadType: Issue_Comment
- hasLabel:
label: 'State: No Recent Activity'
then:
- removeLabel:
label: 'State: No Recent Activity'
description:
- if:
- payloadType: Pull_Request
then:
- inPrLabel:
label: 'State: In-PR'
description:
onFailure:
onSuccess:
id:
name: GitOps.PullRequestIssueManagement
description: GitOps.PullRequestIssueManagement primitive
owner:
resource: repository
disabled: false
where:
configuration:
resourceManagementConfiguration:
scheduledSearches:
- description:
frequencies:
- hourly:
hour: 6
filters:
- isIssue
- isOpen
- hasLabel:
label: 'Needs: Author Feedback'
- hasLabel:
label: 'State: No Recent Activity'
- noActivitySince:
days: 10
actions:
- closeIssue
- description:
frequencies:
- hourly:
hour: 6
filters:
- isIssue
- isOpen
- hasLabel:
label: 'Needs: Author Feedback'
- noActivitySince:
days: 4
- isNotLabeledWith:
label: 'State: No Recent Activity'
actions:
- addLabel:
label: 'State: No Recent Activity'
- addReply:
reply: This issue has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for **4 days**. It will be closed if no further activity occurs **within 10 days of this comment**.
- description:
frequencies:
- hourly:
hour: 6
filters:
- isIssue
- isOpen
- hasLabel:
label: 'Resolution: Duplicate'
- noActivitySince:
days: 1
actions:
- addReply:
reply: This issue has been marked as duplicate and has not had any activity for **1 day**. It will be closed for housekeeping purposes.
- closeIssue
eventResponderTasks:
- if:
- payloadType: Issue_Comment
- isAction:
action: Created
- isActivitySender:
issueAuthor: True
- hasLabel:
label: 'Needs: Author Feedback'
- isOpen
then:
- addLabel:
label: 'Needs: Attention :wave:'
- removeLabel:
label: 'Needs: Author Feedback'
description:
- if:
- payloadType: Issues
- not:
isAction:
action: Closed
- hasLabel:
label: 'State: No Recent Activity'
then:
- removeLabel:
label: 'State: No Recent Activity'
description:
- if:
- payloadType: Issue_Comment
- hasLabel:
label: 'State: No Recent Activity'
then:
- removeLabel:
label: 'State: No Recent Activity'
description:
- if:
- payloadType: Pull_Request
then:
- inPrLabel:
label: 'State: In-PR'
description:
onFailure:
onSuccess:
8 changes: 0 additions & 8 deletions Directory.Build.Local.targets
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,6 @@

<Import Project="Sdk.targets" Sdk="Microsoft.DotNet.Arcade.Sdk" />

<!-- Linux properties -->
<PropertyGroup Condition=" '$(OS)' != 'Windows_NT' ">
<!-- Force setting TargetFrameworks only if it was set -->
<TargetFrameworks Condition=" '$(TargetFrameworks)' != '' ">$(NetCurrent)</TargetFrameworks>
<!-- Force setting TargetFramework only if it was set -->
<TargetFramework Condition=" '$(TargetFramework)' != '' ">$(NetCurrent)</TargetFramework>
</PropertyGroup>

<PropertyGroup Condition=" '$(UseAssemblyVersion14)' == 'true' ">
<!--
It appears that AssemblyVersion should always be set to 14.0.0.0 for some backward compatibility cases,
Expand Down
6 changes: 3 additions & 3 deletions eng/Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
</ItemGroup>

<ItemGroup Condition=" '$(OS)' != 'Windows_NT' ">
<ProjectToBuild Include="$(RepoRoot)src\Platform\Microsoft.Testing.Platform\Microsoft.Testing.Platform.csproj" />
<ProjectToBuild Include="$(RepoRoot)test\UnitTests\Microsoft.Testing.Platform.UnitTests\Microsoft.Testing.Platform.UnitTests.csproj" />
<ProjectToBuild Include="$(RepoRoot)test\IntegrationTests\Microsoft.Testing.Platform.Acceptance.IntegrationTests\Microsoft.Testing.Platform.Acceptance.IntegrationTests.csproj" />
<ProjectToBuild Include="$(RepoRoot)src/**/*.csproj" />
<ProjectToBuild Include="$(RepoRoot)test/UnitTests/Microsoft.Testing.Platform.UnitTests/Microsoft.Testing.Platform.UnitTests.csproj" />
<ProjectToBuild Include="$(RepoRoot)test/IntegrationTests/Microsoft.Testing.Platform.Acceptance.IntegrationTests/Microsoft.Testing.Platform.Acceptance.IntegrationTests.csproj" />
</ItemGroup>

</Project>
Empty file modified eng/common/dotnet-install.sh
100644 → 100755
Empty file.
81 changes: 81 additions & 0 deletions src/Adapter/MSTest.TestAdapter/MSTest.TestAdapter.Linux.nuspec
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
<?xml version="1.0"?>
<package >
<metadata>
$CommonMetadataElements$
<dependencies>
<group targetFramework="netstandard2.0">
<dependency id="Microsoft.Testing.Platform.Extensions.VSTestBridge" version="$TestingPlatformVersion$" />
<dependency id="Microsoft.Testing.Platform.MSBuild" version="$TestingPlatformVersion$" />
</group>
<group targetFramework="netcoreapp3.1">
<dependency id="Microsoft.Testing.Platform.Extensions.VSTestBridge" version="$TestingPlatformVersion$" />
<dependency id="Microsoft.Testing.Platform.MSBuild" version="$TestingPlatformVersion$" />
</group>
<group targetFramework="net6.0">
<dependency id="Microsoft.Testing.Platform.Extensions.VSTestBridge" version="$TestingPlatformVersion$" />
<dependency id="Microsoft.Testing.Platform.MSBuild" version="$TestingPlatformVersion$" />
</group>
<group targetFramework="net7.0">
<dependency id="Microsoft.Testing.Platform.Extensions.VSTestBridge" version="$TestingPlatformVersion$" />
<dependency id="Microsoft.Testing.Platform.MSBuild" version="$TestingPlatformVersion$" />
</group>
<group targetFramework="net8.0">
<dependency id="Microsoft.Testing.Platform.Extensions.VSTestBridge" version="$TestingPlatformVersion$" />
<dependency id="Microsoft.Testing.Platform.MSBuild" version="$TestingPlatformVersion$" />
</group>
</dependencies>
<readme>PACKAGE.md</readme>
</metadata>
<files>
$CommonFileElements$

<!-- netstandard2.0 -->
<file src="$RepoRoot$src\Adapter\Build\Common\MSTest.TestAdapter.props" target="build\netstandard2.0\" />
<file src="$RepoRoot$src\Adapter\Build\Common\MSTest.TestAdapter.targets" target="build\netstandard2.0\" />
<file src="netstandard2.0\Microsoft.VisualStudio.TestPlatform.TestFramework.dll" target="build\netstandard2.0\" />
<file src="netstandard2.0\Microsoft.VisualStudio.TestPlatform.MSTestAdapter.PlatformServices.dll" target="build\netstandard2.0\" />
<file src="netstandard2.0\Microsoft.VisualStudio.TestPlatform.MSTest.TestAdapter.dll" target="build\netstandard2.0\" />
<file src="netstandard2.0\Microsoft.TestPlatform.AdapterUtilities.dll" target="build\netstandard2.0\" />

<!-- netcoreapp3.1 -->
<file src="$RepoRoot$src\Adapter\Build\Common\MSTest.TestAdapter.props" target="build\netcoreapp3.1\" />
<file src="$RepoRoot$src\Adapter\Build\Common\MSTest.TestAdapter.targets" target="build\netcoreapp3.1\" />
<file src="netcoreapp3.1\Microsoft.VisualStudio.TestPlatform.TestFramework.dll" target="build\netcoreapp3.1\" />
<file src="netcoreapp3.1\Microsoft.VisualStudio.TestPlatform.MSTestAdapter.PlatformServices.dll" target="build\netcoreapp3.1\" />
<file src="netcoreapp3.1\Microsoft.VisualStudio.TestPlatform.MSTest.TestAdapter.dll" target="build\netcoreapp3.1\" />
<file src="netcoreapp3.1\Microsoft.TestPlatform.AdapterUtilities.dll" target="build\netcoreapp3.1\" />

<!-- net6.0 -->
<file src="$RepoRoot$src\Adapter\Build\Common\MSTest.TestAdapter.props" target="build\net6.0\MSTest.TestAdapter.props" />
<file src="$RepoRoot$src\Adapter\Build\NetWithWinUI\MSTest.TestAdapter.targets" target="build\net6.0\MSTest.TestAdapter.targets" />
<file src="net6.0\Microsoft.VisualStudio.TestPlatform.TestFramework.dll" target="build\net6.0\" />
<file src="net6.0\Microsoft.VisualStudio.TestPlatform.MSTestAdapter.PlatformServices.dll" target="build\net6.0\" />
<file src="net6.0\Microsoft.VisualStudio.TestPlatform.MSTest.TestAdapter.dll" target="build\net6.0\" />
<file src="net6.0\Microsoft.TestPlatform.AdapterUtilities.dll" target="build\net6.0\" />

<!-- net7.0 -->
<file src="$RepoRoot$src\Adapter\Build\Common\MSTest.TestAdapter.props" target="build\net7.0\MSTest.TestAdapter.props" />
<file src="$RepoRoot$src\Adapter\Build\NetWithWinUI\MSTest.TestAdapter.targets" target="build\net7.0\MSTest.TestAdapter.targets" />
<file src="net7.0\Microsoft.VisualStudio.TestPlatform.TestFramework.dll" target="build\net7.0\" />
<file src="net7.0\Microsoft.VisualStudio.TestPlatform.MSTestAdapter.PlatformServices.dll" target="build\net7.0\" />
<file src="net7.0\Microsoft.VisualStudio.TestPlatform.MSTest.TestAdapter.dll" target="build\net7.0\" />
<file src="net7.0\Microsoft.TestPlatform.AdapterUtilities.dll" target="build\net7.0\" />

<!-- net8.0 -->
<file src="$RepoRoot$src\Adapter\Build\Common\MSTest.TestAdapter.props" target="build\net8.0\MSTest.TestAdapter.props" />
<file src="$RepoRoot$src\Adapter\Build\NetWithWinUI\MSTest.TestAdapter.targets" target="build\net8.0\MSTest.TestAdapter.targets" />
<file src="net8.0\Microsoft.VisualStudio.TestPlatform.TestFramework.dll" target="build\net8.0\" />
<file src="net8.0\Microsoft.VisualStudio.TestPlatform.MSTestAdapter.PlatformServices.dll" target="build\net8.0\" />
<file src="net8.0\Microsoft.VisualStudio.TestPlatform.MSTest.TestAdapter.dll" target="build\net8.0\" />
<file src="net8.0\Microsoft.TestPlatform.AdapterUtilities.dll" target="build\net8.0\" />

<!-- Localization -->
<!-- All TFMs share the same resx + TestAdapter depends on PlatformServices + TestFramework so all resources are available -->
<file src="net6.0\**\*.resources.dll" target="\build\_localization\" />

<!-- Source code -->
<file src="$srcroot$\**\*.cs" target="src" />

<file src="$RepoRoot$src\Adapter\MSTest.TestAdapter\PACKAGE.md" target="" />
</files>
</package>
16 changes: 13 additions & 3 deletions src/Adapter/MSTest.TestAdapter/MSTest.TestAdapter.csproj
Original file line number Diff line number Diff line change
@@ -1,14 +1,20 @@
<Project Sdk="MSBuild.Sdk.Extras">
<Project>

<!-- SDK top import -->
<Import Project="Sdk.props" Sdk="MSBuild.Sdk.Extras" Condition=" '$(OS)' == 'Windows_NT' " />
<Import Project="Sdk.props" Sdk="Microsoft.NET.Sdk" Condition=" '$(OS)' != 'Windows_NT' " />

<PropertyGroup>
<TargetFrameworks>$(UwpMinimum);$(WinUiMinimum);netstandard2.0;$(NetFrameworkMinimum);$(SupportedNetFrameworks)</TargetFrameworks>
<TargetFrameworks Condition=" '$(OS)' == 'Windows_NT' ">$(UwpMinimum);$(WinUiMinimum);netstandard2.0;$(NetFrameworkMinimum);$(SupportedNetFrameworks)</TargetFrameworks>
<TargetFrameworks Condition=" '$(OS)' != 'Windows_NT' ">$(SupportedNetFrameworks);netstandard2.0</TargetFrameworks>
<ImplicitUsings>enable</ImplicitUsings>
<UseAssemblyVersion14>true</UseAssemblyVersion14>
</PropertyGroup>

<PropertyGroup>
<IsPackable>true</IsPackable>
<NuspecFile>MSTest.TestAdapter.nuspec</NuspecFile>
<NuspecFile Condition=" '$(OS)' == 'Windows_NT' ">MSTest.TestAdapter.nuspec</NuspecFile>
<NuspecFile Condition=" '$(OS)' != 'Windows_NT' ">MSTest.TestAdapter.Linux.nuspec</NuspecFile>
<NuspecBasePath>$(OutputPath)</NuspecBasePath>
<PackageId>MSTest.TestAdapter</PackageId>
<PackageTags>MSTest TestFramework TestAdapter VisualStudio Unittest MSTestV2 Microsoft</PackageTags>
Expand Down Expand Up @@ -79,4 +85,8 @@
</None>
</ItemGroup>

<!-- SDK bottom import -->
<Import Project="Sdk.targets" Sdk="MSBuild.Sdk.Extras" Condition=" '$(OS)' == 'Windows_NT' " />
<Import Project="Sdk.targets" Sdk="Microsoft.NET.Sdk" Condition=" '$(OS)' != 'Windows_NT' " />

</Project>
Loading

0 comments on commit 197b50d

Please sign in to comment.