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

Linux build #2477

Merged
9 commits merged into from
Jul 16, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 8 additions & 10 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,14 +64,12 @@ jobs:
testResultsFiles: '**\*.trx'
condition: succeededOrFailed()

# Linux build does not work when we mix runtimes and
# we don't use the results to do anything, skipping it for now
# - job: Linux
# pool:
# vmImage: 'ubuntu-16.04'
# variables:
# buildConfiguration: 'Release'
# steps:
# - script: ./build.sh -c $(buildConfiguration)
# displayName: './build.sh -c $(buildConfiguration)'
- job: Linux
pool:
vmImage: 'ubuntu-18.04'
variables:
buildConfiguration: 'Release'
steps:
- script: ./build.sh -c $(buildConfiguration)
displayName: './build.sh -c $(buildConfiguration)'

4 changes: 2 additions & 2 deletions scripts/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ NOCOLOR='\033[0m'
# Parse options
#
CONFIGURATION="Debug"
TARGET_RUNTIME="ubuntu.16.04-x64"
TARGET_RUNTIME="ubuntu.18.04-x64"
VERSION="" # Will set this later by reading TestPlatform.Settings.targets file.
VERSION_SUFFIX="dev"
FAIL_FAST=false
Expand Down Expand Up @@ -238,7 +238,7 @@ function invoke_build()
log ".. .. Build: Source: $TPB_Solution"

