Imported Upstream version 3.6.0

Former-commit-id: da6be194a6b1221998fc28233f2503bd61dd9d14
This commit is contained in:
Jo Shields
2014-08-13 10:39:27 +01:00
commit a575963da9
50588 changed files with 8155799 additions and 0 deletions

View File

@@ -0,0 +1,171 @@
2009-11-05 Marek Safar <marek.safar@gmail.com>
* compiler-tester.cs: Add predefined negative file masks.
2009-09-20 Sebastien Pouliot <sebastien@ximian.com>
* compiler-tester.cs: Define out some parts for NET_2_1 since
they are not part of Silverlight 2 public API
2009-07-29 Marek Safar <marek.safar@gmail.com>
* compiler-tester.cs: Add predefined file masks.
2009-06-02 Marek Safar <marek.safar@gmail.com>
* compiler-tester.cs: Add "safe-execution" options.
2009-02-19 Marek Safar <marek.safar@gmail.com>
* compiler-tester.cs: More verbosity needed for runtime crashes.
2008-11-05 Marek Safar <marek.safar@gmail.com>
* compiler-tester.cs: Better -warnaserror detection.
2008-10-01 Marek Safar <marek.safar@gmail.com>
* compiler-tester.cs: Fixed broken value type test.
2008-09-10 Marek Safar <marek.safar@gmail.com>
* compiler-tester.cs: Add non-varags LogLine overload.
2008-07-28 Marek Safar <marek.safar@gmail.com>
* compiler-tester.cs: Removed ExecuteFile.
2008-07-24 Marek Safar <marek.safar@gmail.com>
* compiler-tester.cs: Always exercise symbol writer.
2008-07-29 Martin Baulig <martin@ximian.com>
* compiler-tester.cs: Added `-compiler-options' command line
argument to specify global compiler options in addition to the
ones which are read from the test cases.
2008-04-22 Marek Safar <marek.safar@gmail.com>
* compiler-tester.cs: Print test name when IL reduction is detected.
2008-04-07 Marek Safar <marek.safar@gmail.com>
* compiler-tester.cs: Don't report IL reduction as regression.
2008-03-14 Marek Safar <marek.safar@gmail.com>
* compiler-tester.cs: Handle new tests correctly.
2008-03-14 Marek Safar <marek.safar@gmail.com>
* compiler-tester.cs: Replaced XmlTextWriter and XmlTextReader with
XmlWriter and XmlReader.
2008-03-14 Marek Safar <marek.safar@gmail.com>
* compiler-tester.cs: Added IL regression support.
2008-03-13 Marek Safar <marek.safar@gmail.com>
* compiler-tester.cs: Refactored to support verbose mode.
2008-02-18 Raja R Harinath <harinath@hurrynot.org>
* Makefile ($(dir $(PROGRAM))/.stamp): New.
2008-02-17 Raja R Harinath <harinath@hurrynot.org>
* Makefile [PROFILE=net_2_1]: Copy file from net_2_1_raw profile.
* compiler-tester.cs: Work better with 'net_2_1' profiles.
2007-11-28 Raja R Harinath <harinath@gmail.com>
* compiler-tester.cs: Work better with the 'net_2_1' profile.
* xmldocdiff.cs: Disable in the 'net_2_1' profile.
2007-11-06 Marek Safar <marek.safar@gmail.com>
* compiler-tester.cs: Made the test output less verbose.
2007-09-21 Marek Safar <marek.safar@gmail.com>
* compiler-tester.cs: Mono assembly loading issue has been fixed, switch
to app-domain execution only.
2007-08-01 Marek Safar <marek.safar@gmail.com>
* compiler-tester.cs: Report invalid tests separately.
2006-11-20 Martin Baulig <martin@ximian.com>
* compiler-tester.cs
(PositiveChecker.HandleFailure): Use `LogLine ("{0}", extra)'
since the error message from the compiler might contain {}.
2006-10-06 Marek Safar <marek.safar@seznam.cz>
* compiler-tester.cs: Positive test file can be now DLL.
2006-09-27 Marek Safar <marek.safar@seznam.cz>
* compiler-tester.cs: Add a new "//GMCS:" comment for messages
different on 2.0 runtime.
Add detection of the exactly same error/warning.
2006-04-07 Marek Safar <marek.safar@seznam.cz>
* compiler-tester.cs: Prints known issues stats.
2006-01-18 Martin Baulig <martin@ximian.com>
* compiler-tester.cs: Added a new "// Dependencies: " magical
comment to provide real dependency tracking.
2005-11-11 Marek Safar <marek.safar@seznam.cz>
* compiler-tester.cs: Implemented compiler warning map checking.
Enabled message ckeck for gmcs.
2005-09-27 Marek Safar <marek.safar@seznam.cz>
* compiler-tester.cs (GetCompilerError): Small fix when no error
location and text contains ':'.
2005-09-22 Raja R Harinath <rharinath@novell.com>
* compiler-tester.cs (TestRunner.ExecFile): New helper carved out
of ...
(TestRunner.ExecuteFile) [process version]: ... this.
(TestRunner.ExecuteFile) [MethodInfo version]: Add new parameter.
Fall back to executing the process if the method invocation fails.
(TestRunner.Check): Update to changes.
2005-09-19 Marek Safar <marek.safar@seznam.cz>
* compiler-tester: Reverted Martin's revert and ignore gmcs error
tests for new checks as most of them are not "valid".
2005-08-31 Martin Baulig <martin@ximian.com>
* compiler-tester: Reverted Marek's latest changes - they were
breaking 231 gmcs tests.
2005-06-09 Marek Safar <marek.safar@seznam.cz>
* compiler-tester: Add process test runner to cope with
too many files in AppDomain(s).
2005-06-06 Raja R Harinath <harinath@gmail.com>
* Makefile (NO_INSTALL): Set.
2005-06-06 Raja R Harinath <rharinath@novell.com>
* Makefile: Convert to use executable.make.
* compiler-tester.exe.sources: New.
2005-06-06 Marek Safar <marek.safar@seznam.cz>
* Initial commit

