-
Notifications
You must be signed in to change notification settings - Fork 353
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Workloads: Additional Checks (#7679)
- Enable shortname replacement for manifests - Fix provider keys for manifest installers - Remove invalid pack dependencies - Check for long path failures, similar to what VS manifest validation checks performs
- Loading branch information
Showing
10 changed files
with
404 additions
and
20 deletions.
There are no files selected for viewing
22 changes: 22 additions & 0 deletions
22
src/Microsoft.DotNet.Build.Tasks.Workloads.Tests/GenerateManifestMsiTests.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
// Licensed to the .NET Foundation under one or more agreements. | ||
// The .NET Foundation licenses this file to you under the MIT license. | ||
|
||
using System; | ||
using Xunit; | ||
|
||
namespace Microsoft.DotNet.Build.Tasks.Workloads.Tests | ||
{ | ||
public class GenerateManifestMsiTests | ||
{ | ||
[WindowsOnlyFact] | ||
public void ItThrowsIfPayloadRelativePathIsTooLong() | ||
{ | ||
var task = new GenerateManifestMsi(); | ||
task.MsiVersion = "1.2.3.11111"; | ||
|
||
Exception e = Assert.Throws<Exception>(() => task.GenerateSwixPackageAuthoring(@"C:\Foo\Microsoft.NET.Workload.Mono.ToolChain.Manifest-6.0.100.6.0.0-preview.7.21377.12-x64.msi", | ||
"Microsoft.NET.Workload.Mono.ToolChain.Manifest-6.0.100", "x64")); | ||
Assert.Equal(@"Payload relative path exceeds max length (182): Microsoft.NET.Workload.Mono.ToolChain.Manifest-6.0.100,version=1.2.3,chip=x64,productarch=neutral\Microsoft.NET.Workload.Mono.ToolChain.Manifest-6.0.100.6.0.0-preview.7.21377.12-x64.msi", e.Message); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
19 changes: 19 additions & 0 deletions
19
src/Microsoft.DotNet.Build.Tasks.Workloads.Tests/TestHelper.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
// Licensed to the .NET Foundation under one or more agreements. | ||
// The .NET Foundation licenses this file to you under the MIT license. | ||
|
||
using System; | ||
using Xunit; | ||
|
||
namespace Microsoft.DotNet.Build.Tasks.Workloads.Tests | ||
{ | ||
public class WindowsOnlyFactAttribute : FactAttribute | ||
{ | ||
public WindowsOnlyFactAttribute() | ||
{ | ||
if (Environment.OSVersion.Platform != PlatformID.Win32NT) | ||
{ | ||
Skip = "Not running on Windows"; | ||
} | ||
} | ||
} | ||
} |
262 changes: 262 additions & 0 deletions
262
...osoft.DotNet.Build.Tasks.Workloads.Tests/testassets/AbstractWorkloadsNonWindowsPacks.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,262 @@ | ||
{ | ||
"version": "6.0.0-preview.7.21358.4", | ||
"depends-on": { | ||
"Microsoft.NET.Workload.Emscripten": "6.0.0-preview.7.21330.1" | ||
}, | ||
"workloads": { | ||
"microsoft-net-runtime-ios": { | ||
"abstract": true, | ||
"description": "iOS Mono Runtime and AOT Workload", | ||
"packs": [ | ||
"Microsoft.NETCore.App.Runtime.AOT.Cross.ios-arm", | ||
"Microsoft.NETCore.App.Runtime.AOT.Cross.ios-arm64", | ||
"Microsoft.NETCore.App.Runtime.AOT.Cross.iossimulator-arm64", | ||
"Microsoft.NETCore.App.Runtime.AOT.Cross.iossimulator-x64", | ||
"Microsoft.NETCore.App.Runtime.AOT.Cross.iossimulator-x86" | ||
], | ||
"extends": [ "runtimes-ios" ], | ||
"platforms": [ "win-x64", "osx-arm64", "osx-x64" ] | ||
}, | ||
"runtimes-ios": { | ||
"abstract": true, | ||
"description": "iOS Mono Runtime Packs", | ||
"packs": [ | ||
"Microsoft.NETCore.App.Runtime.Mono.ios-arm", | ||
"Microsoft.NETCore.App.Runtime.Mono.ios-arm64", | ||
"Microsoft.NETCore.App.Runtime.Mono.iossimulator-arm64", | ||
"Microsoft.NETCore.App.Runtime.Mono.iossimulator-x64", | ||
"Microsoft.NETCore.App.Runtime.Mono.iossimulator-x86" | ||
], | ||
"extends": [ "microsoft-net-runtime-mono-tooling" ], | ||
"platforms": [ "win-x64", "osx-arm64", "osx-x64" ] | ||
}, | ||
"microsoft-net-runtime-mono-tooling": { | ||
"abstract": true, | ||
"description": "Shared native build tooling for Mono runtime", | ||
"packs": [ | ||
"Microsoft.NET.Runtime.MonoAOTCompiler.Task", | ||
"Microsoft.NET.Runtime.MonoTargets.Sdk" | ||
] | ||
}, | ||
}, | ||
"packs": { | ||
"Microsoft.NET.Runtime.MonoAOTCompiler.Task": { | ||
"kind": "Sdk", | ||
"version": "2.3.4.5" | ||
}, | ||
"Microsoft.NET.Runtime.MonoTargets.Sdk": { | ||
"kind": "Sdk", | ||
"version": "2.3.4.5" | ||
}, | ||
"Microsoft.NET.Runtime.WebAssembly.Sdk": { | ||
"kind": "Sdk", | ||
"version": "2.3.4.5" | ||
}, | ||
"Microsoft.NETCore.App.Runtime.Mono.android-arm": { | ||
"kind": "framework", | ||
"version": "2.3.4.5" | ||
}, | ||
"Microsoft.NETCore.App.Runtime.Mono.android-arm64": { | ||
"kind": "framework", | ||
"version": "2.3.4.5" | ||
}, | ||
"Microsoft.NETCore.App.Runtime.Mono.android-x64": { | ||
"kind": "framework", | ||
"version": "2.3.4.5" | ||
}, | ||
"Microsoft.NETCore.App.Runtime.Mono.android-x86": { | ||
"kind": "framework", | ||
"version": "2.3.4.5" | ||
}, | ||
"Microsoft.NETCore.App.Runtime.AOT.Cross.android-x86": { | ||
"kind": "Sdk", | ||
"version": "2.3.4.5", | ||
"alias-to": { | ||
"win-x64": "Microsoft.NETCore.App.Runtime.AOT.win-x64.Cross.android-x86", | ||
"linux-x64": "Microsoft.NETCore.App.Runtime.AOT.linux-x64.Cross.android-x86", | ||
"osx-x64": "Microsoft.NETCore.App.Runtime.AOT.osx-x64.Cross.android-x86", | ||
"osx-arm64": "Microsoft.NETCore.App.Runtime.AOT.osx-x64.Cross.android-x86" | ||
} | ||
}, | ||
"Microsoft.NETCore.App.Runtime.AOT.Cross.android-x64": { | ||
"kind": "Sdk", | ||
"version": "2.3.4.5", | ||
"alias-to": { | ||
"win-x64": "Microsoft.NETCore.App.Runtime.AOT.win-x64.Cross.android-x64", | ||
"linux-x64": "Microsoft.NETCore.App.Runtime.AOT.linux-x64.Cross.android-x64", | ||
"osx-x64": "Microsoft.NETCore.App.Runtime.AOT.osx-x64.Cross.android-x64", | ||
"osx-arm64": "Microsoft.NETCore.App.Runtime.AOT.osx-x64.Cross.android-x64" | ||
} | ||
}, | ||
"Microsoft.NETCore.App.Runtime.AOT.Cross.android-arm": { | ||
"kind": "Sdk", | ||
"version": "2.3.4.5", | ||
"alias-to": { | ||
"win-x64": "Microsoft.NETCore.App.Runtime.AOT.win-x64.Cross.android-arm", | ||
"linux-x64": "Microsoft.NETCore.App.Runtime.AOT.linux-x64.Cross.android-arm", | ||
"osx-x64": "Microsoft.NETCore.App.Runtime.AOT.osx-x64.Cross.android-arm", | ||
"osx-arm64": "Microsoft.NETCore.App.Runtime.AOT.osx-x64.Cross.android-arm" | ||
} | ||
}, | ||
"Microsoft.NETCore.App.Runtime.AOT.Cross.android-arm64": { | ||
"kind": "Sdk", | ||
"version": "2.3.4.5", | ||
"alias-to": { | ||
"win-x64": "Microsoft.NETCore.App.Runtime.AOT.win-x64.Cross.android-arm64", | ||
"linux-x64": "Microsoft.NETCore.App.Runtime.AOT.linux-x64.Cross.android-arm64", | ||
"osx-x64": "Microsoft.NETCore.App.Runtime.AOT.osx-x64.Cross.android-arm64", | ||
"osx-arm64": "Microsoft.NETCore.App.Runtime.AOT.osx-x64.Cross.android-arm64" | ||
} | ||
}, | ||
"Microsoft.NETCore.App.Runtime.Mono.maccatalyst-arm64": { | ||
"kind": "framework", | ||
"version": "2.3.4.5" | ||
}, | ||
"Microsoft.NETCore.App.Runtime.Mono.maccatalyst-x64": { | ||
"kind": "framework", | ||
"version": "2.3.4.5" | ||
}, | ||
"Microsoft.NETCore.App.Runtime.Mono.osx-arm64": { | ||
"kind": "framework", | ||
"version": "2.3.4.5" | ||
}, | ||
"Microsoft.NETCore.App.Runtime.Mono.osx-x64": { | ||
"kind": "framework", | ||
"version": "2.3.4.5" | ||
}, | ||
"Microsoft.NETCore.App.Runtime.osx-arm64": { | ||
"kind": "framework", | ||
"version": "2.3.4.5" | ||
}, | ||
"Microsoft.NETCore.App.Runtime.osx-x64": { | ||
"kind": "framework", | ||
"version": "2.3.4.5" | ||
}, | ||
"Microsoft.NETCore.App.Runtime.Mono.ios-arm": { | ||
"kind": "framework", | ||
"version": "2.3.4.5" | ||
}, | ||
"Microsoft.NETCore.App.Runtime.Mono.ios-arm64": { | ||
"kind": "framework", | ||
"version": "2.3.4.5" | ||
}, | ||
"Microsoft.NETCore.App.Runtime.Mono.iossimulator-arm64": { | ||
"kind": "framework", | ||
"version": "2.3.4.5" | ||
}, | ||
"Microsoft.NETCore.App.Runtime.Mono.iossimulator-x64": { | ||
"kind": "framework", | ||
"version": "2.3.4.5" | ||
}, | ||
"Microsoft.NETCore.App.Runtime.Mono.iossimulator-x86": { | ||
"kind": "framework", | ||
"version": "2.3.4.5" | ||
}, | ||
"Microsoft.NETCore.App.Runtime.AOT.Cross.tvos-arm64": { | ||
"kind": "Sdk", | ||
"version": "2.3.4.5", | ||
"alias-to": { | ||
"osx-x64": "Microsoft.NETCore.App.Runtime.AOT.osx-x64.Cross.tvos-arm64", | ||
"osx-arm64": "Microsoft.NETCore.App.Runtime.AOT.osx-x64.Cross.tvos-arm64" | ||
} | ||
}, | ||
"Microsoft.NETCore.App.Runtime.Mono.tvos-arm64": { | ||
"kind": "framework", | ||
"version": "2.3.4.5" | ||
}, | ||
"Microsoft.NETCore.App.Runtime.Mono.tvossimulator-arm64": { | ||
"kind": "framework", | ||
"version": "2.3.4.5" | ||
}, | ||
"Microsoft.NETCore.App.Runtime.Mono.tvossimulator-x64": { | ||
"kind": "framework", | ||
"version": "2.3.4.5" | ||
}, | ||
"Microsoft.NETCore.App.Runtime.AOT.Cross.maccatalyst-arm64": { | ||
"kind": "Sdk", | ||
"version": "2.3.4.5", | ||
"alias-to": { | ||
"osx-arm64": "Microsoft.NETCore.App.Runtime.AOT.osx-x64.Cross.maccatalyst-arm64", | ||
"osx-x64": "Microsoft.NETCore.App.Runtime.AOT.osx-x64.Cross.maccatalyst-arm64" | ||
} | ||
}, | ||
"Microsoft.NETCore.App.Runtime.AOT.Cross.maccatalyst-x64": { | ||
"kind": "Sdk", | ||
"version": "2.3.4.5", | ||
"alias-to": { | ||
"osx-arm64": "Microsoft.NETCore.App.Runtime.AOT.osx-x64.Cross.maccatalyst-x64", | ||
"osx-x64": "Microsoft.NETCore.App.Runtime.AOT.osx-x64.Cross.maccatalyst-x64" | ||
} | ||
}, | ||
"Microsoft.NETCore.App.Runtime.AOT.Cross.tvossimulator-arm64": { | ||
"kind": "Sdk", | ||
"version": "2.3.4.5", | ||
"alias-to": { | ||
"osx-arm64": "Microsoft.NETCore.App.Runtime.AOT.osx-x64.Cross.tvossimulator-arm64", | ||
"osx-x64": "Microsoft.NETCore.App.Runtime.AOT.osx-x64.Cross.tvossimulator-arm64" | ||
} | ||
}, | ||
"Microsoft.NETCore.App.Runtime.AOT.Cross.tvossimulator-x64": { | ||
"kind": "Sdk", | ||
"version": "2.3.4.5", | ||
"alias-to": { | ||
"osx-arm64": "Microsoft.NETCore.App.Runtime.AOT.osx-x64.Cross.tvossimulator-x64", | ||
"osx-x64": "Microsoft.NETCore.App.Runtime.AOT.osx-x64.Cross.tvossimulator-x64" | ||
} | ||
}, | ||
"Microsoft.NETCore.App.Runtime.AOT.Cross.ios-arm": { | ||
"kind": "Sdk", | ||
"version": "2.3.4.5", | ||
"alias-to": { | ||
"osx-x64": "Microsoft.NETCore.App.Runtime.AOT.osx-x64.Cross.ios-arm", | ||
"osx-arm64": "Microsoft.NETCore.App.Runtime.AOT.osx-x64.Cross.ios-arm" | ||
} | ||
}, | ||
"Microsoft.NETCore.App.Runtime.AOT.Cross.ios-arm64": { | ||
"kind": "Sdk", | ||
"version": "2.3.4.5", | ||
"alias-to": { | ||
"osx-x64": "Microsoft.NETCore.App.Runtime.AOT.osx-x64.Cross.ios-arm64", | ||
"osx-arm64": "Microsoft.NETCore.App.Runtime.AOT.osx-x64.Cross.ios-arm64" | ||
} | ||
}, | ||
"Microsoft.NETCore.App.Runtime.AOT.Cross.iossimulator-arm64": { | ||
"kind": "Sdk", | ||
"version": "2.3.4.5", | ||
"alias-to": { | ||
"osx-arm64": "Microsoft.NETCore.App.Runtime.AOT.osx-x64.Cross.iossimulator-arm64", | ||
"osx-x64": "Microsoft.NETCore.App.Runtime.AOT.osx-x64.Cross.iossimulator-arm64" | ||
} | ||
}, | ||
"Microsoft.NETCore.App.Runtime.AOT.Cross.iossimulator-x64": { | ||
"kind": "Sdk", | ||
"version": "2.3.4.5", | ||
"alias-to": { | ||
"osx-arm64": "Microsoft.NETCore.App.Runtime.AOT.osx-x64.Cross.iossimulator-x64", | ||
"osx-x64": "Microsoft.NETCore.App.Runtime.AOT.osx-x64.Cross.iossimulator-x64" | ||
} | ||
}, | ||
"Microsoft.NETCore.App.Runtime.AOT.Cross.iossimulator-x86": { | ||
"kind": "Sdk", | ||
"version": "2.3.4.5", | ||
"alias-to": { | ||
"osx-arm64": "Microsoft.NETCore.App.Runtime.AOT.osx-x64.Cross.iossimulator-x86", | ||
"osx-x64": "Microsoft.NETCore.App.Runtime.AOT.osx-x64.Cross.iossimulator-x86" | ||
} | ||
}, | ||
"Microsoft.NETCore.App.Runtime.AOT.Cross.browser-wasm": { | ||
"kind": "Sdk", | ||
"version": "2.3.4.5", | ||
"alias-to": { | ||
"win-x64": "Microsoft.NETCore.App.Runtime.AOT.win-x64.Cross.browser-wasm", | ||
"linux-x64": "Microsoft.NETCore.App.Runtime.AOT.linux-x64.Cross.browser-wasm", | ||
"osx-x64": "Microsoft.NETCore.App.Runtime.AOT.osx-x64.Cross.browser-wasm", | ||
"osx-arm64": "Microsoft.NETCore.App.Runtime.AOT.osx-x64.Cross.browser-wasm" | ||
} | ||
}, | ||
"Microsoft.NETCore.App.Runtime.Mono.browser-wasm": { | ||
"kind": "framework", | ||
"version": "2.3.4.5" | ||
} | ||
} | ||
} |
Oops, something went wrong.