Merge branch 'upstream'

Former-commit-id: 49fea35ddddb1db9eb75bdc6768d7ca9a852b718
This commit is contained in:
Xamarin Public Jenkins (auto-signing) 2018-02-22 09:17:20 +00:00
commit 534abbca5c
45 changed files with 120 additions and 49 deletions

View File

@ -1 +1 @@
5b02d173c15b509380185dfc6bb06fde914fbde7 0e5069804c3d90814f4f68a89510b58148390a78

View File

@ -1 +1 @@
4b136661d4fc7104dbd8952f3ce47b7fd4919b23 e4efeac42335109229714144733b3091f80ae170

View File

@ -29,9 +29,18 @@ using System.Diagnostics;
using System.Threading; using System.Threading;
using NUnit.Framework.Api; using NUnit.Framework.Api;
using System.Collections.Generic; using System.Collections.Generic;
using System.Runtime.Remoting.Messaging;
namespace NUnit.Framework.Internal namespace NUnit.Framework.Internal
{ {
[Serializable]
class Container : ILogicalThreadAffinative {
public Guid guid;
public Container(Guid guid) {
this.guid = guid;
}
}
public class FinallyDelegate public class FinallyDelegate
{ {
// If our test spawns a thread that throws, we will bubble // If our test spawns a thread that throws, we will bubble
@ -49,19 +58,32 @@ namespace NUnit.Framework.Internal
// so we need a stack of finally delegate continuations // so we need a stack of finally delegate continuations
Stack<Tuple<TestExecutionContext, long, TestResult>> testStack; Stack<Tuple<TestExecutionContext, long, TestResult>> testStack;
Dictionary<Guid, TestResult> lookupTable;
private static readonly string CONTEXT_KEY = "TestResultName";
public FinallyDelegate () { public FinallyDelegate () {
this.testStack = new Stack<Tuple<TestExecutionContext, long, TestResult>>(); this.testStack = new Stack<Tuple<TestExecutionContext, long, TestResult>>();
this.lookupTable = new Dictionary<Guid, TestResult>();
} }
public void Set (TestExecutionContext context, long startTicks, TestResult result) { public void Set (TestExecutionContext context, long startTicks, TestResult result) {
var frame = new Tuple<TestExecutionContext, long, TestResult>(context, startTicks, result); var frame = new Tuple<TestExecutionContext, long, TestResult>(context, startTicks, result);
/* keep name in LogicalCallContext, because this will be inherited by
* Threads spawned by the test case */
var guid = Guid.NewGuid();
CallContext.SetData(CONTEXT_KEY, new Container(guid));
this.lookupTable.Add(guid, result);
this.testStack.Push(frame); this.testStack.Push(frame);
} }
public void HandleUnhandledExc (Exception ex) { public void HandleUnhandledExc (Exception ex) {
TestExecutionContext context = this.testStack.Peek().Item1; Container c = (Container) CallContext.GetData(CONTEXT_KEY);
context.CurrentResult.RecordException(ex); TestResult result = this.lookupTable [c.guid];
context.CurrentResult.ThreadCrashFail = true; result.RecordException(ex);
result.ThreadCrashFail = true;
} }
public void Complete () { public void Complete () {

View File

@ -180,6 +180,15 @@ namespace NUnit.Framework.Internal.WorkItems
#endif #endif
private void RunTest() private void RunTest()
{
/* using a separate ExecutionContext for every test case,
* guarantees us to have a dedicated "namespace" for the
* LogicalCallContext per testcase */
ExecutionContext ec = ExecutionContext.Capture();
ExecutionContext.Run(ec, DispatchWork, null);
}
private void DispatchWork(object o)
{ {
_context.CurrentTest = this.Test; _context.CurrentTest = this.Test;
_context.CurrentResult = this.Result; _context.CurrentResult = this.Result;
@ -192,7 +201,7 @@ namespace NUnit.Framework.Internal.WorkItems
long startTicks = Stopwatch.GetTimestamp(); long startTicks = Stopwatch.GetTimestamp();
#endif #endif
finD.Set(_context, startTicks, Result); finD?.Set(_context, startTicks, Result);
PerformWork(); PerformWork();
} }
@ -211,7 +220,7 @@ namespace NUnit.Framework.Internal.WorkItems
/// </summary> /// </summary>
protected void WorkItemComplete() protected void WorkItemComplete()
{ {
finD.Complete(); finD?.Complete();
_state = WorkItemState.Complete; _state = WorkItemState.Complete;
if (Completed != null) if (Completed != null)
Completed(this, EventArgs.Empty); Completed(this, EventArgs.Empty);

View File

@ -34,7 +34,7 @@ static class Consts
// Use these assembly version constants to make code more maintainable. // Use these assembly version constants to make code more maintainable.
// //
public const string MonoVersion = "5.10.0.130"; public const string MonoVersion = "5.10.0.132";
public const string MonoCompany = "Mono development team"; public const string MonoCompany = "Mono development team";
public const string MonoProduct = "Mono Common Language Infrastructure"; public const string MonoProduct = "Mono Common Language Infrastructure";
public const string MonoCopyright = "(c) Various Mono authors"; public const string MonoCopyright = "(c) Various Mono authors";

View File

@ -1 +1 @@
26ea60ec41ad2706e3bae8d3a2064124e86ba579 ce18802ab9fddeab8c3df4d80d4920c0078beb8a

View File

@ -1 +1 @@
eab35ff7cf70feda7b2fe9be9a3f41e44e2fcd16 70bd018a65dbc16d9249e9f89aeb73904e06ae5a

View File

@ -1 +1 @@
22d78d26fdb7091c7fb1aeb34020e5a174443ef1 d66447f952feb4ec5829e5829e3d25dd8af939e4

View File

@ -1 +1 @@
b5dcf3ba8e3d663ac68168bcbaceb0c37ba70470 bc2df173bcd5877ac4b9a0147065291f7090ede0

View File

@ -1 +1 @@
65174aa10ad5127ea9241e44a005688ac56f69a1 5ce5b47ab7ee19494ca4bb2e4d7fe0285165199a

View File

@ -1 +1 @@
526a8bd343958be03f0d9536878f174c176632e6 73f330f118271340beadba9943f025f51326505b

View File

@ -1 +1 @@
eec0952259611a7cdb73f8953f0aa80e1bb28ca1 90445e4b34c276c86330ebdab580339e96320d17

View File

@ -1 +1 @@
26ea60ec41ad2706e3bae8d3a2064124e86ba579 ce18802ab9fddeab8c3df4d80d4920c0078beb8a

View File

@ -1 +1 @@
eab35ff7cf70feda7b2fe9be9a3f41e44e2fcd16 70bd018a65dbc16d9249e9f89aeb73904e06ae5a

View File

@ -1 +1 @@
22d78d26fdb7091c7fb1aeb34020e5a174443ef1 d66447f952feb4ec5829e5829e3d25dd8af939e4

View File

@ -1 +1 @@
b5dcf3ba8e3d663ac68168bcbaceb0c37ba70470 bc2df173bcd5877ac4b9a0147065291f7090ede0

View File

@ -1 +1 @@
65174aa10ad5127ea9241e44a005688ac56f69a1 5ce5b47ab7ee19494ca4bb2e4d7fe0285165199a

View File

@ -1 +1 @@
526a8bd343958be03f0d9536878f174c176632e6 73f330f118271340beadba9943f025f51326505b

View File

@ -1 +1 @@
eec0952259611a7cdb73f8953f0aa80e1bb28ca1 90445e4b34c276c86330ebdab580339e96320d17

View File

@ -1 +1 @@
26ea60ec41ad2706e3bae8d3a2064124e86ba579 ce18802ab9fddeab8c3df4d80d4920c0078beb8a

View File

@ -1 +1 @@
eab35ff7cf70feda7b2fe9be9a3f41e44e2fcd16 70bd018a65dbc16d9249e9f89aeb73904e06ae5a

View File

@ -1 +1 @@
22d78d26fdb7091c7fb1aeb34020e5a174443ef1 d66447f952feb4ec5829e5829e3d25dd8af939e4

View File

@ -1 +1 @@
b5dcf3ba8e3d663ac68168bcbaceb0c37ba70470 bc2df173bcd5877ac4b9a0147065291f7090ede0

View File

@ -1 +1 @@
65174aa10ad5127ea9241e44a005688ac56f69a1 5ce5b47ab7ee19494ca4bb2e4d7fe0285165199a

View File

@ -1 +1 @@
526a8bd343958be03f0d9536878f174c176632e6 73f330f118271340beadba9943f025f51326505b

View File

@ -1 +1 @@
eec0952259611a7cdb73f8953f0aa80e1bb28ca1 90445e4b34c276c86330ebdab580339e96320d17

View File

@ -1,5 +1,6 @@
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq;
using System.Text; using System.Text;
using System.Xml.Linq; using System.Xml.Linq;
@ -12,6 +13,12 @@ namespace Xamarin.ApiDiff
public bool Breaking; public bool Breaking;
public bool AnyChange; public bool AnyChange;
public bool HasIgnoredChanges; public bool HasIgnoredChanges;
public string SourceDescription;
public ApiChange (string sourceDescription)
{
SourceDescription = sourceDescription;
}
public ApiChange Append (string text) public ApiChange Append (string text)
{ {
@ -69,6 +76,11 @@ namespace Xamarin.ApiDiff
return; return;
} }
var changeDescription = $"{State.Namespace}.{State.Type}: {change.Header}: {change.SourceDescription}";
State.LogDebugMessage ($"Possible -r value: {changeDescription}");
if (State.IgnoreRemoved.Any (re => re.IsMatch (changeDescription)))
return;
List<ApiChange> list; List<ApiChange> list;
if (!TryGetValue (change.Header, out list)) { if (!TryGetValue (change.Header, out list)) {
list = new List<ApiChange> (); list = new List<ApiChange> ();

View File

@ -82,6 +82,15 @@ namespace Xamarin.ApiDiff {
public static bool Lax; public static bool Lax;
public static bool Colorize = true; public static bool Colorize = true;
public static int Verbosity;
public static void LogDebugMessage (string value)
{
if (Verbosity == 0)
return;
Console.WriteLine (value);
}
} }
class Program { class Program {
@ -122,7 +131,10 @@ namespace Xamarin.ApiDiff {
}, },
{ "c|colorize:", "Colorize HTML output", v => State.Colorize = string.IsNullOrEmpty (v) ? true : bool.Parse (v) }, { "c|colorize:", "Colorize HTML output", v => State.Colorize = string.IsNullOrEmpty (v) ? true : bool.Parse (v) },
{ "x|lax", "Ignore duplicate XML entries", v => State.Lax = true }, { "x|lax", "Ignore duplicate XML entries", v => State.Lax = true },
{ "ignore-nonbreaking", "Ignore all nonbreaking changes", v => State.IgnoreNonbreaking = true } { "ignore-nonbreaking", "Ignore all nonbreaking changes", v => State.IgnoreNonbreaking = true },
{ "v|verbose:", "Verbosity level; when set, will print debug messages",
(int? v) => State.Verbosity = v ?? (State.Verbosity + 1)},
new ResponseFileSource (),
}; };
try { try {

View File

@ -70,7 +70,9 @@ namespace Xamarin.ApiDiff {
public override void Added (XElement target, bool wasParentAdded) public override void Added (XElement target, bool wasParentAdded)
{ {
string name = target.Attribute ("name").Value; string name = target.Attribute ("name").Value;
if (State.IgnoreNew.Any (re => re.IsMatch (name))) var addedDescription = $"{State.Namespace}.{name}: Added type";
State.LogDebugMessage ($"Possible -n value: {addedDescription}");
if (State.IgnoreNew.Any (re => re.IsMatch (addedDescription)))
return; return;
Output.WriteLine ("<div> <!-- start type {0} -->", name); Output.WriteLine ("<div> <!-- start type {0} -->", name);
Output.WriteLine ("<h3>New Type {0}.{1}</h3>", State.Namespace, name); Output.WriteLine ("<h3>New Type {0}.{1}</h3>", State.Namespace, name);
@ -220,9 +222,13 @@ namespace Xamarin.ApiDiff {
var sb = source.GetAttribute ("base"); var sb = source.GetAttribute ("base");
var tb = target.GetAttribute ("base"); var tb = target.GetAttribute ("base");
if (sb != tb && !(State.IgnoreNonbreaking && IsBaseChangeCompatible (sb, tb))) { var rm = $"{State.Namespace}.{State.Type}: Modified base type: '{sb}' to '{tb}'";
State.LogDebugMessage ($"Possible -r value: {rm}");
if (sb != tb &&
!State.IgnoreRemoved.Any (re => re.IsMatch (rm)) &&
!(State.IgnoreNonbreaking && IsBaseChangeCompatible (sb, tb))) {
Output.Write ("Modified base type: "); Output.Write ("Modified base type: ");
Output.WriteLine (new ApiChange ().AppendModified (sb, tb, true).Member.ToString ()); Output.WriteLine (new ApiChange ($"{State.Namespace}.{State.Type}").AppendModified (sb, tb, true).Member.ToString ());
} }
ccomparer.Compare (source, target); ccomparer.Compare (source, target);
@ -254,6 +260,8 @@ namespace Xamarin.ApiDiff {
{ {
string name = State.Namespace + "." + GetTypeName (source); string name = State.Namespace + "." + GetTypeName (source);
var memberDescription = $"{name}: Removed type";
State.LogDebugMessage ($"Possible -r value: {memberDescription}");
if (State.IgnoreRemoved.Any (re => re.IsMatch (name))) if (State.IgnoreRemoved.Any (re => re.IsMatch (name)))
return; return;

View File

@ -68,7 +68,7 @@ namespace Xamarin.ApiDiff {
if (base.Equals (source, target, changes)) if (base.Equals (source, target, changes))
return true; return true;
var change = new ApiChange (); var change = new ApiChange (GetDescription (source));
change.Header = "Modified " + GroupName; change.Header = "Modified " + GroupName;
RenderMethodAttributes (source, target, change); RenderMethodAttributes (source, target, change);
RenderReturnType (source, target, change); RenderReturnType (source, target, change);

View File

@ -45,7 +45,7 @@ namespace Xamarin.ApiDiff {
if (base.Equals (source, target, changes)) if (base.Equals (source, target, changes))
return true; return true;
var change = new ApiChange (); var change = new ApiChange (GetDescription (source));
change.Header = "Modified " + GroupName; change.Header = "Modified " + GroupName;
change.Append ("public event "); change.Append ("public event ");

View File

@ -97,7 +97,7 @@ namespace Xamarin.ApiDiff {
var name = source.GetAttribute ("name"); var name = source.GetAttribute ("name");
var srcValue = source.GetAttribute ("value"); var srcValue = source.GetAttribute ("value");
var tgtValue = target.GetAttribute ("value"); var tgtValue = target.GetAttribute ("value");
var change = new ApiChange (); var change = new ApiChange (GetDescription (source));
change.Header = "Modified " + GroupName; change.Header = "Modified " + GroupName;
if (State.BaseType == "System.Enum") { if (State.BaseType == "System.Enum") {

View File

@ -122,8 +122,10 @@ namespace Xamarin.ApiDiff {
{ {
bool a = false; bool a = false;
foreach (var item in elements) { foreach (var item in elements) {
var memberDescription = $"{State.Namespace}.{State.Type}: Added {GroupName}: {GetDescription (item)}";
State.LogDebugMessage ($"Possible -a value: {memberDescription}");
SetContext (item); SetContext (item);
if (State.IgnoreAdded.Any (re => re.IsMatch (GetDescription (item)))) if (State.IgnoreAdded.Any (re => re.IsMatch (memberDescription)))
continue; continue;
if (!a) { if (!a) {
BeforeAdding (elements); BeforeAdding (elements);
@ -159,7 +161,9 @@ namespace Xamarin.ApiDiff {
{ {
bool r = false; bool r = false;
foreach (var item in elements) { foreach (var item in elements) {
if (State.IgnoreRemoved.Any (re => re.IsMatch (GetDescription (item)))) var memberDescription = $"{State.Namespace}.{State.Type}: Removed {GroupName}: {GetDescription (item)}";
State.LogDebugMessage ($"Possible -r value: {memberDescription}");
if (State.IgnoreRemoved.Any (re => re.IsMatch (memberDescription)))
continue; continue;
SetContext (item); SetContext (item);
if (State.IgnoreNonbreaking && !IsBreakingRemoval (item)) if (State.IgnoreNonbreaking && !IsBreakingRemoval (item))
@ -597,7 +601,7 @@ namespace Xamarin.ApiDiff {
if (srcObsolete == null) { if (srcObsolete == null) {
if (tgtObsolete == null) if (tgtObsolete == null)
return; // neither is obsolete return; // neither is obsolete
var change = new ApiChange (); var change = new ApiChange (GetDescription (source));
change.Header = "Obsoleted " + GroupName; change.Header = "Obsoleted " + GroupName;
change.Append (string.Format ("<span class='obsolete obsolete-{0}' data-is-non-breaking>", ElementName)); change.Append (string.Format ("<span class='obsolete obsolete-{0}' data-is-non-breaking>", ElementName));
change.Append ("[Obsolete ("); change.Append ("[Obsolete (");

View File

@ -58,7 +58,9 @@ namespace Xamarin.ApiDiff {
public override void Added (XElement target, bool wasParentAdded) public override void Added (XElement target, bool wasParentAdded)
{ {
string name = target.Attribute ("name").Value; string name = target.Attribute ("name").Value;
if (State.IgnoreNew.Any (re => re.IsMatch (name))) var namespaceDescription = $"{name}: Added namespace";
State.LogDebugMessage ($"Possible -n value: {namespaceDescription}");
if (State.IgnoreNew.Any (re => re.IsMatch (namespaceDescription)))
return; return;
Output.WriteLine ("<!-- start namespace {0} --> <div> ", name); Output.WriteLine ("<!-- start namespace {0} --> <div> ", name);
@ -92,7 +94,9 @@ namespace Xamarin.ApiDiff {
{ {
var name = source.Attribute ("name").Value; var name = source.Attribute ("name").Value;
if (State.IgnoreRemoved.Any (re => re.IsMatch (name))) var namespaceDescription = $"{name}: Removed namespace";
State.LogDebugMessage ($"Possible -r value: {namespaceDescription}");
if (State.IgnoreRemoved.Any (re => re.IsMatch (namespaceDescription)))
return; return;
Output.WriteLine ("<!-- start namespace {0} --> <div>", name); Output.WriteLine ("<!-- start namespace {0} --> <div>", name);

View File

@ -185,7 +185,7 @@ namespace Xamarin.ApiDiff {
isIndexer = srcIndexers != null && srcIndexers.Count > 0; isIndexer = srcIndexers != null && srcIndexers.Count > 0;
} }
var change = new ApiChange (); var change = new ApiChange (GetDescription (source));
change.Header = "Modified " + GroupName; change.Header = "Modified " + GroupName;
RenderMethodAttributes (GetMethodAttributes (srcGetter, srcSetter), GetMethodAttributes (tgtGetter, tgtSetter), change); RenderMethodAttributes (GetMethodAttributes (srcGetter, srcSetter), GetMethodAttributes (tgtGetter, tgtSetter), change);
RenderPropertyType (source, target, change); RenderPropertyType (source, target, change);

View File

@ -1 +1 @@
#define FULL_VERSION "explicit/721462c" #define FULL_VERSION "explicit/4adf822"

Binary file not shown.

View File

@ -1 +1 @@
96de3711fb0e7e0745090fb28ce7e413865d3d6c 7770d52688c3155ae03c4f0ec0ddc7e4260c3f1a

Binary file not shown.

View File

@ -1 +1 @@
a49521c9bc5d47345bfd86b06db557dc7b470364 a4c3dcf6e6b105951fb200e08d3fd2a43daa7c7f

Binary file not shown.

View File

@ -1 +1 @@
3e259f60b248dbce346c05b52b2e3b71840f8692 692d6f200d94510c881b88aaeec2314f2bb56246

View File

@ -6,9 +6,9 @@
#, fuzzy #, fuzzy
msgid "" msgid ""
msgstr "" msgstr ""
"Project-Id-Version: mono 5.10.0.130\n" "Project-Id-Version: mono 5.10.0.132\n"
"Report-Msgid-Bugs-To: http://www.mono-project.com/Bugs\n" "Report-Msgid-Bugs-To: http://www.mono-project.com/Bugs\n"
"POT-Creation-Date: 2018-02-21 08:19+0000\n" "POT-Creation-Date: 2018-02-22 08:43+0000\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n" "Language-Team: LANGUAGE <LL@li.org>\n"

Binary file not shown.

View File

@ -1 +1 @@
c68519e77c2dcd54e02740009a95651d45f526db 117455723803c35ee7acd85c13d14c19df38f54c