Skip to content

Commit

Permalink
Added a test target to build file.
Browse files Browse the repository at this point in the history
  • Loading branch information
nikmd23 committed Mar 29, 2012
1 parent 771bd47 commit ddaf7cf
Show file tree
Hide file tree
Showing 37 changed files with 5,152 additions and 37 deletions.
13 changes: 13 additions & 0 deletions Glimpse.All.sln
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,8 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "JavaScript", "JavaScript",
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Glimpse.AspNet.Net35", "source\Glimpse.AspNet.Net35\Glimpse.AspNet.Net35.csproj", "{971143D1-B40E-4AF4-AD3D-D4FFAD3FE444}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Glimpse.Test.AspNet.Net35", "source\Glimpse.Test.AspNet.Net35\Glimpse.Test.AspNet.Net35.csproj", "{CD52E292-1514-4B09-900B-6A7E20468152}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand Down Expand Up @@ -187,6 +189,16 @@ Global
{971143D1-B40E-4AF4-AD3D-D4FFAD3FE444}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
{971143D1-B40E-4AF4-AD3D-D4FFAD3FE444}.Release|Mixed Platforms.Build.0 = Release|Any CPU
{971143D1-B40E-4AF4-AD3D-D4FFAD3FE444}.Release|x86.ActiveCfg = Release|Any CPU
{CD52E292-1514-4B09-900B-6A7E20468152}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{CD52E292-1514-4B09-900B-6A7E20468152}.Debug|Any CPU.Build.0 = Debug|Any CPU
{CD52E292-1514-4B09-900B-6A7E20468152}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
{CD52E292-1514-4B09-900B-6A7E20468152}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
{CD52E292-1514-4B09-900B-6A7E20468152}.Debug|x86.ActiveCfg = Debug|Any CPU
{CD52E292-1514-4B09-900B-6A7E20468152}.Release|Any CPU.ActiveCfg = Release|Any CPU
{CD52E292-1514-4B09-900B-6A7E20468152}.Release|Any CPU.Build.0 = Release|Any CPU
{CD52E292-1514-4B09-900B-6A7E20468152}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
{CD52E292-1514-4B09-900B-6A7E20468152}.Release|Mixed Platforms.Build.0 = Release|Any CPU
{CD52E292-1514-4B09-900B-6A7E20468152}.Release|x86.ActiveCfg = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand All @@ -200,5 +212,6 @@ Global
{13FEFF53-9CD2-4BF1-9128-A60F99E5532F} = {44EAFB31-C422-4B52-BBCE-18A3E95713DC}
{971143D1-B40E-4AF4-AD3D-D4FFAD3FE444} = {44EAFB31-C422-4B52-BBCE-18A3E95713DC}
{E242E3FC-DEF4-45E2-A129-A5DC3B0B8F9B} = {13FEFF53-9CD2-4BF1-9128-A60F99E5532F}
{CD52E292-1514-4B09-900B-6A7E20468152} = {13FEFF53-9CD2-4BF1-9128-A60F99E5532F}
EndGlobalSection
EndGlobal
2 changes: 2 additions & 0 deletions builds/local/artifacts/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@

*.xml
36 changes: 8 additions & 28 deletions default.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ task compile -depends clean {
exec { msbuild $base_dir\Glimpse.All.sln /p:Configuration=$config /nologo /verbosity:minimal }
}

