2021-04-16 16:17:09 +00:00
|
|
|
|
using System;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using System.IO;
|
|
|
|
|
using System.Linq;
|
|
|
|
|
using System.Text;
|
|
|
|
|
using System.Threading.Tasks;
|
|
|
|
|
using FluentAssertions;
|
|
|
|
|
using Microsoft.DotNet.Tools.Test.Utilities;
|
|
|
|
|
using Microsoft.NET.Sdk.WorkloadManifestReader;
|
|
|
|
|
using Xunit;
|
|
|
|
|
using Xunit.Abstractions;
|
|
|
|
|
|
|
|
|
|
namespace EndToEnd.Tests
|
|
|
|
|
{
|
|
|
|
|
public class ValidateInsertedManifests : TestBase
|
|
|
|
|
{
|
|
|
|
|
private readonly ITestOutputHelper output;
|
|
|
|
|
|
|
|
|
|
public ValidateInsertedManifests(ITestOutputHelper output)
|
|
|
|
|
{
|
|
|
|
|
this.output = output;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
[Fact]
|
|
|
|
|
public void ManifestReaderCanReadManifests()
|
|
|
|
|
{
|
|
|
|
|
var sdkManifestDir = Path.Combine(Path.GetDirectoryName(RepoDirectoriesProvider.DotnetUnderTest), "sdk-manifests");
|
|
|
|
|
var sdkversionDir = new DirectoryInfo(sdkManifestDir).EnumerateDirectories().First();
|
|
|
|
|
foreach (var manifestDir in sdkversionDir.EnumerateDirectories())
|
|
|
|
|
{
|
|
|
|
|
var manifestId = manifestDir.Name;
|
|
|
|
|
|
|
|
|
|
string manifestFile = manifestDir.GetFile("WorkloadManifest.json").FullName;
|
|
|
|
|
|
|
|
|
|
File.Exists(manifestFile).Should().BeTrue();
|
|
|
|
|
using var fileStream = new FileStream(manifestFile, FileMode.Open, FileAccess.Read);
|
[release/6.0.3xx] Update dependencies from dotnet/sdk (#13455)
* Update dependencies from https://github.com/dotnet/sdk build 20220323.4
Microsoft.NET.Sdk , Microsoft.DotNet.MSBuildSdkResolver
From Version 6.0.300-preview.22172.2 -> To Version 6.0.300-preview.22173.4
Dependency coherency updates
Microsoft.Net.Compilers.Toolset,Microsoft.Build
From Version 4.2.0-2.22171.5 -> To Version 4.2.0-2.22172.6 (parent: Microsoft.NET.Sdk
* Update dependencies from https://github.com/dotnet/sdk build 20220323.8
Microsoft.NET.Sdk , Microsoft.DotNet.MSBuildSdkResolver
From Version 6.0.300-preview.22172.2 -> To Version 6.0.300-preview.22173.8
Dependency coherency updates
Microsoft.FSharp.Compiler,Microsoft.SourceBuild.Intermediate.fsharp,Microsoft.Net.Compilers.Toolset,Microsoft.Build
From Version 12.0.3-beta.22171.1 -> To Version 12.0.3-beta.22172.6 (parent: Microsoft.NET.Sdk
* Update dependencies from https://github.com/dotnet/sdk build 20220323.10
Microsoft.NET.Sdk , Microsoft.DotNet.MSBuildSdkResolver
From Version 6.0.300-preview.22172.2 -> To Version 6.0.300-preview.22173.10
Dependency coherency updates
Microsoft.FSharp.Compiler,Microsoft.SourceBuild.Intermediate.fsharp,Microsoft.Net.Compilers.Toolset,Microsoft.Build
From Version 12.0.3-beta.22171.1 -> To Version 12.0.3-beta.22172.6 (parent: Microsoft.NET.Sdk
* Update dependencies from https://github.com/dotnet/sdk build 20220323.13
Microsoft.NET.Sdk , Microsoft.DotNet.MSBuildSdkResolver
From Version 6.0.300-preview.22172.2 -> To Version 6.0.300-preview.22173.13
Dependency coherency updates
Microsoft.FSharp.Compiler,Microsoft.SourceBuild.Intermediate.fsharp,Microsoft.NET.ILLink.Tasks,Microsoft.Net.Compilers.Toolset,Microsoft.Build
From Version 12.0.3-beta.22171.1 -> To Version 12.0.3-beta.22172.6 (parent: Microsoft.NET.Sdk
* Update dependencies from https://github.com/dotnet/sdk build 20220323.16
Microsoft.NET.Sdk , Microsoft.DotNet.MSBuildSdkResolver
From Version 6.0.300-preview.22172.2 -> To Version 6.0.300-preview.22173.16
Dependency coherency updates
Microsoft.FSharp.Compiler,Microsoft.SourceBuild.Intermediate.fsharp,Microsoft.NET.ILLink.Tasks,Microsoft.Net.Compilers.Toolset,Microsoft.Build
From Version 12.0.3-beta.22171.1 -> To Version 12.0.3-beta.22172.6 (parent: Microsoft.NET.Sdk
* Update dependencies from https://github.com/dotnet/sdk build 20220323.17
Microsoft.NET.Sdk , Microsoft.DotNet.MSBuildSdkResolver
From Version 6.0.300-preview.22172.2 -> To Version 6.0.300-preview.22173.17
Dependency coherency updates
Microsoft.FSharp.Compiler,Microsoft.SourceBuild.Intermediate.fsharp,Microsoft.NET.ILLink.Tasks,Microsoft.Net.Compilers.Toolset,Microsoft.Build
From Version 12.0.3-beta.22171.1 -> To Version 12.0.3-beta.22172.6 (parent: Microsoft.NET.Sdk
* Update dependencies from https://github.com/dotnet/sdk build 20220324.5
Microsoft.NET.Sdk , Microsoft.DotNet.MSBuildSdkResolver
From Version 6.0.300-preview.22172.2 -> To Version 6.0.300-preview.22174.5
Dependency coherency updates
Microsoft.FSharp.Compiler,Microsoft.SourceBuild.Intermediate.fsharp,Microsoft.NET.ILLink.Tasks,Microsoft.Net.Compilers.Toolset,Microsoft.Build
From Version 12.0.3-beta.22171.1 -> To Version 12.0.3-beta.22172.6 (parent: Microsoft.NET.Sdk
* Fix test for api change in sdk.
* Update dependencies from https://github.com/dotnet/sdk build 20220324.11
Microsoft.NET.Sdk , Microsoft.DotNet.MSBuildSdkResolver
From Version 6.0.300-preview.22172.2 -> To Version 6.0.300-preview.22174.11
Dependency coherency updates
Microsoft.FSharp.Compiler,Microsoft.SourceBuild.Intermediate.fsharp,Microsoft.NET.ILLink.Tasks,Microsoft.Net.Compilers.Toolset,Microsoft.Build
From Version 12.0.3-beta.22171.1 -> To Version 12.0.3-beta.22172.6 (parent: Microsoft.NET.Sdk
* Update dependencies from https://github.com/dotnet/sdk build 20220324.13
Microsoft.NET.Sdk , Microsoft.DotNet.MSBuildSdkResolver
From Version 6.0.300-preview.22172.2 -> To Version 6.0.300-preview.22174.13
Dependency coherency updates
Microsoft.FSharp.Compiler,Microsoft.SourceBuild.Intermediate.fsharp,Microsoft.NET.ILLink.Tasks,Microsoft.Net.Compilers.Toolset,Microsoft.Build
From Version 12.0.3-beta.22171.1 -> To Version 12.0.3-beta.22173.1 (parent: Microsoft.NET.Sdk
* Update dependencies from https://github.com/dotnet/sdk build 20220325.2
Microsoft.NET.Sdk , Microsoft.DotNet.MSBuildSdkResolver
From Version 6.0.300-preview.22172.2 -> To Version 6.0.300-preview.22175.2
Dependency coherency updates
Microsoft.DotNet.Common.ItemTemplates,Microsoft.TemplateEngine.Cli,Microsoft.DotNet.Common.ProjectTemplates.6.0,Microsoft.FSharp.Compiler,Microsoft.SourceBuild.Intermediate.fsharp,Microsoft.NET.ILLink.Tasks,Microsoft.Net.Compilers.Toolset,Microsoft.Build
From Version 6.0.300-preview.22171.2 -> To Version 6.0.300-preview.22174.5 (parent: Microsoft.NET.Sdk
* Update dependencies from https://github.com/dotnet/sdk build 20220325.7
Microsoft.NET.Sdk , Microsoft.DotNet.MSBuildSdkResolver
From Version 6.0.300-preview.22172.2 -> To Version 6.0.300-preview.22175.7
* Update dependencies from https://github.com/dotnet/sdk build 20220325.9
Microsoft.NET.Sdk , Microsoft.DotNet.MSBuildSdkResolver
From Version 6.0.300-preview.22175.7 -> To Version 6.0.300-preview.22175.9
* Update dependencies from https://github.com/dotnet/sdk build 20220325.12
Microsoft.NET.Sdk , Microsoft.DotNet.MSBuildSdkResolver
From Version 6.0.300-preview.22175.9 -> To Version 6.0.300-preview.22175.12
* Dependency coherency updates
Microsoft.DotNet.Common.ItemTemplates,Microsoft.TemplateEngine.Cli,Microsoft.DotNet.Common.ProjectTemplates.6.0,Microsoft.FSharp.Compiler,Microsoft.SourceBuild.Intermediate.fsharp,Microsoft.NET.ILLink.Tasks,Microsoft.Net.Compilers.Toolset,Microsoft.Build,NuGet.Build.Tasks
From Version 6.0.300-preview.22171.2 -> To Version 6.0.300-preview.22174.5 (parent: Microsoft.NET.Sdk
* Update dependencies from https://github.com/dotnet/sdk build 20220328.3
Microsoft.NET.Sdk , Microsoft.DotNet.MSBuildSdkResolver
From Version 6.0.300-preview.22172.2 -> To Version 6.0.300-preview.22178.3
Dependency coherency updates
Microsoft.DotNet.Common.ItemTemplates,Microsoft.TemplateEngine.Cli,Microsoft.DotNet.Common.ProjectTemplates.6.0,Microsoft.FSharp.Compiler,Microsoft.SourceBuild.Intermediate.fsharp,Microsoft.NET.ILLink.Tasks,Microsoft.Net.Compilers.Toolset,Microsoft.Build,NuGet.Build.Tasks
From Version 6.0.300-preview.22171.2 -> To Version 6.0.300-preview.22174.5 (parent: Microsoft.NET.Sdk
* Remove NuGet.Client source-build patches that were backported
Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
Co-authored-by: Marc Paine <marcpop@microsoft.com>
Co-authored-by: MichaelSimons <msimons@microsoft.com>
2022-03-28 16:16:59 +00:00
|
|
|
|
Action readManifest = () => WorkloadManifestReader.ReadWorkloadManifest(manifestId, fileStream, manifestFile);
|
2021-04-16 16:17:09 +00:00
|
|
|
|
readManifest.ShouldNotThrow("manifestId:" + manifestId + " manifestFile:" + manifestFile + "is invalid");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|