Skip to content

Commit

Permalink
Merge branch 'main' into all-assemblies-per-rid
Browse files Browse the repository at this point in the history
* main:
  Bump to dotnet/installer@ca467d68c8 8.0.100-preview.7.23364.32 (dotnet#8176)
  Clean up DotNetIgnore Unit Tests (dotnet#8163)
  • Loading branch information
grendello committed Jul 20, 2023
2 parents 52d5e5d + 7bf4edd commit 902a4a9
Show file tree
Hide file tree
Showing 21 changed files with 122 additions and 1,019 deletions.
6 changes: 4 additions & 2 deletions build-tools/automation/yaml-templates/run-dotnet-preview.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,11 @@ parameters:
steps:
- powershell: |
if ([Environment]::OSVersion.Platform -eq "Unix") {
$dotnetPath = "${{ parameters.xaSourcePath }}/bin/${{ parameters.configuration }}/dotnet/dotnet"
$env:DOTNET_ROOT = "${{ parameters.xaSourcePath }}/bin/${{ parameters.configuration }}/dotnet"
$dotnetPath = "$env:DOTNET_ROOT/dotnet"
} else {
$dotnetPath = "${{ parameters.xaSourcePath }}\bin\${{ parameters.configuration }}\dotnet\dotnet.exe"
$env:DOTNET_ROOT = "${{ parameters.xaSourcePath }}\bin\${{ parameters.configuration }}\dotnet"
$dotnetPath = "$env:DOTNET_ROOT\dotnet.exe"
}
& $dotnetPath ${{ parameters.command }} ${{ parameters.project }} ${{ parameters.arguments }}
if ([System.Convert]::ToBoolean("${{ parameters.useExitCodeForErrors }}") -and $LASTEXITCODE -ne 0) {
Expand Down
5 changes: 3 additions & 2 deletions build-tools/scripts/msbuild.mk
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@
# $(MSBUILD_FLAGS): Additional MSBuild flags; contains $(CONFIGURATION), $(V), $(MSBUILD_ARGS).

MSBUILD = msbuild
DOTNET_TOOL = $(topdir)/bin/$(CONFIGURATION)/dotnet/dotnet
DOTNET_ROOT = $(topdir)/bin/$(CONFIGURATION)/dotnet/
DOTNET_TOOL = $(DOTNET_ROOT)dotnet
DOTNET_VERB = build
MSBUILD_FLAGS = /p:Configuration=$(CONFIGURATION) $(MSBUILD_ARGS)

Expand Down Expand Up @@ -51,7 +52,7 @@ endef

# $(call DOTNET_BINLOG,name,build=$(DOTNET_VERB),dotnet=$(DOTNET_TOOL))
define DOTNET_BINLOG
$(if $(3),$(3),$(DOTNET_TOOL)) $(if $(2),$(2),$(DOTNET_VERB)) -c $(CONFIGURATION) -v:n $(MSBUILD_ARGS) \
$(if $(3),,DOTNET_ROOT='$(DOTNET_ROOT)') $(if $(3),$(3),$(DOTNET_TOOL)) $(if $(2),$(2),$(DOTNET_VERB)) -c $(CONFIGURATION) -v:n $(MSBUILD_ARGS) \
-bl:"$(dir $(realpath $(firstword $(MAKEFILE_LIST))))/bin/Build$(CONFIGURATION)/msbuild-`date +%Y%m%dT%H%M%S`-$(1).binlog"
endef

Expand Down
20 changes: 10 additions & 10 deletions eng/Version.Details.xml
Original file line number Diff line number Diff line change
@@ -1,24 +1,24 @@
<Dependencies>
<ProductDependencies>
<Dependency Name="Microsoft.Dotnet.Sdk.Internal" Version="8.0.100-preview.7.23330.16">
<Dependency Name="Microsoft.Dotnet.Sdk.Internal" Version="8.0.100-preview.7.23364.32">
<Uri>https://github.com/dotnet/installer</Uri>
<Sha>28d4a6b4bed1515bdbe491c9e0c8ef7aa3a24497</Sha>
<Sha>ca467d68c8f678a671984a46996d3fc37fe7f3de</Sha>
</Dependency>
<Dependency Name="Microsoft.NET.ILLink.Tasks" Version="8.0.0-preview.7.23329.8" CoherentParentDependency="Microsoft.Dotnet.Sdk.Internal">
<Dependency Name="Microsoft.NET.ILLink.Tasks" Version="8.0.0-preview.7.23364.3" CoherentParentDependency="Microsoft.Dotnet.Sdk.Internal">
<Uri>https://github.com/dotnet/runtime</Uri>
<Sha>3e87528325b09f884b0a09a8c4ef79393abfd0db</Sha>
<Sha>ae99bb2e7a0a5db7c2bff129322965fd3c6e820d</Sha>
</Dependency>
<Dependency Name="Microsoft.NETCore.App.Ref" Version="8.0.0-preview.7.23329.8" CoherentParentDependency="Microsoft.Dotnet.Sdk.Internal">
<Dependency Name="Microsoft.NETCore.App.Ref" Version="8.0.0-preview.7.23364.3" CoherentParentDependency="Microsoft.Dotnet.Sdk.Internal">
<Uri>https://github.com/dotnet/runtime</Uri>
<Sha>3e87528325b09f884b0a09a8c4ef79393abfd0db</Sha>
<Sha>ae99bb2e7a0a5db7c2bff129322965fd3c6e820d</Sha>
</Dependency>
<Dependency Name="Microsoft.NET.Workload.Emscripten.Current.Manifest-8.0.100.Transport" Version="8.0.0-preview.7.23326.1" CoherentParentDependency="Microsoft.NETCore.App.Ref">
<Dependency Name="Microsoft.NET.Workload.Emscripten.Current.Manifest-8.0.100.Transport" Version="8.0.0-preview.7.23361.2" CoherentParentDependency="Microsoft.NETCore.App.Ref">
<Uri>https://github.com/dotnet/emsdk</Uri>
<Sha>60a73f97a0ec16c25ce4d36b1bcff1fedb831716</Sha>
<Sha>afbff08914374ed6790324635b9346d1256680fc</Sha>
</Dependency>
<Dependency Name="Microsoft.DotNet.Cecil" Version="0.11.4-alpha.23327.1" CoherentParentDependency="Microsoft.NET.ILLink.Tasks">
<Dependency Name="Microsoft.DotNet.Cecil" Version="0.11.4-alpha.23360.2" CoherentParentDependency="Microsoft.NET.ILLink.Tasks">
<Uri>https://github.com/dotnet/cecil</Uri>
<Sha>3e46711f5a933551557286d211970faa08b07b7e</Sha>
<Sha>1a6a83a8f50e1119f1007b1e3c211d3289ba6901</Sha>
</Dependency>
</ProductDependencies>
<ToolsetDependencies>
Expand Down
10 changes: 5 additions & 5 deletions eng/Versions.props
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
<Project>
<!--Package versions-->
<PropertyGroup>
<MicrosoftDotnetSdkInternalPackageVersion>8.0.100-preview.7.23330.16</MicrosoftDotnetSdkInternalPackageVersion>
<MicrosoftNETILLinkTasksPackageVersion>8.0.0-preview.7.23329.8</MicrosoftNETILLinkTasksPackageVersion>
<MicrosoftNETCoreAppRefPackageVersion>8.0.0-preview.7.23329.8</MicrosoftNETCoreAppRefPackageVersion>
<MicrosoftDotnetSdkInternalPackageVersion>8.0.100-preview.7.23364.32</MicrosoftDotnetSdkInternalPackageVersion>
<MicrosoftNETILLinkTasksPackageVersion>8.0.0-preview.7.23364.3</MicrosoftNETILLinkTasksPackageVersion>
<MicrosoftNETCoreAppRefPackageVersion>8.0.0-preview.7.23364.3</MicrosoftNETCoreAppRefPackageVersion>
<MicrosoftDotNetApiCompatPackageVersion>7.0.0-beta.22103.1</MicrosoftDotNetApiCompatPackageVersion>
<MicrosoftDotNetBuildTasksFeedPackageVersion>7.0.0-beta.22103.1</MicrosoftDotNetBuildTasksFeedPackageVersion>
<MicrosoftNETWorkloadEmscriptenCurrentManifest80100TransportVersion>8.0.0-preview.7.23326.1</MicrosoftNETWorkloadEmscriptenCurrentManifest80100TransportVersion>
<MicrosoftNETWorkloadEmscriptenCurrentManifest80100TransportVersion>8.0.0-preview.7.23361.2</MicrosoftNETWorkloadEmscriptenCurrentManifest80100TransportVersion>
<MicrosoftNETWorkloadEmscriptenPackageVersion>$(MicrosoftNETWorkloadEmscriptenCurrentManifest80100TransportVersion)</MicrosoftNETWorkloadEmscriptenPackageVersion>
<MicrosoftTemplateEngineTasksPackageVersion>7.0.100-rc.1.22410.7</MicrosoftTemplateEngineTasksPackageVersion>
<MicrosoftDotNetCecilPackageVersion>0.11.4-alpha.23327.1</MicrosoftDotNetCecilPackageVersion>
<MicrosoftDotNetCecilPackageVersion>0.11.4-alpha.23360.2</MicrosoftDotNetCecilPackageVersion>
<SystemIOHashingPackageVersion>$(MicrosoftNETCoreAppRefPackageVersion)</SystemIOHashingPackageVersion>
</PropertyGroup>
<PropertyGroup>
Expand Down
2 changes: 1 addition & 1 deletion external/Java.Interop
Original file line number Diff line number Diff line change
Expand Up @@ -1102,40 +1102,25 @@ public void BuildAppWithManagedResourceParserAndLibraries ()
}

[Test]
[Category ("DotNetIgnore")] // n/a in .NET 5, not possible to use $(TFV) of v8.0
public void CheckMaxResWarningIsEmittedAsAWarning([Values (false, true)] bool useAapt2)
public void CheckMaxResWarningIsEmittedAsAWarning()
{
AssertAaptSupported (useAapt2);
var path = Path.Combine ("temp", TestName);
var proj = new XamarinAndroidApplicationProject () {
TargetFrameworkVersion = "v8.0",
TargetSdkVersion = "26",
MinSdkVersion = null,
UseLatestPlatformSdk = false,
IsRelease = true,
OtherBuildItems = {
new BuildItem.Folder ("Resources\\values-v27\\") {
new BuildItem.Folder ("Resources\\values-v33\\") {
},
},
};
proj.AndroidUseAapt2 = useAapt2;
proj.AndroidResources.Add (new AndroidItem.AndroidResource ("Resources\\values-v27\\Strings.xml") {
proj.AndroidResources.Add (new AndroidItem.AndroidResource ("Resources\\values-v33\\Strings.xml") {
TextContent = () => @"<?xml version=""1.0"" encoding=""utf-8""?>
<resources>
<string name=""test"" >Test</string>
</resources>",
});
using (var builder = CreateApkBuilder (path)) {
if (!builder.TargetFrameworkExists (proj.TargetFrameworkVersion)) {
Assert.Ignore ($"Skipping Test. TargetFrameworkVersion {proj.TargetFrameworkVersion} was not available.");
}
Assert.IsTrue (builder.Build (proj), "Build should have succeeded.");
if (useAapt2) {
StringAssertEx.DoesNotContain ("APT0000", builder.LastBuildOutput, "Build output should not contain an APT0000 warning");
} else {
var expected = "warning APT1146: max res 26, skipping values-v27";
StringAssertEx.Contains (expected, builder.LastBuildOutput, "Build output should contain an APT1146 warning about 'max res 26, skipping values-v27'");
}
StringAssertEx.DoesNotContain ("APT0000", builder.LastBuildOutput, "Build output should not contain an APT0000 warning");
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,9 @@ public void BuildBasicApplicationReleaseProfiledAotWithoutDefaultProfile ()
[TestCaseSource (nameof (AotChecks))]
public void BuildAotApplicationWithNdkAndBundleAndÜmläüts (string supportedAbis, bool enableLLVM, bool usesAssemblyBlobs)
{
if (IsWindows)
Assert.Ignore ("https://github.com/dotnet/runtime/issues/88625");

var abisSanitized = supportedAbis.Replace (";", "").Replace ("-", "").Replace ("_", "");
var path = Path.Combine ("temp", string.Format ("BuildAotNdk AndÜmläüts_{0}_{1}_{2}", abisSanitized, enableLLVM, usesAssemblyBlobs));
var proj = new XamarinAndroidApplicationProject () {
Expand Down Expand Up @@ -213,6 +216,9 @@ public void BuildAotApplicationWithNdkAndBundleAndÜmläüts (string supportedAb
[TestCaseSource (nameof (AotChecks))]
public void BuildAotApplicationAndÜmläüts (string supportedAbis, bool enableLLVM, bool usesAssemblyBlobs)
{
if (IsWindows)
Assert.Ignore ("https://github.com/dotnet/runtime/issues/88625");

var abisSanitized = supportedAbis.Replace (";", "").Replace ("-", "").Replace ("_", "");
var path = Path.Combine ("temp", string.Format ("BuildAot AndÜmläüts_{0}_{1}_{2}", abisSanitized, enableLLVM, usesAssemblyBlobs));
var proj = new XamarinAndroidApplicationProject () {
Expand Down Expand Up @@ -411,6 +417,9 @@ public static void Foo () {
[Category ("LLVM")]
public void NoSymbolsArgShouldReduceAppSize ([Values ("", "Hybrid")] string androidAotMode, [Values (false, true)] bool skipDebugSymbols)
{
if (IsWindows)
Assert.Ignore ("https://github.com/dotnet/runtime/issues/88625");

AssertAotModeSupported (androidAotMode);

var proj = new XamarinAndroidApplicationProject () {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -442,30 +442,6 @@ public void RemoveEventHandlerResolution ()
}
}

[Test]
[Category ("DotNetIgnore")]
public void JavaDocJar ()
{
var binding = new XamarinAndroidBindingProject () {
AndroidClassParser = "class-parse",
};
binding.SetProperty ("DocumentationFile", "UnnamedProject.xml");
using (var bindingBuilder = CreateDllBuilder ()) {
binding.Jars.Add (new AndroidItem.EmbeddedJar ("javasourcejartest.jar") {
BinaryContent = () => ResourceData.JavaSourceJarTestJar,
});
binding.OtherBuildItems.Add (new BuildItem ("JavaDocJar", "javasourcejartest-javadoc.jar") {
BinaryContent = () => ResourceData.JavaSourceJarTestJavadocJar,
});
Assert.IsTrue (bindingBuilder.Build (binding), "binding build should have succeeded");

var cs_file = bindingBuilder.Output.GetIntermediaryPath (
Path.Combine ("generated", "src", "Com.Xamarin.Android.Test.Msbuildtest.JavaSourceJarTest.cs"));
FileAssert.Exists (cs_file);
StringAssert.Contains ("Greet (string name, global::Java.Util.Date date)", File.ReadAllText (cs_file));
}
}

[Test]
public void JavaSourceJar ()
{
Expand Down Expand Up @@ -622,26 +598,6 @@ public void NothingToBind (string classParser)
}
}

[Test]
[Category ("DotNetIgnore")] //TODO: @(LibraryProjectProperties) not supported yet in .NET 5+
public void BugzillaBug11964 ()
{
var proj = new XamarinAndroidBindingProject ();

proj.Sources.Add (new BuildItem ("LibraryProjectProperties", "project.properties") {
TextContent = () => ""
});

using (var builder = CreateDllBuilder ()) {
builder.ThrowOnBuildFailure = false;
Assert.IsFalse (builder.Build (proj), "Build should have failed.");
string error = builder.LastBuildOutput
.SkipWhile (x => !x.StartsWith ("Build FAILED.", StringComparison.Ordinal))
.FirstOrDefault (x => x.Contains ("error XA1019:"));
Assert.IsNotNull (error, "Build should have failed with XA1019.");
}
}

[Test]
public void BindingWithAndroidJavaSource ()
{
Expand Down
Loading

0 comments on commit 902a4a9

Please sign in to comment.