Skip to content

Commit

Permalink
Initial addition of files.
Browse files Browse the repository at this point in the history
  • Loading branch information
Ben Aston committed Oct 3, 2011
1 parent 79ef7a1 commit 82c213a
Show file tree
Hide file tree
Showing 89 changed files with 29,212 additions and 0 deletions.
27 changes: 27 additions & 0 deletions .gitignore
@@ -0,0 +1,27 @@
# VS Bits
[Oo]bj
[bB]in
*.suo
Publish.xml

# ReSharper
_ReSharper.*
*.user

# Runtime/Misc Junk :)
*.log*
.sass-cache
.orig

# SASS-Generated Files


# Project Build Output

#Mac and vim files
*.swp
.DS_Store
Thumbs.db

#Misc
TestResult.xml
72 changes: 72 additions & 0 deletions build/build.bat
@@ -0,0 +1,72 @@
@echo off
REM NuGet.exe must be in the path for the nuget functionality to work here.
cd /d %0\..

setlocal enabledelayedexpansion
set solutionAndMainProjectName=NBootstrap
set msBuildLocation=C:\Windows\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe

title !solutionAndMainProjectName!

:: Accept command line parameter for non-interactive mode
if "%1" == "" goto loop
set task= "%1"
set interactive= "false"
goto switch

:loop
set interactive= "true"
set /p task= !solutionAndMainProjectName! build script usage: (b)uild(d)ebug / (b)uild(s)taging / (b)uild(r)elease / (c)lean / (f)ast (t)ests / (s)low (t)ests / (n)uget (pack)?:
:: Weird string normalisation or something..
set task= "%task%"

:switch
if %task% == "bd" goto builddebug
if %task% == "br" goto buildrelease
if %task% == "bs" goto buildstaging
if %task% == "c" goto clean
if %task% == "ft" goto fasttests
if %task% == "st" goto slowtests
if %task% == "npack" goto nugetpack
if %task% == "npush" goto nugetpush

:resume
echo.
echo Completed at %date% %time%
echo.
if %interactive% == "true" goto loop
goto done

:builddebug
!msBuildLocation! /m:8 /verbosity:q /p:Configuration=Debug "%CD%\..\src\!solutionAndMainProjectName!.sln"
goto resume

:buildrelease
!msBuildLocation! /m:8 /p:Configuration=Release "%CD%\..\src\!solutionAndMainProjectName!.sln"
goto resume

:buildstaging
!msBuildLocation! /m:8 /p:Configuration=Staging "%CD%\..\src\!solutionAndMainProjectName!.sln"
goto resume

:nugetpack
cd %CD%\..
nuget pack %CD%\src\!solutionAndMainProjectName!\!solutionAndMainProjectName!.csproj -Prop Configuration=Release -Symbols
cd /d %0\..
goto resume

:clean
call %CD%\..\src\clean.bat
::return working directory to the location of this script
cd /d %0\..
goto resume

:fasttests
call %CD%\run-tests.bat "f"
goto resume

:slowtests
call %CD%\run-tests.bat "s"
goto resume

:done
36 changes: 36 additions & 0 deletions build/run-tests.bat
@@ -0,0 +1,36 @@
REM This script finds the tests of the specified type in the repository and run them using nunit-console.
REM It is horrendously slow, and there *will* be a better way to do this.
echo Always remember to compile before running tests this way.
REM Enables use of the !var! syntax.
setlocal enabledelayedexpansion
set fastTestSuffix=Test.Fast.dll
set slowTestSuffix=Test.Slow.dll
set repositoryRoot=%CD%\..\
set nunitConsoleLocation=!repositoryroot!src\packages\NUnit.2.5.10.11092\tools\nunit-console-x86.exe
set slowTestCategories=Slow
set fastTestCategories=Fast
set teststorun=%1
@echo off

set nunitCommand=!nunitConsoleLocation!
if !teststorun! == "f" (
set suffix=!fastTestSuffix!
set testCategoriesToExclude=!slowTestCategories!
echo Running fast tests...
) else (
set suffix=!slowTestSuffix!
set testCategoriesToExclude=!fastTestCategories!
echo Running slow tests...
)
FOR /F "DELIMS==" %%d in ('DIR "!repositoryRoot!src\" /AD /B') DO (
set directory=!repositoryRoot!src\%%d\bin\Debug\

for /F "delims==" %%f in ('DIR "!directory!" /B') do (
echo %%f|findstr /i !suffix! >nul:
if not !errorlevel!==1 (
echo %%f|findstr /i !suffix!.config >nul:
if !errorlevel!==1 (set nunitCommand=!nunitCommand! !directory!%%f)
)
)
)
call %nunitCommand% /nologo /exclude:!testCategoriesToExclude!,WIP

0 comments on commit 82c213a

Please sign in to comment.