task merge -depends compile {
task merge -depends test {
"Merging"

" Glimpse.Core2"
Expand All @@ -82,7 +82,7 @@ task merge -depends compile {

}

task pack2 -depends merge {
task pack -depends merge {
"Packing"

cd $package_dir\NuGet.CommandLine.*\tools\
Expand Down Expand Up @@ -110,41 +110,21 @@ task pack2 -depends merge {
copy $source_dir\Glimpse.AspNet\nuspec\lib\net35\Glimpse.AspNet.* $build_dir\local\zip\AspNet\net35
copy $source_dir\Glimpse.AspNet\nuspec\readme.txt $build_dir\local\zip\AspNet

#TODO: Add MVC
#TODO: Add help .CHM file

Create-Zip $build_dir\local\zip $build_dir\local\Glimpse.zip
Delete-Directory $build_dir\local\zip
}

task pack -depends merge {
"Creating Glimpse.nupkg, Glimpse.Mvc3.nupkg, Glimpse.Ef.nupkg & Glimpse.Elmah.nupkg"

exec { & $tools_dir\nuget.exe pack $source_dir\Glimpse.Core\nuspec\Glimpse.nuspec -OutputDirectory $build_dir\local }
exec { & $tools_dir\nuget.exe pack $source_dir\Glimpse.Mvc3\nuspec\Glimpse.Mvc3.nuspec -OutputDirectory $build_dir\local }
exec { & $tools_dir\nuget.exe pack $source_dir\Glimpse.Ef\nuspec\Glimpse.Ef.nuspec -OutputDirectory $build_dir\local }
exec { & $tools_dir\nuget.exe pack $source_dir\Glimpse.Elmah\nuspec\Glimpse.Elmah.nuspec -OutputDirectory $build_dir\local }

mkdir $build_dir\local\zip
copy $source_dir\Glimpse.Core\nuspec\lib\net40\Glimpse.Core.dll $build_dir\local\zip
copy $source_dir\Glimpse.Mvc3\nuspec\lib\net40\Glimpse.Mvc3.dll $build_dir\local\zip
copy $source_dir\Glimpse.Ef\nuspec\lib\net40\Glimpse.Ef.dll $build_dir\local\zip
copy $source_dir\Glimpse.Elmah\nuspec\lib\net40\Glimpse.Elmah.dll $build_dir\local\zip

copy $source_dir\Glimpse.Core\nuspec\content\App_Readme\glimpse.readme.txt $build_dir\local\zip
copy $source_dir\Glimpse.Mvc3\nuspec\content\App_Readme\glimpse.mvc3.readme.txt $build_dir\local\zip
copy $source_dir\Glimpse.Ef\nuspec\content\App_Readme\glimpse.ef.readme.txt $build_dir\local\zip
copy $source_dir\Glimpse.Elmah\nuspec\content\App_Readme\glimpse.elmah.readme.txt $build_dir\local\zip
task test -depends compile{
"Testing"

copy $base_dir\license.txt $build_dir\local\zip
New-Item $build_dir\local\artifacts -Type directory -Force > $null

dir $build_dir\local\zip\*.* -Recurse | add-Zip $build_dir\local\Glimpse.zip
del $build_dir\local\zip -Recurse
}

task test -depends compile{
"Testing Glimpse.Test.Core"
cd $tools_dir\xunit*\

exec { & $tools_dir\nunit\nunit-console.exe $tools_dir\nunit\GlimpseTests.nunit /labels /nologo }
exec { & .\xunit.console.clr4 tests.xunit }
}

task buildjs {
Expand Down
1 change: 1 addition & 0 deletions packages/repositories.config
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
<repository path="..\source\Glimpse.Core2.Net35\packages.config" />
<repository path="..\source\Glimpse.Core2\packages.config" />
<repository path="..\source\Glimpse.Mvc3.MusicStore.Sample\packages.config" />
<repository path="..\source\Glimpse.Test.AspNet.Net35\packages.config" />
<repository path="..\source\Glimpse.Test.AspNet\packages.config" />
<repository path="..\source\Glimpse.Test.Core2.Net35\packages.config" />
<repository path="..\source\Glimpse.Test.Core2\packages.config" />
Expand Down
11 changes: 4 additions & 7 deletions source/Glimpse.AspNet.Net35/Backport/Net35Backport.cs
Original file line number Diff line number Diff line change
@@ -1,17 +1,14 @@
namespace Glimpse.AspNet.Net35.Backport
using System.Linq;

namespace Glimpse.AspNet.Net35.Backport
{
public static class Net35Backport
{
public static bool IsNullOrWhiteSpace(string value)
{
if (value == null) return true;

for (int i = 0; i < value.Length; i++)
{
if (!char.IsWhiteSpace(value[i])) return false;
}

return true;
return value.All(char.IsWhiteSpace);
}
}
}
60 changes: 60 additions & 0 deletions source/Glimpse.Test.AspNet.Net35/Glimpse.Test.AspNet.Net35.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProductVersion>8.0.30703</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{CD52E292-1514-4B09-900B-6A7E20468152}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Glimpse.Test.AspNet.Net35</RootNamespace>
<AssemblyName>Glimpse.Test.AspNet.Net35</AssemblyName>
<TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>TRACE;DEBUG;NET35</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE;NET35</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="System.Core" />
<Reference Include="xunit">
<HintPath>..\..\packages\xunit.1.9.0.1566\lib\xunit.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup>
<Compile Include="Net35BackportShould.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>
<None Include="packages.config" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Glimpse.AspNet.Net35\Glimpse.AspNet.Net35.csproj">
<Project>{971143D1-B40E-4AF4-AD3D-D4FFAD3FE444}</Project>
<Name>Glimpse.AspNet.Net35</Name>
</ProjectReference>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->
</Project>
16 changes: 16 additions & 0 deletions source/Glimpse.Test.AspNet.Net35/Net35BackportShould.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
using Glimpse.AspNet.Net35.Backport;
using Xunit;

namespace Glimpse.Test.AspNet.Net35
{
public class Net35BackportShould
{
[Fact]
public void HandleIsNullOrWhiteSpace()
{
Assert.True(Net35Backport.IsNullOrWhiteSpace(null));
Assert.True(Net35Backport.IsNullOrWhiteSpace(" "));
Assert.False(Net35Backport.IsNullOrWhiteSpace("any string"));
}
}
}
36 changes: 36 additions & 0 deletions source/Glimpse.Test.AspNet.Net35/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;

// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("Glimpse.Test.AspNet.Net35")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("Glimpse.Test.AspNet.Net35")]
[assembly: AssemblyCopyright("Copyright © 2012")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]

// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]

// The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("f9e0227e-7d1f-47aa-b398-9ea0b8be39e6")]

// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
4 changes: 4 additions & 0 deletions source/Glimpse.Test.AspNet.Net35/packages.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="xunit" version="1.9.0.1566" />
</packages>
4 changes: 2 additions & 2 deletions source/Glimpse.Test.Core2/Resource/MetadataShould.cs
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,10 @@ public void HaveProperName()
}

[Fact]
public void NotRequireParameterKeys()
public void RequireParameterKeys()
{
var metadata = new Metadata();
Assert.Empty(metadata.ParameterKeys);
Assert.NotEmpty(metadata.ParameterKeys);
}

/*[Fact]
Expand Down
Binary file removed tools/NuGet.exe
Binary file not shown.
29 changes: 29 additions & 0 deletions tools/xunit-1.9/EULA.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
This license governs use of the accompanying software. If you use the software, you accept this license. If you do not accept the license, do not use the software.

1. Definitions

The terms "reproduce," "reproduction," "derivative works," and "distribution" have the same meaning here as under U.S. copyright law.

A "contribution" is the original software, or any additions or changes to the software.

A "contributor" is any person that distributes its contribution under this license.

"Licensed patents" are a contributor's patent claims that read directly on its contribution.

2. Grant of Rights

(A) Copyright Grant- Subject to the terms of this license, including the license conditions and limitations in section 3, each contributor grants you a non-exclusive, worldwide, royalty-free copyright license to reproduce its contribution, prepare derivative works of its contribution, and distribute its contribution or any derivative works that you create.

(B) Patent Grant- Subject to the terms of this license, including the license conditions and limitations in section 3, each contributor grants you a non-exclusive, worldwide, royalty-free license under its licensed patents to make, have made, use, sell, offer for sale, import, and/or otherwise dispose of its contribution in the software or derivative works of the contribution in the software.

3. Conditions and Limitations

(A) No Trademark License- This license does not grant you rights to use any contributors' name, logo, or trademarks.

(B) If you bring a patent claim against any contributor over patents that you claim are infringed by the software, your patent license from such contributor to the software ends automatically.

(C) If you distribute any portion of the software, you must retain all copyright, patent, trademark, and attribution notices that are present in the software.

(D) If you distribute any portion of the software in source code form, you may do so only under this license by including a complete copy of this license with your distribution. If you distribute any portion of the software in compiled or object code form, you may only do so under a license that complies with this license.

(E) The software is licensed "as-is." You bear the risk of using it. The contributors give no express warranties, guarantees or conditions. You may have additional consumer rights under your local laws which this license cannot change. To the extent permitted under your local laws, the contributors exclude the implied warranties of merchantability, fitness for a particular purpose and non-infringement.
Loading

0 comments on commit ddaf7cf

Please sign in to comment.