Skip to content
Browse files

removed old tools to support Mono

  • Loading branch information...
1 parent 90ce7aa commit d6a87eca3b734829a34a76c813909d957bd0b661 @jkowalski committed Apr 17, 2011
View
1 .gitignore
@@ -4,6 +4,7 @@ Bin/
msbuild.log
LastTestRunSummary.cmd
src/Docs/Working/
+test-results/
*.chw
*.pidb
*.userprefs
View
63 Makefile
@@ -31,55 +31,26 @@
# THE POSSIBILITY OF SUCH DAMAGE.
#
-OUTPUT_DIR=build/bin/mono2
-NUNIT_TEMP_TESTS=$(OUTPUT_DIR)/NLog.UnitTests.NUnit
-REFERENCE_ASSEMBLIES=-r:System.Web.Services.dll -r:System.Drawing.dll -r:System.Web.dll -r:System.Data.dll -r:System.Windows.Forms.dll -r:System.Messaging.dll -r:System.Configuration.dll -r:Mono.Posix.dll -r:System.Runtime.Serialization.dll -r:System.ServiceModel.dll
-DEFINES=-define:MONO_2_0 -define:MONO -define:WCF_SUPPORTED
-MCS=gmcs
-PERL=perl
-MCS_OPTIONS= -debug+
-NUNIT_CONSOLE=nunit-console2
-NUNIT_OPTIONS=-nodots -labels -nologo
+CONFIG=Debug
+TOOLS=build/bin/Tools
+OUTPUT_DIR=build/bin/$(CONFIG)/Mono\ 2.x
+MONO_LIB_DIR=$(shell pkg-config --variable=libdir mono)/mono/4.0
+XBUILD=xbuild /nologo
-help:
- @echo Supported targets are:
- @echo""
- @echo " help - displays this help"
- @echo " build - builds NLog.dll to $(OUTPUT_DIR)"
- @echo " buildtests - builds NLog.UnitTests.dll to $(OUTPUT_DIR)"
- @echo " clean - removes $(OUTPUT_DIR)"
- @echo " all - rebuilds everything and runs tests"
- @echo ""
- @echo "The following parameters can be overridden:"
- @echo""
- @echo " OUTPUT_DIR - output directory - default '$(OUTPUT_DIR)'"
- @echo " MCS - location of Mono gmcs compiler - default '$(MCS)'"
- @echo " PERL - location of perl interpreter - default '$(PERL)'"
- @echo " NUNIT_CONSOLE - location of nunit-console - default '$(NUNIT_CONSOLE)'"
- @echo " NUNIT_OPTIONS - options to nunit-console - default '$(NUNIT_OPTIONS)'"
- @echo ""
- @echo "See the 'Makefile' for more options."
+buildnlog:
+ $(XBUILD) src/NLog.Extended/NLog.Extended.monodevelop.csproj /p:Configuration=$(CONFIG)
-build: prepareoutputdir
- $(MCS) -t:library -out:$(OUTPUT_DIR)/NLog.dll $(DEFINES) $(MCS_OPTIONS) -recurse:src/NLog/*.cs $(REFERENCE_ASSEMBLIES) -keyfile:src/NLog.snk
- $(MCS) -t:library -out:$(OUTPUT_DIR)/NLog.Extended.dll $(DEFINES) $(MCS_OPTIONS) -recurse:src/NLog.Extended/*.cs -r:$(OUTPUT_DIR)/NLog.dll $(REFERENCE_ASSEMBLIES) -keyfile:src/NLog.snk
+buildtests:
+ $(XBUILD) tests/NLog.UnitTests/NLog.UnitTests.monodevelop.csproj /p:Configuration=$(CONFIG)
-buildtests: sampleextensions
- rm -rf $(NUNIT_TEMP_TESTS)
- $(PERL) tools/mstest2nunit.pl tests/NLog.UnitTests $(NUNIT_TEMP_TESTS)
- $(MCS) -t:library -out:$(OUTPUT_DIR)/NLog.UnitTests.dll $(DEFINES) $(MCS_OPTIONS) -recurse:$(NUNIT_TEMP_TESTS)/*.cs $(REFERENCE_ASSEMBLIES) -r:nunit.framework.dll -keyfile:tests/NLog.UnitTests/NLogTests.snk -r:$(OUTPUT_DIR)/NLog.dll -r:$(OUTPUT_DIR)/NLog.Extended.dll -r:$(OUTPUT_DIR)/SampleExtensions.dll -r:System.Xml.Linq.dll -r:System.Runtime.Serialization.dll -r:System.ServiceModel.dll
+makexsdtool:
+ $(XBUILD) tools/MakeNLogXSD/MakeNLogXSD.csproj /p:Configuration=$(CONFIG)
-sampleextensions: build
- $(MCS) -t:library -out:$(OUTPUT_DIR)/SampleExtensions.dll $(DEFINES) $(MCS_OPTIONS) -recurse:tests/SampleExtensions/*.cs -r:$(OUTPUT_DIR)/NLog.dll -keyfile:tests/NLog.UnitTests/NLogTests.snk -r:System.Xml.Linq.dll -r:System.Runtime.Serialization.dll
-
-runtests:
- (cd $(OUTPUT_DIR) && $(NUNIT_CONSOLE) $(NUNIT_OPTIONS) NLog.UnitTests.dll)
+dumpapitool:
+ $(XBUILD) tools/DumpApiXml/DumpApiXml.csproj /p:Configuration=$(CONFIG)
-clean:
- rm -rf $(OUTPUT_DIR)
-
-all: clean build buildtests runtests
-
-prepareoutputdir:
- mkdir -p $(OUTPUT_DIR)
+dumpapi: dumpapitool buildnlog
+ (cd $(OUTPUT_DIR) && mono ../../Tools/DumpApiXml.exe -comments NLog.xml -assembly NLog.dll -assembly NLog.Extended.dll -ref $(MONO_LIB_DIR) -output API/NLog.api)
+xsd: makexsdtool
+ (cd $(OUTPUT_DIR) && mono ../../Tools/MakeNLogXSD.exe -api API/NLog.api -out NLog.mono2.xsd -xmlns http://www.nlog-project.org/schemas/NLog.mono2.xsd)
View
15 src/NLog.monodevelop.sln
@@ -7,16 +7,13 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NLog.Extended.monodevelop",
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SampleExtensions.monodevelop", "..\tests\SampleExtensions\SampleExtensions.monodevelop.csproj", "{C480452F-7E14-443D-906D-7E021ABAA107A}"
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "UnitTestFrameworkStub.monodevelop", "..\tools\UnitTestFrameworkStub\UnitTestFrameworkStub.monodevelop.csproj", "{FE0A3713-E9A8-41F0-89FA-C1128214B6A8}"
-EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NLog.UnitTests.monodevelop", "..\tests\NLog.UnitTests\NLog.UnitTests.monodevelop.csproj", "{FE0A3713-E9A8-41F0-89FA-C1126F8FB6A8}"
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "RunUnitTests.monodevelop", "..\tools\RunUnitTests\RunUnitTests.monodevelop.csproj", "{FE0A3713-F151-41F0-89FA-C1128214B6A8}"
-EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
+ Default|Any CPU = Default|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{C480452F-7E14-443D-906D-7E021ABAA107A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
@@ -35,17 +32,9 @@ Global
{FE0A3713-E9A8-41F0-89FA-C1126F8FB6A8}.Debug|Any CPU.Build.0 = Debug|Any CPU
{FE0A3713-E9A8-41F0-89FA-C1126F8FB6A8}.Release|Any CPU.ActiveCfg = Release|Any CPU
{FE0A3713-E9A8-41F0-89FA-C1126F8FB6A8}.Release|Any CPU.Build.0 = Release|Any CPU
- {FE0A3713-E9A8-41F0-89FA-C1128214B6A8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {FE0A3713-E9A8-41F0-89FA-C1128214B6A8}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {FE0A3713-E9A8-41F0-89FA-C1128214B6A8}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {FE0A3713-E9A8-41F0-89FA-C1128214B6A8}.Release|Any CPU.Build.0 = Release|Any CPU
- {FE0A3713-F151-41F0-89FA-C1128214B6A8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {FE0A3713-F151-41F0-89FA-C1128214B6A8}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {FE0A3713-F151-41F0-89FA-C1128214B6A8}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {FE0A3713-F151-41F0-89FA-C1128214B6A8}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(MonoDevelopProperties) = preSolution
- StartupItem = ..\tools\RunUnitTests\RunUnitTests.monodevelop.csproj
+ StartupItem = NLog\NLog.monodevelop.csproj
Policies = $0
$0.TextStylePolicy = $1
$1.inheritsSet = null
View
3 src/NLog/NLog.monodevelop.csproj
@@ -15,6 +15,7 @@
<SignAssembly>true</SignAssembly>
<AssemblyOriginatorKeyFile>..\NLog.snk</AssemblyOriginatorKeyFile>
<TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
+ <NoWarn>0419</NoWarn>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
@@ -364,4 +365,4 @@
<CodeAnalysisDictionary Include="CustomDictionary.xml" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
-</Project>
+</Project>
View
5 tests/NLog.UnitTests/NLog.UnitTests.monodevelop.csproj
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8"?>
+<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="4.0">
<PropertyGroup>
<BaseOutputDirectory Condition=" '$(BaseOutputDirectory)' == '' ">$(MSBuildProjectDirectory)\..\..\build\</BaseOutputDirectory>
@@ -9,7 +9,8 @@
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
- <AssemblyKeyContainerName></AssemblyKeyContainerName>
+ <AssemblyKeyContainerName>
+ </AssemblyKeyContainerName>
<AssemblyName>NLog.UnitTests</AssemblyName>
<AssemblyOriginatorKeyFile>NLogTests.snk</AssemblyOriginatorKeyFile>
<DelaySign>false</DelaySign>
View
96 tools/mstest2nunit.pl
@@ -1,96 +0,0 @@
-#
-# Copyright (c) 2004-2010 Jaroslaw Kowalski <jaak@jkowalski.net>
-#
-# All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions
-# are met:
-#
-# * Redistributions of source code must retain the above copyright notice,
-# this list of conditions and the following disclaimer.
-#
-# * Redistributions in binary form must reproduce the above copyright notice,
-# this list of conditions and the following disclaimer in the documentation
-# and/or other materials provided with the distribution.
-#
-# * Neither the name of Jaroslaw Kowalski nor the names of its
-# contributors may be used to endorse or promote products derived from this
-# software without specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
-# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
-# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
-# THE POSSIBILITY OF SUCH DAMAGE.
-#
-
-# this script copies source files from one directory and replaces common MSTest calls
-# with their NUnit counterparts
-
-$searchfor = "using Microsoft.VisualStudio.TestTools.UnitTesting;";
-
-$replacement = q!using NUnit.Framework;
-using TestInitialize = NUnit.Framework.SetUpAttribute;
-using TestContext = System.Object;
-using TestProperty = NUnit.Framework.PropertyAttribute;
-using TestClass = NUnit.Framework.TestFixtureAttribute;
-using TestMethod = NUnit.Framework.TestAttribute;
-using TestCleanup = NUnit.Framework.TearDownAttribute;!;
-
-sub process_file
-{
- my $infile = shift || die;
- my $outfile = shift || die;
-
- open(IN, "$infile") || die;
- open(OUT, ">$outfile") || die;
- while (<IN>)
- {
- s/$searchfor/$replacement/g;
- s/Assert.IsInstanceOfType\((.*), (.*)\);/Assert.IsInstanceOfType($2, $1);/g;
- print OUT;
- }
- close(OUT);
- close(IN);
-}
-
-sub process_dir
-{
- my $indir = shift || die;
- my $outdir = shift || die;
-
- mkdir($outdir, 0755);
-
- opendir(DIR, $indir);
- my @files = readdir(DIR);
- closedir(DIR);
-
- for (@files)
- {
- next if m/^\./;
-
- $infile = "$indir/$_";
- $outfile = "$outdir/$_";
-
- if (-d $infile)
- {
- process_dir($infile, $outfile);
- next;
- }
-
- process_file($infile, $outfile);
- }
-}
-
-$indir = shift || die;
-$outdir = shift || die;
-
-process_dir($indir, $outdir);
-

0 comments on commit d6a87ec

Please sign in to comment.
Something went wrong with that request. Please try again.