Skip to content

Commit

Permalink
Added spec project and command line build
Browse files Browse the repository at this point in the history
  • Loading branch information
J. Preiss committed Oct 12, 2012
1 parent 59c93e4 commit f4183d1
Show file tree
Hide file tree
Showing 66 changed files with 6,557 additions and 0 deletions.
67 changes: 67 additions & 0 deletions Lingua.Specs/Lingua.Specs.csproj
@@ -0,0 +1,67 @@
<?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>{132A431E-90E8-4E02-BAFF-02FD746C7FBA}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Lingua.Specs</RootNamespace>
<AssemblyName>Lingua.Specs</AssemblyName>
<TargetFrameworkVersion>v4.0</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>DEBUG;TRACE</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</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="Machine.Fakes">
<HintPath>..\packages\Machine.Fakes.0.6\lib\net40\Machine.Fakes.dll</HintPath>
</Reference>
<Reference Include="Machine.Fakes.Adapters.RhinoMocks">
<HintPath>..\packages\Machine.Fakes.RhinoMocks.0.6\lib\net40\Machine.Fakes.Adapters.RhinoMocks.dll</HintPath>
</Reference>
<Reference Include="Machine.Specifications">
<HintPath>..\packages\Machine.Specifications.0.5.9\lib\net40\Machine.Specifications.dll</HintPath>
</Reference>
<Reference Include="Machine.Specifications.Clr4">
<HintPath>..\packages\Machine.Specifications.0.5.9\lib\net40\Machine.Specifications.Clr4.dll</HintPath>
</Reference>
<Reference Include="Rhino.Mocks">
<HintPath>..\packages\RhinoMocks.3.6.1\lib\net\Rhino.Mocks.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="Microsoft.CSharp" />
</ItemGroup>
<ItemGroup>
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>
<None Include="packages.config" />
</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>
36 changes: 36 additions & 0 deletions Lingua.Specs/Properties/AssemblyInfo.cs
@@ -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("Lingua.Specs")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("Lingua.Specs")]
[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("c5ff0fca-cfdc-4034-812d-ec05c9ff2a3e")]

// 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")]
7 changes: 7 additions & 0 deletions Lingua.Specs/packages.config
@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Machine.Fakes" version="0.6" />
<package id="Machine.Fakes.RhinoMocks" version="0.6" />
<package id="Machine.Specifications" version="0.5.9" />
<package id="RhinoMocks" version="3.6.1" />
</packages>
6 changes: 6 additions & 0 deletions Lingua.sln
Expand Up @@ -5,6 +5,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Lingua", "Lingua\Lingua.csp
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LinguaDemo", "LinguaDemo\LinguaDemo.csproj", "{11D4AD8E-F648-4DDA-8194-72C0D880C924}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Lingua.Specs", "Lingua.Specs\Lingua.Specs.csproj", "{132A431E-90E8-4E02-BAFF-02FD746C7FBA}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand All @@ -19,6 +21,10 @@ Global
{11D4AD8E-F648-4DDA-8194-72C0D880C924}.Debug|Any CPU.Build.0 = Debug|Any CPU
{11D4AD8E-F648-4DDA-8194-72C0D880C924}.Release|Any CPU.ActiveCfg = Release|Any CPU
{11D4AD8E-F648-4DDA-8194-72C0D880C924}.Release|Any CPU.Build.0 = Release|Any CPU
{132A431E-90E8-4E02-BAFF-02FD746C7FBA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{132A431E-90E8-4E02-BAFF-02FD746C7FBA}.Debug|Any CPU.Build.0 = Debug|Any CPU
{132A431E-90E8-4E02-BAFF-02FD746C7FBA}.Release|Any CPU.ActiveCfg = Release|Any CPU
{132A431E-90E8-4E02-BAFF-02FD746C7FBA}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand Down
24 changes: 24 additions & 0 deletions build.cmd
@@ -0,0 +1,24 @@
@echo off

:Build
cls

SET TARGET="Default"

IF NOT [%1]==[] (set TARGET="%1")

"Tools\Fake\Fake.exe" "build.fsx" "target=%TARGET%"

rem Bail if we're running a TeamCity build.
if defined TEAMCITY_PROJECT_NAME goto Quit

rem Loop the build script.
set CHOICE=nothing
echo (Q)uit, (Enter) runs the build again
set /P CHOICE=
if /i "%CHOICE%"=="Q" goto :Quit

GOTO Build

:Quit
exit /b %errorlevel%
71 changes: 71 additions & 0 deletions build.fsx
@@ -0,0 +1,71 @@
#I @"Tools\Fake"
#r "FakeLib.dll"

open Fake

// properties
let projectName = "Lingua"
//let projectSummary = ""
let authors = ["R. Todd", "J. Preiss"]

TraceEnvironmentVariables()

// Directories
let binDir = @".\Binaries\"
let buildDir = binDir @@ @"build\"
let testDir = binDir @@ @"test\"
let reportDir = binDir @@ @"report\"
let packagesDir = binDir @@ @"packages"
let mspecDir = packagesDir @@ "MSpec"

// Files
let appReferences =
!+ @"**\Lingua\Lingua.csproj"
++ @"**\LinguaDemo\LinguaDemo.csproj"
|> Scan

let testReferences =
!+ @"**\Lingua.Specs\Lingua.Specs.csproj"
|> Scan

// Targets
Target "Clean" (fun _ ->
CleanDirs [buildDir; testDir; reportDir; packagesDir]

CreateDir mspecDir
!! (@"packages\Machine.Specifications.*\**\*.*")
|> CopyTo mspecDir
)

Target "BuildApp" (fun _ ->
MSBuildRelease buildDir "Build" appReferences
|> Log "AppBuild-Output: "
)

Target "BuildTest" (fun _ ->
MSBuildDebug testDir "Build" testReferences
|> Log "TestBuildOutput: "
)

Target "RunTest" (fun _ ->
let mspecTool = mspecDir @@ "mspec-clr4.exe"
trace mspecTool

!! (testDir @@ "*.Specs.dll")
|> MSpec (fun p ->
{p with
ToolPath = mspecTool
HtmlOutputDir = reportDir})
)

Target "Default" DoNothing

// Dependencies
"Clean"
==> "BuildApp" <=> "BuildTest"
==> "RunTest"
==> "Default"

// start build
RunParameterTargetOrDefault "target" "Default"

Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,5 @@
<TestRunner>
<FriendlyName>Machine.Specifications 0.5.9-27f7b96</FriendlyName>
<AssemblyPath>Machine.Specifications.TDNetRunner.dll</AssemblyPath>
<TypeName>Machine.Specifications.TDNetRunner.SpecificationRunner</TypeName>
</TestRunner>
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,5 @@
<TestRunner>
<FriendlyName>Machine.Specifications 0.5.9-27f7b96</FriendlyName>
<AssemblyPath>Machine.Specifications.TDNetRunner.dll</AssemblyPath>
<TypeName>Machine.Specifications.TDNetRunner.SpecificationRunner</TypeName>
</TestRunner>
Binary file not shown.

0 comments on commit f4183d1

Please sign in to comment.