Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/monodevelop.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLluis Sanchez <lluis@novell.com>2006-05-31 18:29:40 +0400
committerLluis Sanchez <lluis@novell.com>2006-05-31 18:29:40 +0400
commit4247e00dc93db3c31da89b3eeacc04750547e22e (patch)
tree711b4ca79a3f781fea95acb48b8e0261c7b27016 /Extras/MonoDeveloperExtensions
parent4b9506ec2704022551b0306dcd518f3c0306ea2e (diff)
2006-05-31 Lluis Sanchez Gual <lluis@novell.com>
* MonoProject.cs: Removed dependency to NUnit add-in. * Makefile.am: Removed dependency to NUnit add-in. Added the new nunit module to the build. * MonoDeveloperExtensions.addin.xml: Added optional module which extends the nunit add-in. * NUnit/MonoTestProvider.cs: * NUnit/Makefile.am: * NUnit/NUnit.mdp: Created a new assembly which implements the nunit extension for Mono projects. svn path=/trunk/monodevelop/; revision=61331
Diffstat (limited to 'Extras/MonoDeveloperExtensions')
-rw-r--r--Extras/MonoDeveloperExtensions/ChangeLog14
-rw-r--r--Extras/MonoDeveloperExtensions/Makefile.am6
-rw-r--r--Extras/MonoDeveloperExtensions/MonoDeveloperExtensions.addin.xml14
-rw-r--r--Extras/MonoDeveloperExtensions/MonoDeveloperExtensions.mdp2
-rw-r--r--Extras/MonoDeveloperExtensions/MonoProject.cs15
-rw-r--r--Extras/MonoDeveloperExtensions/NUnit/Makefile.am33
-rw-r--r--Extras/MonoDeveloperExtensions/NUnit/MonoTestProvider.cs78
-rw-r--r--Extras/MonoDeveloperExtensions/NUnit/NUnit.mdp25
8 files changed, 176 insertions, 11 deletions
diff --git a/Extras/MonoDeveloperExtensions/ChangeLog b/Extras/MonoDeveloperExtensions/ChangeLog
index d6320bb37c..074b06781a 100644
--- a/Extras/MonoDeveloperExtensions/ChangeLog
+++ b/Extras/MonoDeveloperExtensions/ChangeLog
@@ -1,3 +1,17 @@
+2006-05-31 Lluis Sanchez Gual <lluis@novell.com>
+
+ * MonoProject.cs: Removed dependency to NUnit add-in.
+ * Makefile.am: Removed dependency to NUnit add-in. Added the
+ new nunit module to the build.
+
+ * MonoDeveloperExtensions.addin.xml: Added optional module which
+ extends the nunit add-in.
+
+ * NUnit/MonoTestProvider.cs:
+ * NUnit/Makefile.am:
+ * NUnit/NUnit.mdp: Created a new assembly which implements the nunit
+ extension for Mono projects.
+
2006-05-04 Lluis Sanchez Gual <lluis@novell.com>
* MonoDeveloperExtensions.addin.xml: Updated versions.
diff --git a/Extras/MonoDeveloperExtensions/Makefile.am b/Extras/MonoDeveloperExtensions/Makefile.am
index 5756bec4cc..599f66f107 100644
--- a/Extras/MonoDeveloperExtensions/Makefile.am
+++ b/Extras/MonoDeveloperExtensions/Makefile.am
@@ -1,3 +1,5 @@
+SUBDIRS = . NUnit
+
FILES = \
AssemblyInfo.cs \
MonoCombine.cs \
@@ -5,8 +7,7 @@ MonoMakefile.cs \
MonoMakefileFormat.cs \
MonoProject.cs \
Commands.cs \
-MonoProjectConfiguration.cs \
-MonoTestProvider.cs
+MonoProjectConfiguration.cs
REFS = -r:System \
-r:System.Data \
@@ -16,7 +17,6 @@ REFS = -r:System \
-r:$(top_builddir)/build/AddIns/MonoDevelop.Projects.Gui.dll \
-r:$(top_builddir)/build/AddIns/MonoDevelop.Components.dll \
-r:$(top_builddir)/build/AddIns/MonoDevelop.Ide.dll \
- -r:$(top_builddir)/build/AddIns/NUnit/MonoDevelop.NUnit.dll \
$(GTK_SHARP_LIBS) \
$(GLADE_SHARP_LIBS) \
$(GCONF_SHARP_LIBS) \
diff --git a/Extras/MonoDeveloperExtensions/MonoDeveloperExtensions.addin.xml b/Extras/MonoDeveloperExtensions/MonoDeveloperExtensions.addin.xml
index 8ca1e93b67..d1bc0e7f43 100644
--- a/Extras/MonoDeveloperExtensions/MonoDeveloperExtensions.addin.xml
+++ b/Extras/MonoDeveloperExtensions/MonoDeveloperExtensions.addin.xml
@@ -16,7 +16,6 @@
<AddIn id="MonoDevelop.Projects" version="0.11.0"/>
<AddIn id="MonoDevelop.Projects.Gui" version="0.10.0"/>
<AddIn id="MonoDevelop.Ide" version="0.10.0"/>
- <AddIn id="MonoDevelop.NUnit" version="0.10.0"/>
</Dependencies>
<Extension path = "/SharpDevelop/Workbench/ProjectFileFormats">
@@ -131,6 +130,17 @@
<Extension path = "/SharpDevelop/Workbench/Pads/MonoDevelop.Ide.Gui.Pads.ProjectPad">
<NodeBuilder id = "MonoProjectBuilder" class = "MonoDeveloper.MonoProjectBuilder"/>
</Extension>
-
+
+ <Module>
+ <Runtime>
+ <Import assembly="MonoDeveloperExtensions_nunit.dll"/>
+ </Runtime>
+ <Dependencies>
+ <AddIn id="MonoDevelop.NUnit" version="0.10.0"/>
+ </Dependencies>
+ <Extension path = "/Services/NUnit/TestProviders">
+ <Class id = "MonoTestProvider" class = "MonoDeveloper.MonoTestProvider"/>
+ </Extension>
+ </Module>
</AddIn>
diff --git a/Extras/MonoDeveloperExtensions/MonoDeveloperExtensions.mdp b/Extras/MonoDeveloperExtensions/MonoDeveloperExtensions.mdp
index ca16792ee9..e569f0ef61 100644
--- a/Extras/MonoDeveloperExtensions/MonoDeveloperExtensions.mdp
+++ b/Extras/MonoDeveloperExtensions/MonoDeveloperExtensions.mdp
@@ -24,7 +24,7 @@
<File name="./MonoProject.cs" subtype="Code" buildaction="Compile" />
<File name="./Commands.cs" subtype="Code" buildaction="Compile" />
<File name="./MonoProjectConfiguration.cs" subtype="Code" buildaction="Compile" />
- <File name="./MonoTestProvider.cs" subtype="Code" buildaction="Compile" />
+ <File name="./NUnit" subtype="Directory" buildaction="Compile" />
</Contents>
<References>
<ProjectReference type="Gac" localcopy="True" refto="System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
diff --git a/Extras/MonoDeveloperExtensions/MonoProject.cs b/Extras/MonoDeveloperExtensions/MonoProject.cs
index 991f438731..80849a9782 100644
--- a/Extras/MonoDeveloperExtensions/MonoProject.cs
+++ b/Extras/MonoDeveloperExtensions/MonoProject.cs
@@ -44,7 +44,8 @@ namespace MonoDeveloper
string outFile;
ArrayList refNames = new ArrayList ();
bool loading;
- MonoTestSuite testSuite;
+ string testFileBase;
+ object unitTest;
public override string ProjectType {
get { return "MonoMakefile"; }
@@ -122,8 +123,7 @@ namespace MonoDeveloper
if (mkfile.GetVariable ("NO_TEST") != "yes") {
string tname = Path.GetFileNameWithoutExtension (aname) + "_test_";
- string testFileBase = Path.Combine (basePath, tname);
- testSuite = new MonoTestSuite (this, Name, testFileBase);
+ testFileBase = Path.Combine (basePath, tname);
}
MonoProjectConfiguration conf = new MonoProjectConfiguration ("default", "default");
@@ -328,9 +328,14 @@ namespace MonoDeveloper
IdeApp.ProjectOperations.CombineOpened -= new CombineEventHandler (CombineOpened);
}
- internal MonoTestSuite GetTestSuite ()
+ public string GetTestFileBase ()
{
- return testSuite;
+ return testFileBase;
+ }
+
+ public object UnitTest {
+ get { return unitTest; }
+ set { unitTest = value; }
}
}
}
diff --git a/Extras/MonoDeveloperExtensions/NUnit/Makefile.am b/Extras/MonoDeveloperExtensions/NUnit/Makefile.am
new file mode 100644
index 0000000000..ace47d0485
--- /dev/null
+++ b/Extras/MonoDeveloperExtensions/NUnit/Makefile.am
@@ -0,0 +1,33 @@
+FILES = \
+MonoTestProvider.cs
+
+REFS = -r:System \
+ -r:$(top_builddir)/build/bin/MonoDevelop.Core.dll \
+ -r:$(top_builddir)/build/AddIns/MonoDevelop.Projects.dll \
+ -r:$(top_builddir)/build/AddIns/NUnit/MonoDevelop.NUnit.dll \
+ -r:$(top_builddir)/build/AddIns/MonoDeveloperExtensions/MonoDeveloperExtensions.dll
+
+ADDIN_BUILD = $(top_builddir)/build/AddIns/MonoDeveloperExtensions
+
+ASSEMBLY = $(ADDIN_BUILD)/MonoDeveloperExtensions_nunit.dll
+
+if ENABLE_MONOEXTENSIONS
+all: $(ASSEMBLY)
+else
+all:
+endif
+
+$(ASSEMBLY): $(build_sources)
+ mkdir -p $(ADDIN_BUILD)
+ $(CSC) $(CSC_FLAGS) -target:library -out:$@ $(build_sources) $(REFS)
+
+CLEANFILES = $(ASSEMBLY) $(ASSEMBLY).mdb
+
+EXTRA_DIST = $(FILES)
+
+include $(top_srcdir)/Makefile.include
+
+if ENABLE_MONOEXTENSIONS
+MonoDeveloperExtensionsdir = $(MD_ADDIN_DIR)/MonoDeveloperExtensions
+MonoDeveloperExtensions_DATA = $(ASSEMBLY)
+endif
diff --git a/Extras/MonoDeveloperExtensions/NUnit/MonoTestProvider.cs b/Extras/MonoDeveloperExtensions/NUnit/MonoTestProvider.cs
new file mode 100644
index 0000000000..f513cbbfe7
--- /dev/null
+++ b/Extras/MonoDeveloperExtensions/NUnit/MonoTestProvider.cs
@@ -0,0 +1,78 @@
+//
+// MonoTestProvider.cs
+//
+// Author:
+// Lluis Sanchez Gual
+//
+// Copyright (C) 2005 Novell, Inc (http://www.novell.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.
+//
+
+using System;
+using System.IO;
+using MonoDevelop.Projects;
+using MonoDevelop.NUnit;
+
+namespace MonoDeveloper
+{
+ class MonoTestProvider: ITestProvider
+ {
+ public UnitTest CreateUnitTest (CombineEntry entry)
+ {
+ if (entry is MonoProject) {
+ MonoProject project = (MonoProject) entry;
+ if (project.UnitTest != null)
+ return (UnitTest) project.UnitTest;
+
+ string testFileBase = project.GetTestFileBase ();
+ UnitTest testSuite = new MonoTestSuite (project, project.Name, testFileBase);
+ project.UnitTest = testSuite;
+ return testSuite;
+ } else
+ return null;
+ }
+
+ public Type[] GetOptionTypes ()
+ {
+ return null;
+ }
+ }
+
+ class MonoTestSuite: NUnitAssemblyTestSuite
+ {
+ string basePath;
+
+ public MonoTestSuite (Project p, string name, string basePath): base (name, p)
+ {
+ this.basePath = basePath;
+ }
+
+ protected override string AssemblyPath {
+ get {
+ return basePath + "default.dll";
+ }
+ }
+
+ protected override string TestInfoCachePath {
+ get { return Path.Combine (Path.GetDirectoryName (AssemblyPath), "test-cache"); }
+ }
+ }
+}
diff --git a/Extras/MonoDeveloperExtensions/NUnit/NUnit.mdp b/Extras/MonoDeveloperExtensions/NUnit/NUnit.mdp
new file mode 100644
index 0000000000..bcbd758e56
--- /dev/null
+++ b/Extras/MonoDeveloperExtensions/NUnit/NUnit.mdp
@@ -0,0 +1,25 @@
+<Project name="MonoDeveloperExtensions_nunit" fileversion="2.0" language="C#" clr-version="Net_1_1" ctype="DotNetProject">
+ <Configurations active="Debug">
+ <Configuration name="Debug" ctype="DotNetProjectConfiguration">
+ <Output directory="./bin/Debug" assembly="NUnit" />
+ <Build debugmode="True" target="Library" />
+ <Execution runwithwarnings="True" consolepause="False" runtime="MsNet" clr-version="Net_1_1" />
+ <CodeGeneration compiler="Csc" warninglevel="4" optimize="True" unsafecodeallowed="False" generateoverflowchecks="True" generatexmldocumentation="False" ctype="CSharpCompilerParameters" />
+ </Configuration>
+ <Configuration name="Release" ctype="DotNetProjectConfiguration">
+ <Output directory="./bin/Release" assembly="NUnit" />
+ <Build debugmode="False" target="Library" />
+ <Execution runwithwarnings="True" consolepause="False" runtime="MsNet" clr-version="Net_1_1" />
+ <CodeGeneration compiler="Csc" warninglevel="4" optimize="True" unsafecodeallowed="False" generateoverflowchecks="True" generatexmldocumentation="False" ctype="CSharpCompilerParameters" />
+ </Configuration>
+ </Configurations>
+ <DeploymentInformation strategy="File">
+ <excludeFiles />
+ </DeploymentInformation>
+ <Contents>
+ <File name="./MonoTestProvider.cs" subtype="Code" buildaction="Compile" />
+ </Contents>
+ <References>
+ <ProjectReference type="Gac" localcopy="True" refto="System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
+ </References>
+</Project> \ No newline at end of file