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

Bump to mono:2018-06 #4277

Merged
merged 41 commits into from
Oct 10, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
95bcaa9
Bump to mono:2018-06
directhex Jun 15, 2018
69f8d32
Merge branch 'master' into mono-2018-06
marek-safar Jul 10, 2018
8ad6666
Bump mono
marek-safar Jul 11, 2018
e20975b
Updates compression to work with the public span
marek-safar Jul 14, 2018
c044c6b
Bump mono
marek-safar Jul 14, 2018
9935c1c
Fixes pointer check logic in Deflater
marek-safar Jul 15, 2018
d5e029a
Bump mono
marek-safar Jul 15, 2018
559ef82
Fixes pointer check logic in Deflater
marek-safar Jul 16, 2018
8121c7b
Bump mono
marek-safar Jul 19, 2018
fe4b215
Bump Mono
marek-safar Jul 23, 2018
ce95d2a
[runtime] always use `mono_jit_set_aot_mode` (#4491)
lewurm Jul 24, 2018
b183101
Merge branch 'master' into mono-2018-06
marek-safar Jul 25, 2018
4bacab3
Testing with Zoltan's patch
marek-safar Jul 26, 2018
3b18aee
Include libmono-system-native on Xamarin.Mac
alexischr Jul 19, 2018
b456a32
Bump Mono
lewurm Jul 30, 2018
609f7b6
Revert 4bacab3d5c7fa86a0e6437f64bb9f08ea3d0741b, it doesn't fix the i…
vargaz Jul 28, 2018
bda2b14
Bump mono
marek-safar Aug 1, 2018
fdf3536
Merge branch 'master' into mono-2018-06
marek-safar Aug 1, 2018
9946fbd
[tests] Adjust the MT0137 test for mcs change in behavior.
rolfbjarne Aug 2, 2018
fc561b2
[msbuild] Fix parsing of json parser errors to handle trailing period…
rolfbjarne Aug 2, 2018
db6b3b7
Bump mono
marek-safar Aug 7, 2018
3eeff7e
Merge branch 'mono-2018-06' of github.com:xamarin/xamarin-macios into…
marek-safar Aug 7, 2018
6c5544e
[builds] Install the old llvm binaries into the LLVM36 directory and …
vargaz Aug 7, 2018
3901d8e
Bump mono
marek-safar Aug 8, 2018
b3245a6
Bump mono
marek-safar Aug 29, 2018
c844903
Merge remote-tracking branch 'origin/master' into mono-2018-06
marek-safar Aug 29, 2018
dc0ccb3
[jenkins] Don't give VSTS a fake branch. (#4667)
rolfbjarne Aug 21, 2018
d491fd4
Assembly.LoadFile accepts only absolute path
BrzVlad Aug 29, 2018
f69a8fc
[linker] Add new Facade (System.Threading.Tasks.Extensions).
rolfbjarne Aug 30, 2018
ce5331f
Merge remote-tracking branch 'origin/master' into mono-2018-06
rolfbjarne Aug 31, 2018
c7654a0
[mono-sdks] Necessary changes to unify the LLVM provisioning for both…
luhenry Sep 2, 2018
a285ec7
Bump Mono
marek-safar Sep 5, 2018
28347f9
Merge remote-tracking branch 'origin/master' into mono-2018-06
rolfbjarne Sep 6, 2018
cdbf122
[mtouch] add mixed-mode support (#4751)
lewurm Sep 11, 2018
aa6b803
Bump Mono
marek-safar Sep 13, 2018
7a4ee2e
[linker] Updates SDKs facades list
marek-safar Sep 13, 2018
a5df51d
Bump mono
marek-safar Sep 13, 2018
ac8fd9e
[msbuild] Adds facades which might override default nuget version to …
marek-safar Sep 13, 2018
ec02eb8
Merge remote-tracking branch 'origin/master' into mono-2018-06
marek-safar Sep 18, 2018
894315a
Bump to a VSfM version that can build XM Classic projects.
rolfbjarne Oct 1, 2018
f77c434
Merge branch 'master' into mono-2018-06
spouliot Oct 9, 2018
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
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 @@ -831,7 +831,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