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

CPP runner under .NET (Core) #3003

Merged
merged 21 commits into from
Oct 11, 2021
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
20 changes: 20 additions & 0 deletions scripts/build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -483,6 +483,26 @@ function Publish-Package
Write-Verbose "Copy-Item $newtonsoft $coreCLR20PackageDir -Force"
Copy-Item $newtonsoft $coreCLR20PackageDir -Force

# Copy .NET Standard CPP Test adapter
New-Item "$fullCLRPackage451Dir\TestHost" -ItemType Directory -Force | Out-Null
$fullCLRTestHostDir = "$fullCLRPackage451Dir\TestHost"

$testPlatformRemoteExternalsVersion = ([xml](Get-Content "$env:TP_ROOT_DIR\scripts\build\TestPlatform.Dependencies.props")).Project.PropertyGroup.TestPlatformRemoteExternalsVersion
$testPlatformRemoteExternalsSourceDirectory = Join-Path $env:TP_PACKAGES_DIR "Microsoft.Internal.TestPlatform.Remote\$testPlatformRemoteExternalsVersion\tools\netstandard\Extensions\*"
Copy-Item $testPlatformRemoteExternalsSourceDirectory $coreCLR20PackageDir -Force -Recurse
Copy-Item $testPlatformRemoteExternalsSourceDirectory $fullCLRTestHostDir -Force -Recurse

# Copy standalone testhost
$standaloneTesthost = Join-Path $env:TP_ROOT_DIR "temp\testhost\*"
Copy-Item $standaloneTesthost $coreCLR20PackageDir -Force
Copy-Item $testhostCore20PackageDir\testhost.dll $coreCLR20PackageDir -Force
Copy-Item $testhostCore20PackageDir\testhost.pdb $coreCLR20PackageDir -Force

Get-Item "$testhostCore20PackageDir\*" |
Where-Object { $_.Name -notin ("x64", "x86", "win7-x64", "win7-x86", "testhost.deps.json", "testhost.runtimeconfig.json")} |
Copy-Item -Recurse -Destination $fullCLRTestHostDir -Force
Copy-Item $standaloneTesthost $fullCLRTestHostDir -Force

# For libraries that are externally published, copy the output into artifacts. These will be signed and packaged independently.
Copy-PackageItems "Microsoft.TestPlatform.Build"

Expand Down
7 changes: 5 additions & 2 deletions scripts/build/TestPlatform.Dependencies.props
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<VSSdkBuildToolsVersion>15.8.3247</VSSdkBuildToolsVersion>
Expand Down Expand Up @@ -27,14 +27,17 @@

<ChutzpahAdapterVersion>4.4.12</ChutzpahAdapterVersion>

<NuGetFrameworksVersion>5.0.0</NuGetFrameworksVersion>
<!-- This version also needs to be updated in src\package\nuspec\TestPlatform.ObjectModel.nuspec -->
<NuGetFrameworksVersion>5.11.0</NuGetFrameworksVersion>
<ILAsmPackageVersion>5.0.0</ILAsmPackageVersion>
<JsonNetVersion>9.0.1</JsonNetVersion>
<MoqVersion>4.8.3</MoqVersion>

<TestPlatformExternalsVersion>17.0.0-previews-4-31630-230</TestPlatformExternalsVersion>
<!-- <TestPlatformMSDiaVersion>$(TestPlatformExternalsVersion)</TestPlatformMSDiaVersion> -->
<TestPlatformMSDiaVersion>17.0.0-previews-3-31515-332</TestPlatformMSDiaVersion>
<!-- Portable CPP test runner -->
<TestPlatformRemoteExternalsVersion>17.1.0-preview-1-31807-420</TestPlatformRemoteExternalsVersion>

