Skip to content

Commit

Permalink
Bump to mono:2018-06 (#4277)
Browse files Browse the repository at this point in the history
* Bump to mono:2018-06

* Bump mono

* Updates compression to work with the public span

* Bump mono

* Fixes pointer check logic in Deflater

* Bump mono

* Fixes pointer check logic in Deflater

* Bump mono

* Bump Mono

* [runtime] always use `mono_jit_set_aot_mode` (#4491)

`mono_jit_set_aot_only` is deprecated and accidentally broke with
mono/mono#7887

This should fix device tests with `mono-2018-06`

* Testing with Zoltan's patch

* Include libmono-system-native on Xamarin.Mac

* Bump Mono

Commit list for mono/mono:

* mono/mono@7bcda192a06 Bump llvm to release_60/fc854b8ec5873d294b80afa3e6cf6a88c5c48886. (#9786). (#9804)
* mono/mono@23e95ec7ad7 Apply F# portable pdb debug fix for pinvokes & bump (#9797)
* mono/mono@295f6d32afd [2018-06] [MacOS] On Mac, use the copyfile API to copy files (#9696)

Diff: mono/mono@7d5f4b6...7bcda19

* Revert 4bacab3, it doesn't fix the ios aot problems.

* Bump mono

* [tests] Adjust the MT0137 test for mcs change in behavior.

Starting with mono 5.16 mcs will now add assembly references when the assembly
is only used in attributes (this was already the case for csc in both 5.14 and
5.16, so it seems to be a compatibility change).

Adjust the MT0137 test accordingly.

* [msbuild] Fix parsing of json parser errors to handle trailing periods in the error message.

Fixes this test:

    1) Test Failure : Xamarin.iOS.Tasks.Bug60536.TestACToolTaskCatchesJsonException
         ColumnNumber
      Expected: 2
      But was:  0

* Bump mono

* [builds] Install the old llvm binaries into the LLVM36 directory and make the 32 bit builds use that.

* Bump mono

* Bump mono

* [jenkins] Don't give VSTS a fake branch. (#4667)

Something in VSTS changed, and now fake branch names don't work anymore.

So instead use real branch names (and for pull requests I've created a
'pull-request' branch we can use).

* Assembly.LoadFile accepts only absolute path

* [linker] Add new Facade (System.Threading.Tasks.Extensions).

Fixes these MTouch test failures:

    1. Xamarin.Linker.SdkTest.iOS_Unified :   Facades
      Expected:
      But was:  < "System.Threading.Tasks.Extensions" >

    2. Xamarin.Linker.SdkTest.tvOS :   Facades
      Expected:
      But was:  < "System.Threading.Tasks.Extensions" >

    3. Xamarin.Linker.SdkTest.watchOS :   Facades
      Expected:
      But was:  < "System.Threading.Tasks.Extensions" >

* [mono-sdks] Necessary changes to unify the LLVM provisioning for both iOS and Android. (#4732)

* Bump Mono

* [mtouch] add mixed-mode support (#4751)

* [mtouch] add --interp-mixed option

When enabling this option, mtouch will AOT compile `mscorlib.dll`.  At
runtime that means every method that wasn't AOT'd will be executed by
the runtime interpreter.

* [mtouch] Add support to --interpreter to list the assemblies to (not) interpret.

* [msbuild] Simplify interpreter code to use a single variable.

* Fix whitespace.

* [mtouch] Move mtouch-specific code to mtouch-specific file.

* [msbuild] An empty string is a valid value for 'Interpreter', so make it a non-required property.

* [mtouch] Add sanity check for aot-compiling interpreted assemblies.

* Bump Mono

* [linker] Updates SDKs facades list

* Bump mono

* [msbuild] Adds facades which might override default nuget version to framework list

The collision resolver task reads them from here https://github.com/dotnet/sdk/blob/master/src/Tasks/Common/ConflictResolution/FrameworkListReader.cs

* Bump to a VSfM version that can build XM Classic projects.
  • Loading branch information
directhex authored and spouliot committed Oct 10, 2018
1 parent a75c0b9 commit 6f2ebed
Show file tree
Hide file tree
Showing 29 changed files with 218 additions and 71 deletions.
2 changes: 1 addition & 1 deletion .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
[submodule "external/mono"]
path = external/mono
url = ../../mono/mono.git
branch = 2018-04
branch = 2018-06
[submodule "external/opentk"]
path = external/opentk
url = ../../mono/opentk.git
Expand Down
12 changes: 6 additions & 6 deletions Make.config
Original file line number Diff line number Diff line change
Expand Up @@ -47,18 +47,18 @@ XCODE94_URL=http://xamarin-storage/bot-provisioning/xcodes/Xcode_9.4.xip
XCODE94_DEVELOPER_ROOT=/Applications/Xcode94.app/Contents/Developer

# Minimum Mono version
MIN_MONO_VERSION=5.14.0.136
MAX_MONO_VERSION=5.14.99
MIN_MONO_URL=https://xamjenkinsartifact.azureedge.net/build-package-osx-mono/2018-04/111/07c8f25fe536dbb7e244f965aa3f9a871f41e953/MonoFramework-MDK-5.14.0.136.macos10.xamarin.universal.pkg
MIN_MONO_VERSION=5.16.0.5
MAX_MONO_VERSION=5.16.99
MIN_MONO_URL=https://xamjenkinsartifact.azureedge.net/build-package-osx-mono/2018-06/7/7627a5f9eeba0fd846731ad0c498556f55be1a34/MonoFramework-MDK-5.16.0.5.macos10.xamarin.universal.pkg

# Minimum Mono version for Xamarin.Mac apps using the system mono
MIN_XM_MONO_VERSION=5.14.0.136
MIN_XM_MONO_URL=https://xamjenkinsartifact.azureedge.net/build-package-osx-mono/2018-04/111/07c8f25fe536dbb7e244f965aa3f9a871f41e953/MonoFramework-MDK-5.14.0.136.macos10.xamarin.universal.pkg

# Minimum Visual Studio version
MIN_VISUAL_STUDIO_URL=https://download.visualstudio.microsoft.com/download/pr/11550896/783d2219a348f93b6988fb415951788a/VisualStudioForMac-Preview-7.4.0.985.dmg
MIN_VISUAL_STUDIO_VERSION=7.4.0.985
MAX_VISUAL_STUDIO_VERSION=7.7.99
MIN_VISUAL_STUDIO_URL=https://bosstoragemirror.azureedge.net/vsmac/7a/7aff2dc1f28d711d11d63d79b2a4c49cda217189/VisualStudioForMac-Preview-7.7.0.1470.dmg
MIN_VISUAL_STUDIO_VERSION=7.7.0.1470
MAX_VISUAL_STUDIO_VERSION=7.8.99

# Minimum CMake version
MIN_CMAKE_URL=https://cmake.org/files/v3.6/cmake-3.6.2-Darwin-x86_64.dmg
Expand Down
22 changes: 16 additions & 6 deletions builds/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -90,10 +90,10 @@ CCACHE_CXXFLAGS=-Qunused-arguments
# Configuration for the mono sdk makefiles
#
SDK_CONFIG=$(MONO_PATH)/sdks/Make.config
SDK_ARGS=XCODE_DIR=$(XCODE_DEVELOPER_ROOT) IOS_VERSION=$(IOS_SDK_VERSION) IOS_VERSION_MIN=$(MIN_IOS_SDK_VERSION) TVOS_VERSION=$(TVOS_SDK_VERSION) TVOS_VERSION_MIN=$(MIN_TVOS_SDK_VERSION) WATCHOS_VERSION=$(WATCH_SDK_VERSION) WATCHOS_VERSION_MIN=$(MIN_WATCHOS_SDK_VERSION)
SDK_ARGS=XCODE_DIR=$(XCODE_DEVELOPER_ROOT) IOS_VERSION=$(IOS_SDK_VERSION) IOS_VERSION_MIN=$(MIN_IOS_SDK_VERSION) TVOS_VERSION=$(TVOS_SDK_VERSION) TVOS_VERSION_MIN=$(MIN_TVOS_SDK_VERSION) WATCHOS_VERSION=$(WATCH_SDK_VERSION) WATCHOS_VERSION_MIN=$(MIN_WATCHOS_SDK_VERSION) IGNORE_PROVISION_LLVM=1

ifdef IGNORE_PACKAGE_LLVM
SDK_ARGS += IGNORE_PACKAGE_LLVM=1
ifdef DISABLE_DOWNLOAD_LLVM
SDK_ARGS += DISABLE_DOWNLOAD_LLVM=1
endif

SDK_BUILDDIR = $(MONO_PATH)/sdks/builds
Expand Down Expand Up @@ -199,6 +199,7 @@ MAC_BCL_TARGETS = \

MAC_TARGETS = \
$(MAC_DESTDIR)$(MAC_FRAMEWORK_CURRENT_DIR)/lib/libmono-profiler-log.a \
$(MAC_DESTDIR)$(MAC_FRAMEWORK_CURRENT_DIR)/lib/libmono-system-native.a \
$(MAC_DESTDIR)$(MAC_FRAMEWORK_CURRENT_DIR)/lib/libmono-2.0.dylib \
$(MAC_DESTDIR)$(MAC_FRAMEWORK_CURRENT_DIR)/lib/libmono-2.0.a \
$(MAC_DESTDIR)$(MAC_FRAMEWORK_CURRENT_DIR)/lib/pkgconfig/mono-2.pc \
Expand Down Expand Up @@ -315,6 +316,7 @@ endef

$(eval $(call lipo_template_static,libmono-profiler-log.a,mono/profiler))
$(eval $(call lipo_template_static,libmonosgen-2.0.a,mono/mini))
$(eval $(call lipo_template_static,libmono-system-native.a,mono/metadata))
$(eval $(call lipo_template_dynamic,libmonosgen-2.0.dylib,mono/mini))
$(eval $(call lipo_template_dynamic,libMonoPosixHelper.dylib,support))

Expand Down Expand Up @@ -1500,11 +1502,11 @@ build-llvm32: .stamp-build-llvm
build-llvm64: .stamp-build-llvm

.stamp-build-llvm: $(SDK_CONFIG)
$(MAKE) -C $(SDK_BUILDDIR) build-ios-llvm $(SDK_ARGS)
$(MAKE) -C $(SDK_BUILDDIR) provision-llvm36-llvm32 provision-llvm-llvm64 $(SDK_ARGS)
$(Q) touch $@

clean-llvm: $(SDK_CONFIG)
$(MAKE) -C $(SDK_BUILDDIR) clean-ios-llvm $(SDK_ARGS)
$(MAKE) -C $(SDK_BUILDDIR) clean-llvm36-llvm32 clean-llvm-llvm64 $(SDK_ARGS)
$(RM) .stamp-*-llvm*

.PHONY: install-llvm64 llvm llvm64
Expand All @@ -1514,13 +1516,21 @@ install-llvm: install-llvm32 install-llvm64
LLVM_TARGETS = \
$(PREFIX)/LLVM/bin/opt \
$(PREFIX)/LLVM/bin/llc \
$(PREFIX)/LLVM36/bin/opt \
$(PREFIX)/LLVM36/bin/llc

$(PREFIX)/LLVM/bin/%: $(SDK_DESTDIR)/ios-llvm64/bin/% | $(PREFIX)/LLVM/bin
$(PREFIX)/LLVM/bin/%: $(SDK_DESTDIR)/llvm-llvm64/bin/% | $(PREFIX)/LLVM/bin
$(call Q_2,INSTALL ,[LLVM64]) install -c -m 0755 $(INSTALL_STRIP_FLAG) $^ $@

$(PREFIX)/LLVM36/bin/%: $(SDK_DESTDIR)/llvm36-llvm32/bin/% | $(PREFIX)/LLVM36/bin
$(call Q_2,INSTALL ,[LLVM64]) install -c -m 0755 $(INSTALL_STRIP_FLAG) $^ $@

$(PREFIX)/LLVM/bin:
$(Q) mkdir -p $@

$(PREFIX)/LLVM36/bin:
$(Q) mkdir -p $@

install-llvm32:.stamp-build-llvm $(LLVM_TARGETS)
install-llvm64: .stamp-build-llvm $(LLVM_TARGETS)

Expand Down
2 changes: 1 addition & 1 deletion configure
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ while test x$1 != x; do
shift
;;
--disable-packaged-llvm)
echo "IGNORE_PACKAGE_LLVM=1" >> $CONFIGURED_FILE
echo "DISABLE_DOWNLOAD_LLVM=1" >> $CONFIGURED_FILE
shift
;;
--help|-h)
Expand Down
2 changes: 1 addition & 1 deletion external/mono
Submodule mono updated 1433 files
11 changes: 7 additions & 4 deletions msbuild/Xamarin.MacDev.Tasks.Core/Tasks/ACToolTaskBase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -390,12 +390,15 @@ public override bool Execute ()
int line = 0, column = 0;
int index, endIndex;

if ((index = ex.Message.IndexOf ("At line ", StringComparison.Ordinal)) != -1) {
var message = ex.Message;
if (message.EndsWith (".", StringComparison.Ordinal))
message = message.Substring (0, message.Length - 1);
if ((index = message.IndexOf ("At line ", StringComparison.Ordinal)) != -1) {
index += "At line ".Length;

if ((endIndex = ex.Message.IndexOf (", column ", index, StringComparison.Ordinal)) != -1) {
var columnBuf = ex.Message.Substring (endIndex + ", column ".Length);
var lineBuf = ex.Message.Substring (index, endIndex - index);
if ((endIndex = message.IndexOf (", column ", index, StringComparison.Ordinal)) != -1) {
var columnBuf = message.Substring (endIndex + ", column ".Length);
var lineBuf = message.Substring (index, endIndex - index);

int.TryParse (columnBuf, out column);
int.TryParse (lineBuf, out line);
Expand Down
7 changes: 3 additions & 4 deletions msbuild/Xamarin.iOS.Tasks.Core/Tasks/MTouchTaskBase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -106,8 +106,7 @@ public GccOptions ()
[Required]
public bool EnableSGenConc { get; set; }

[Required]
public bool UseInterpreter { get; set; }
public string Interpreter { get; set; }

[Required]
public bool LinkerDumpDependencies { get; set; }
Expand Down Expand Up @@ -405,8 +404,8 @@ protected override string GenerateCommandLineCommands ()
if (EnableSGenConc)
args.AddLine ("--sgen-conc");

if (UseInterpreter)
args.Add ("--interpreter");
if (!string.IsNullOrEmpty (Interpreter))
args.Add ($"--interpreter={Interpreter}");

switch (LinkMode.ToLowerInvariant ()) {
case "sdkonly": args.AddLine ("--linksdkonly"); break;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,2 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<FileList Name="Xamarin.TVOS" TargetFrameworkDirectory="%TargetFrameworkDirectory%" />
<FileList Name="Xamarin.TVOS" TargetFrameworkDirectory="%TargetFrameworkDirectory%">
<File AssemblyName="System.Buffers" Version="4.0.99.0" />
<File AssemblyName="System.Memory" Version="4.0.99.0" />
</FileList>
Original file line number Diff line number Diff line change
@@ -1,2 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<FileList Name="Xamarin.WatchOS" TargetFrameworkDirectory="%TargetFrameworkDirectory%" />
<FileList Name="Xamarin.WatchOS" TargetFrameworkDirectory="%TargetFrameworkDirectory%">
<File AssemblyName="System.Buffers" Version="4.0.99.0" />
<File AssemblyName="System.Memory" Version="4.0.99.0" />
</FileList>
Original file line number Diff line number Diff line change
@@ -1,2 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<FileList Name="Xamarin.iOS" TargetFrameworkDirectory="%TargetFrameworkDirectory%" />
<FileList Name="Xamarin.iOS" TargetFrameworkDirectory="%TargetFrameworkDirectory%">
<File AssemblyName="System.Buffers" Version="4.0.99.0" />
<File AssemblyName="System.Memory" Version="4.0.99.0" />
</FileList>
1 change: 0 additions & 1 deletion msbuild/Xamarin.iOS.Tasks.Core/Xamarin.iOS.Common.props
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@ Copyright (C) 2013-2016 Xamarin. All rights reserved.
<MtouchUseThumb Condition="'$(MtouchUseThumb)' == ''">False</MtouchUseThumb>
<MtouchProjectDirectory>$(MSBuildProjectDirectory)</MtouchProjectDirectory>
<MtouchEnableSGenConc Condition="'$(MtouchEnableSGenConc)' == ''">False</MtouchEnableSGenConc>
<MtouchUseInterpreter Condition="'$(MtouchUseInterpreter)' == ''">False</MtouchUseInterpreter>
<MtouchVerbosity Condition="$(MtouchVerbosity) == ''">2</MtouchVerbosity>

<IsMacEnabled>true</IsMacEnabled>
Expand Down
2 changes: 1 addition & 1 deletion msbuild/Xamarin.iOS.Tasks.Core/Xamarin.iOS.Common.targets
Original file line number Diff line number Diff line change
Expand Up @@ -832,7 +832,7 @@ Copyright (C) 2013-2016 Xamarin. All rights reserved.
UseThumb="$(MtouchUseThumb)"
EnableBitcode="$(MtouchEnableBitcode)"
EnableSGenConc="$(MtouchEnableSGenConc)"
UseInterpreter="$(MtouchUseInterpreter)"
Interpreter="$(MtouchInterpreter)"
AppExtensionReferences="@(_ResolvedAppExtensionReferences)"
ArchiveSymbols="$(MonoSymbolArchive)"
Verbosity="$(MtouchVerbosity)"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ public void TestACToolTaskCatchesJsonException ()
Assert.AreEqual (2, Engine.Logger.ErrorEvents[0].ColumnNumber, "ColumnNumber");
Assert.AreEqual (197, Engine.Logger.ErrorEvents[0].EndLineNumber, "EndLineNumber");
Assert.AreEqual (2, Engine.Logger.ErrorEvents[0].EndColumnNumber, "EndColumnNumber");
Assert.AreEqual ("Unexpected character ']'. At line 197, column 2", Engine.Logger.ErrorEvents[0].Message, "Message");
Assert.AreEqual ("Unexpected character ']'. At line 197, column 2.", Engine.Logger.ErrorEvents[0].Message, "Message");
}
}
}
4 changes: 0 additions & 4 deletions runtime/exports.t4
Original file line number Diff line number Diff line change
Expand Up @@ -537,10 +537,6 @@
"char**", "argv"
),

new Export ("void", "mono_jit_set_aot_only",
"mono_bool", "aot_only"
),

new Export ("void", "mono_jit_set_aot_mode",
"MonoAotMode", "mode"
),
Expand Down
1 change: 0 additions & 1 deletion runtime/monotouch-main.m
Original file line number Diff line number Diff line change
Expand Up @@ -393,7 +393,6 @@ - (void) memoryWarning: (NSNotification *) sender

#if defined (__arm__) || defined(__aarch64__)
xamarin_register_modules ();
mono_jit_set_aot_only (TRUE);
#endif
DEBUG_LAUNCH_TIME_PRINT ("\tAOT register time");

Expand Down
6 changes: 3 additions & 3 deletions src/Compression/Compression.cs
Original file line number Diff line number Diff line change
Expand Up @@ -558,14 +558,14 @@ public override Task WriteAsync (byte[] array, int offset, int count, Cancellati
return WriteAsyncMemory (new ReadOnlyMemory<byte> (array, offset, count), cancellationToken);
}

public override Task WriteAsync (ReadOnlyMemory<byte> source, CancellationToken cancellationToken)
public override ValueTask WriteAsync (ReadOnlyMemory<byte> source, CancellationToken cancellationToken)
{
if (GetType () != typeof (CompressionStream)) {
// Ensure that existing streams derived from DeflateStream and that override WriteAsync(byte[],...)
// get their existing behaviors when the newer Memory-based overload is used.
return base.WriteAsync (source, cancellationToken);
} else {
return WriteAsyncMemory (source, cancellationToken);
return new ValueTask(WriteAsyncMemory (source, cancellationToken));
}
}

Expand All @@ -576,7 +576,7 @@ internal Task WriteAsyncMemory (ReadOnlyMemory<byte> source, CancellationToken c
EnsureNotDisposed ();

return cancellationToken.IsCancellationRequested ?
Task.FromCanceled<int> (cancellationToken) :
Task.FromCanceled<int>(cancellationToken) :
WriteAsyncMemoryCore (source, cancellationToken);
}

Expand Down
10 changes: 5 additions & 5 deletions src/Compression/Deflater.cs
Original file line number Diff line number Diff line change
Expand Up @@ -63,15 +63,15 @@ internal unsafe void SetInput (ReadOnlyMemory<byte> inputBuffer)
{
if (!NeedsInput ())
throw new InvalidOperationException ("We have something left in previous input!");
if (_inputBufferHandle.HasPointer)
if (_inputBufferHandle.Pointer != null)
throw new InvalidOperationException ("Unexpected input buffer handler found.");

if (0 == inputBuffer.Length) {
return;
}

lock (SyncLock) {
_inputBufferHandle = inputBuffer.Retain (pin: true);
_inputBufferHandle = inputBuffer.Pin ();

_compression_struct.Source = (IntPtr)_inputBufferHandle.Pointer;
_compression_struct.SourceSize = inputBuffer.Length;
Expand All @@ -84,7 +84,7 @@ internal unsafe void SetInput (byte* inputBufferPtr, int count)
throw new InvalidOperationException ("We have something left in previous input!");
if (inputBufferPtr == null)
throw new ArgumentNullException ( nameof (inputBufferPtr));
if (_inputBufferHandle.HasPointer)
if (_inputBufferHandle.Pointer != null)
throw new InvalidOperationException ("Unexpected input buffer handler found.");

if (count == 0) {
Expand Down Expand Up @@ -155,15 +155,15 @@ internal bool Finish (byte[] outputBuffer, out int bytesRead)
/// <summary>
/// Returns true if there was something to flush. Otherwise False.
/// </summary>
internal bool Flush (byte[] outputBuffer, out int bytesRead)
internal unsafe bool Flush (byte[] outputBuffer, out int bytesRead)
{
if (outputBuffer == null)
throw new ArgumentNullException (nameof (outputBuffer));
if (outputBuffer.Length < 0)
throw new ArgumentException ("Can't pass in an empty output buffer!");
if (!NeedsInput ())
throw new InvalidOperationException ("We have something left in previous input!");
if (_inputBufferHandle.HasPointer)
if (_inputBufferHandle.Pointer != null)
throw new InvalidOperationException ("InputHandler should not be set");

// Note: we require that NeedsInput() == true, i.e. that 0 == _zlibStream.AvailIn.
Expand Down
8 changes: 7 additions & 1 deletion tests/common/BundlerTool.cs
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ abstract class BundlerTool : Tool
public int Verbosity;
public int [] WarnAsError; // null array: nothing passed to mtouch/mmp. empty array: pass --warnaserror (which means makes all warnings errors).
public string [] XmlDefinitions;
public string Interpreter;

// These are a bit smarter
public bool NoPlatformAssemblyReference;
Expand Down Expand Up @@ -291,7 +292,12 @@ protected virtual void BuildArguments (StringBuilder sb)
sb.Append (" --xml:").Append (StringUtils.Quote (xd));
}


if (Interpreter != null) {
if (Interpreter.Length == 0)
sb.Append (" --interpreter");
else
sb.Append (" --interpreter=").Append (Interpreter);
}
}

public string CreateTemporaryDirectory ()
Expand Down
2 changes: 1 addition & 1 deletion tests/linker/ios/link all/LinkAllTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,7 @@ string FindAssemblyPath ()
public void Assembly_LoadFile ()
{
string filename = FindAssemblyPath ();
Assert.NotNull (Assembly.LoadFile (filename), "1");
Assert.NotNull (Assembly.LoadFile (Path.GetFullPath (filename)), "1");
}

[Test]
Expand Down
16 changes: 10 additions & 6 deletions tests/mmptest/src/LinkerTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -86,19 +86,23 @@ public void DynamicSymbolMode (string mode)
CSProjConfig = $"<MonoBundlingExtraArgs>--dynamic-symbol-mode={mode}</MonoBundlingExtraArgs>\n",
};
var output = TI.TestUnifiedExecutable (config);
string build_output;
switch (mode) {
case "linker":
case "default":
Assert.That (output.BuildOutput, Does.Contain ("-u "), "reference.m");
Assert.That (output.BuildOutput, Does.Not.Contain ("reference.m"), "reference.m");
build_output = output.BuildOutput;
Assert.That (build_output, Does.Contain ("-u "), "reference.m");
Assert.That (build_output, Does.Not.Contain ("reference.m"), "reference.m");
break;
case "code":
Assert.That (output.BuildOutput, Does.Not.Contain ("-u "), "reference.m");
Assert.That (output.BuildOutput, Does.Contain ("reference.m"), "reference.m");
build_output = output.BuildOutput.Replace ("-u _SystemNative_RealPath", String.Empty);
Assert.That (build_output, Does.Not.Contain ("-u "), "reference.m");
Assert.That (build_output, Does.Contain ("reference.m"), "reference.m");
break;
case "ignore":
Assert.That (output.BuildOutput, Does.Not.Contain ("-u "), "reference.m");
Assert.That (output.BuildOutput, Does.Not.Contain ("reference.m"), "reference.m");
build_output = output.BuildOutput.Replace ("-u _SystemNative_RealPath", String.Empty);
Assert.That (build_output, Does.Not.Contain ("-u "), "reference.m");
Assert.That (build_output, Does.Not.Contain ("reference.m"), "reference.m");
break;
default:
throw new NotImplementedException ();
Expand Down
26 changes: 24 additions & 2 deletions tests/mtouch/MTouch.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1783,10 +1783,32 @@ public class B
mtouch.Linker = MTouchLinker.DontLink;
File.Delete (dllPath);
mtouch.AlwaysShowOutput = true;
mtouch.AssertExecute (MTouchAction.BuildSim, "build");
mtouch.AssertExecuteFailure (MTouchAction.BuildSim, "build");
mtouch.AssertWarningPattern (136, "Cannot find the assembly 'A, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null' referenced from '.*/testApp.exe'.");
mtouch.AssertWarning (137, "Cannot find the assembly 'A, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null', referenced by a MyCustomAttribute attribute in 'testApp.exe'.");
mtouch.AssertWarning (137, "Cannot find the assembly 'A, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null', referenced by a System.Diagnostics.DebuggerTypeProxyAttribute attribute in 'testApp.exe'.");
mtouch.AssertWarningCount (2);
mtouch.AssertWarningCount (3);
mtouch.AssertError (2002, "Failed to resolve assembly: 'A, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null'");
mtouch.AssertErrorCount (1);
}
}

[Test]
public void MT0138 ()
{
using (var mtouch = new MTouchTool ()) {
var tmpdir = mtouch.CreateTemporaryDirectory ();
mtouch.CreateTemporaryCacheDirectory ();

mtouch.CreateTemporaryApp ();
mtouch.WarnAsError = new int [] { 138 }; // This is just to make mtouch bail out early instead of spending time building the app when that's not what we're interested in.
mtouch.Interpreter = "all,-all,foo,-bar,mscorlib.dll,mscorlib";
mtouch.AssertExecuteFailure (MTouchAction.BuildSim, "build");
mtouch.AssertError (138, "Cannot find the assembly 'foo', passed as an argument to --interpreter.");
mtouch.AssertError (138, "Cannot find the assembly 'bar', passed as an argument to --interpreter.");
mtouch.AssertError (138, "Cannot find the assembly 'mscorlib.dll', passed as an argument to --interpreter.");
// just the name, without the extension, is the right way.
mtouch.AssertErrorCount (3);
}
}

Expand Down
Loading

3 comments on commit 6f2ebed

@xamarin-release-manager
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Build was (probably) aborted

🔥 Jenkins job (on internal Jenkins) failed in stage(s) 'Test run' 🔥 : hudson.AbortException: script returned exit code 1

Build succeeded
API Diff (from stable)
🔥 Failed to compare API and create generator diff 🔥
Test run succeeded

@chamons
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔥 Failed to compare API and create generator diff 🔥 is expected in mono bumps.

@chamons
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Setting state to success where context is continuous-integration/jenkins/branch.

No blocking issues found

Please sign in to comment.