View File

@@ -0,0 +1,25 @@
thisdir = tools/compiler-tester
SUBDIRS =
include ../../build/rules.make
PROGRAM = compiler-tester.exe
NO_INSTALL = yes
ifeq (moonlight, $(PROFILE))
all-local: $(PROGRAM)
clean-local:
rm -f $(PROGRAM)
$(PROGRAM): $(dir $(PROGRAM))/.stamp
$(PROGRAM): $(topdir)/class/lib/moonlight_raw/compiler-tester.exe
cp $< $@
dist-local: dist-default
install-local uninstall-local test-local run-test-local run-test-ondotnet-local: ; @:
else
include $(topdir)/build/executable.make
endif

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,4 @@
compiler-tester.cs
xmldocdiff.cs
../../class/Mono.CompilerServices.SymbolWriter/MonoSymbolFile.cs
../../class/Mono.CompilerServices.SymbolWriter/MonoSymbolTable.cs

View File

@@ -0,0 +1,140 @@
//
// xmldocdiff.cs
//
// Author:
// Marek Safar (marek.safar@gmail.com)
//
// Copyright (C) 2012 Xamarin Inc (http://www.xamarin.com)
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to
// permit persons to whom the Software is furnished to do so, subject to
// the following conditions:
//
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
#if !NET_2_1
using System;
using System.Collections;
using System.Collections.Generic;
using System.Xml;
using System.Linq;
public class XmlComparer
{
public class ComparisonException : Exception
{
public ComparisonException (string message)
: base (message)
{
}
}
static readonly bool debug = false;
readonly string start;
public XmlComparer (string startNode)
{
this.start = "/" + startNode;
}
public void Compare (string reference, string output)
{
XmlDocument doc1 = new XmlDocument ();
doc1.Load (reference);
XmlDocument doc2 = new XmlDocument ();
doc2.Load (output);
var memberList1 = doc1.SelectSingleNode (start);
var memberList2 = doc2.SelectSingleNode (start);
CompareNodes (memberList1, memberList2);
}
static bool CompareNodes (XmlNode reference, XmlNode output)
{
List<Tuple<string, XmlNode>> ref_nodes = new List<Tuple<string, XmlNode>> ();
foreach (XmlNode node in reference.ChildNodes) {
if (node.NodeType == XmlNodeType.Comment)
continue;
ref_nodes.Add (Tuple.Create (node.Name, node));
}
foreach (XmlNode node in output.ChildNodes) {
if (node.NodeType == XmlNodeType.Comment)
continue;
Tuple<string, XmlNode> found = null;
foreach (var entry in ref_nodes.Where (l => l.Item1 == node.Name)) {
if (node.Attributes == null) {
if (node.Attributes != entry.Item2.Attributes)
continue;
} else {
List<XmlAttribute> attrs = node.Attributes.Cast<XmlAttribute> ().ToList ();
XmlAttribute missing = null;
foreach (XmlAttribute attr in entry.Item2.Attributes) {
var match = attrs.Find (l => l.Name == attr.Name);
if (match == null) {
missing = attr;
break;
}
if (match.Value == attr.Value)
attrs.Remove (match);
}
if (missing != null || attrs.Count > 0) {
continue;
}
}
if (node.HasChildNodes != entry.Item2.HasChildNodes)
continue;
if (!node.HasChildNodes || CompareNodes (node, entry.Item2)) {
found = entry;
break;
}
}
if (found == null) {
Report ("Expected node: " + node.OuterXml);
return false;
}
ref_nodes.Remove (found);
}
if (ref_nodes.Count > 0) {
Report ("Unexpected node: " + ref_nodes[0].Item2.OuterXml);
return false;
}
return true;
}
static void Report (string format, params object[] args)
{
if (debug)
Console.WriteLine (format, args);
else
throw new ComparisonException (String.Format (format, args));
}
}
#endif