<InteropExternalsVersion>17.0.0-preview-2-31223-026</InteropExternalsVersion>
<MicrosoftFakesVersion>17.0.0-beta.21179.1</MicrosoftFakesVersion>
Expand Down
4 changes: 2 additions & 2 deletions scripts/verify-nupkgs.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ function Verify-Nuget-Packages($packageDirectory, $version)
$expectedNumOfFiles = @{
"Microsoft.CodeCoverage" = 59;
"Microsoft.NET.Test.Sdk" = 27;
"Microsoft.TestPlatform" = 478;
"Microsoft.TestPlatform" = 599;
"Microsoft.TestPlatform.Build" = 21;
"Microsoft.TestPlatform.CLI" = 371;
"Microsoft.TestPlatform.CLI" = 404;
"Microsoft.TestPlatform.Extensions.TrxLogger" = 35;
"Microsoft.TestPlatform.ObjectModel" = 238;
"Microsoft.TestPlatform.AdapterUtilities" = 62;
Expand Down
3 changes: 2 additions & 1 deletion src/Microsoft.TestPlatform.ObjectModel/Architecture.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ public enum Architecture
X86,
X64,
ARM,
AnyCPU
AnyCPU,
ARM64,
}
}
Original file line number Diff line number Diff line change
@@ -1 +1 @@

Microsoft.VisualStudio.TestPlatform.ObjectModel.Architecture.ARM64 = 5 -> Microsoft.VisualStudio.TestPlatform.ObjectModel.Architecture
Original file line number Diff line number Diff line change
@@ -1 +1 @@

Microsoft.VisualStudio.TestPlatform.ObjectModel.Architecture.ARM64 = 5 -> Microsoft.VisualStudio.TestPlatform.ObjectModel.Architecture
Original file line number Diff line number Diff line change
@@ -1 +1 @@

Microsoft.VisualStudio.TestPlatform.ObjectModel.Architecture.ARM64 = 5 -> Microsoft.VisualStudio.TestPlatform.ObjectModel.Architecture
Original file line number Diff line number Diff line change
@@ -1 +1 @@

Microsoft.VisualStudio.TestPlatform.ObjectModel.Architecture.ARM64 = 5 -> Microsoft.VisualStudio.TestPlatform.ObjectModel.Architecture
Original file line number Diff line number Diff line change
@@ -1 +1 @@

Microsoft.VisualStudio.TestPlatform.ObjectModel.Architecture.ARM64 = 5 -> Microsoft.VisualStudio.TestPlatform.ObjectModel.Architecture
Original file line number Diff line number Diff line change
@@ -1 +1 @@

Microsoft.VisualStudio.TestPlatform.ObjectModel.Architecture.ARM64 = 5 -> Microsoft.VisualStudio.TestPlatform.ObjectModel.Architecture
Original file line number Diff line number Diff line change
@@ -1 +1 @@

Microsoft.VisualStudio.TestPlatform.ObjectModel.Architecture.ARM64 = 5 -> Microsoft.VisualStudio.TestPlatform.ObjectModel.Architecture
Original file line number Diff line number Diff line change
@@ -1 +1 @@

Microsoft.VisualStudio.TestPlatform.ObjectModel.Architecture.ARM64 = 5 -> Microsoft.VisualStudio.TestPlatform.ObjectModel.Architecture
Original file line number Diff line number Diff line change
@@ -1 +1 @@

Microsoft.VisualStudio.TestPlatform.ObjectModel.Architecture.ARM64 = 5 -> Microsoft.VisualStudio.TestPlatform.ObjectModel.Architecture
Original file line number Diff line number Diff line change
Expand Up @@ -784,7 +784,8 @@ public static RunConfiguration FromXml(XmlReader reader)
try
{
archType = (Architecture)Enum.Parse(typeof(Architecture), value, true);
if (archType != Architecture.X64 && archType != Architecture.X86 && archType != Architecture.ARM)
// Ensure that the parsed value is actually in the enum, and that Default or AnyCpu are not provided.
if (!Enum.IsDefined(typeof(Architecture), archType) || Architecture.Default == archType || Architecture.AnyCPU == archType)
{
throw new SettingsException(
string.Format(
Expand Down
Loading