# Workaround for https://github.com/dotnet/sdk/issues/335
export FrameworkPathOverride=$TP_PACKAGES_DIR/microsoft.targetingpack.netframework.v4.6/1.0.1/lib/net46/
export FrameworkPathOverride=$TP_PACKAGES_DIR/microsoft.targetingpack.netframework.v4.7.2/1.0.0/lib/net472/
if [ -z "$PROJECT_NAME_PATTERNS" ]
then
if [[ $TP_USE_REPO_API = 0 ]]; then
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,18 @@
<ProjectReference Include="..\Microsoft.TestPlatform.ObjectModel\Microsoft.TestPlatform.ObjectModel.csproj" />
<ProjectReference Include="..\..\src\Microsoft.TestPlatform.CoreUtilities\Microsoft.TestPlatform.CoreUtilities.csproj" />
</ItemGroup>
<ItemGroup Condition=" '$(TargetFramework)' == 'net451' ">
<ItemGroup Condition=" '$(TargetFramework)' == 'net472' ">
<Reference Include="System" />
<Reference Include="System.Runtime" />
<Reference Include="System.Xml" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="netstandard" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.Diagnostics.NETCore.Client">
<Version>0.2.0-preview.20220.1</Version>
</PackageReference>
<PackageReference Include="NETStandard.Library" Version="2.0.3" />
</ItemGroup>
<ItemGroup>
<Compile Update="Resources\Resources.Designer.cs">
Expand All @@ -42,21 +49,5 @@
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
</EmbeddedResource>
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.Diagnostics.NETCore.Client">
<Version>0.2.0-preview.20220.1</Version>
</PackageReference>
</ItemGroup>
<!-- <ItemGroup>
<None Update="procdump">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Update="procdump.exe">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Update="procdump64.exe">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
</ItemGroup> -->
<Import Project="$(TestPlatformRoot)scripts\build\TestPlatform.targets" />
</Project>
8 changes: 4 additions & 4 deletions src/package/external/external.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
</PropertyGroup>
<Import Project="$(TestPlatformRoot)scripts/build/TestPlatform.Settings.targets" />
<PropertyGroup>
<TargetFrameworks>net46</TargetFrameworks>
<TargetFrameworks>net472</TargetFrameworks>
<AssemblyName>restore</AssemblyName>
<RuntimeIdentifier>win7-x64</RuntimeIdentifier>
<GenerateAssemblyConfigurationAttribute>false</GenerateAssemblyConfigurationAttribute>
Expand Down Expand Up @@ -94,10 +94,10 @@
<PrivateAssets>All</PrivateAssets>
</PackageReference>
<!-- Required for resolution of desktop dependencies in non windows environment.
We've to set to net46 since the net451 and other packages have assemblies in wrong case.
We've to set to net472 since the net451 and other packages have assemblies in wrong case.
E.g. System.XML instead of System.Xml. -->
<PackageReference Include="Microsoft.TargetingPack.NETFramework.v4.6">
<Version>1.0.1</Version>
<PackageReference Include="Microsoft.TargetingPack.NETFramework.v4.7.2">
<Version>1.0.0</Version>
<PrivateAssets>All</PrivateAssets>
</PackageReference>
</ItemGroup>
Expand Down
1 change: 1 addition & 0 deletions src/vstest.console/vstest.console.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@
<Reference Include="System" />
<Reference Include="System.IO" />
<Reference Include="System.Runtime" />
<Reference Include="System.Collections" />
<Reference Include="System.Xml" />
<Reference Include="Microsoft.CSharp" />
</ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,5 +35,8 @@
<PackageReference Include="Microsoft.Internal.CodeCoverage" Version="$(TestPlatformExternalsVersion)" />
<PackageReference Include="System.Data.DataSetExtensions" Version="4.5.0-preview2-26406-04" />
</ItemGroup>
<ItemGroup>
<Folder Include="TestAssets\CodeCoverageTest\" />
</ItemGroup>
<Import Project="$(TestPlatformRoot)scripts\build\TestPlatform.targets" />
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,14 @@
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\..\src\Microsoft.TestPlatform.Extensions.BlameDataCollector\Microsoft.TestPlatform.Extensions.BlameDataCollector.csproj" />
<PackageReference Include="NETStandard.Library" Version="2.0.3" />
</ItemGroup>
<ItemGroup Condition=" '$(TargetFramework)' == 'net451' ">
<ItemGroup Condition=" '$(TargetFramework)' == 'net472' ">
<Reference Include="System.Runtime" />
<Reference Include="System" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Xml" />
<Reference Include="netstandard" />
</ItemGroup>
<ItemGroup>
<Folder Include="Properties\" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -492,7 +492,7 @@ public void GetTestHostProcessStartInfoOnWindowsForValidPathReturnsFullPathOfDot
char separator = ';';
var dotnetExeName = "dotnet.exe";
#if !NET451
if (!RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
if (!System.Environment.OSVersion.Platform.ToString().StartsWith("Win"))
{
separator = ':';
dotnetExeName = "dotnet";
Expand All @@ -519,7 +519,7 @@ public void GetTestHostProcessStartInfoShouldThrowExceptionWhenDotnetIsNotInstal

char separator = ';';
var dotnetExeName = "dotnet.exe";
if (!RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
if (!System.Environment.OSVersion.Platform.ToString().StartsWith("Win"))
nohwnd marked this conversation as resolved.
Show resolved Hide resolved
{
separator = ':';
dotnetExeName = "dotnet";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,19 +8,18 @@
<PropertyGroup>
<OutputType Condition=" '$(TargetFramework)' == 'netcoreapp2.1' ">Exe</OutputType>
<AssemblyName>Microsoft.TestPlatform.TestHostProvider.UnitTests</AssemblyName>
<TargetFrameworks>netcoreapp2.1;net451</TargetFrameworks>
<TargetFrameworks>netcoreapp2.1;net472</TargetFrameworks>
<EnableCodeAnalysis>true</EnableCodeAnalysis>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\..\src\Microsoft.TestPlatform.TestHostProvider\Microsoft.TestPlatform.TestHostProvider.csproj" />
<ProjectReference Include="..\Microsoft.TestPlatform.Common.UnitTests\Microsoft.TestPlatform.Common.UnitTests.csproj" />
<ProjectReference Include="..\..\src\Microsoft.TestPlatform.PlatformAbstractions\Microsoft.TestPlatform.PlatformAbstractions.csproj" />
</ItemGroup>
<ItemGroup Condition=" '$(TargetFramework)' == 'net451' ">
<ItemGroup Condition=" '$(TargetFramework)' == 'net472' ">
<Reference Include="System.Runtime" />
<Reference Include="System" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Xml" />
<Reference Include="netstandard" />
</ItemGroup>
<Import Project="$(TestPlatformRoot)scripts\build\TestPlatform.targets" />
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
<Reference Include="System" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Xml" />
<Reference Include="System.Threading.Tasks" />
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="DefaultCodeCoverageConfig.xml" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
</ItemGroup>
<ItemGroup Condition=" '$(TargetFramework)' == 'net451' ">
<ItemGroup Condition=" '$(TargetFramework)' == 'net472' ">
<Reference Include="System.Runtime" />
<Reference Include="System" />
<Reference Include="Microsoft.CSharp" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
<ItemGroup>
<ProjectReference Include="..\..\src\datacollector\datacollector.csproj" />
</ItemGroup>
<ItemGroup Condition=" '$(TargetFramework)' == 'net451' ">
<ItemGroup Condition=" '$(TargetFramework)' == 'net472' ">
<Reference Include="System.Runtime" />
<Reference Include="System" />
<Reference Include="Microsoft.CSharp" />
Expand Down