Skip to content

Commit 1cf3965

Browse files
author
Ben Aston
committed
Initial commit of files.
1 parent 1682114 commit 1cf3965

File tree

76 files changed

+13760
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

76 files changed

+13760
-0
lines changed

.gitignore

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# VS Bits
2+
[Oo]bj
3+
[bB]in
4+
*.suo
5+
Publish.xml
6+
7+
# ReSharper
8+
_ReSharper.*
9+
*.user
10+
11+
# Runtime/Misc Junk :)
12+
*.log*
13+
.sass-cache
14+
.orig
15+
16+
# SASS-Generated Files
17+
18+
19+
# Project Build Output
20+
21+
#Mac and vim files
22+
*.swp
23+
.DS_Store
24+
Thumbs.db
25+
26+
#Misc
27+
TestResult.xml

build/build.bat

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
@echo off
2+
REM NuGet.exe must be in the path for the nuget functionality to work here.
3+
cd /d %0\..
4+
5+
setlocal enabledelayedexpansion
6+
set solutionAndMainProjectName=NBasicExtensionMethod
7+
set msBuildLocation=C:\Windows\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe
8+
9+
title !solutionAndMainProjectName!
10+
11+
:: Accept command line parameter for non-interactive mode
12+
if "%1" == "" goto loop
13+
set task= "%1"
14+
set interactive= "false"
15+
goto switch
16+
17+
:loop
18+
set interactive= "true"
19+
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)?:
20+
:: Weird string normalisation or something..
21+
set task= "%task%"
22+
23+
:switch
24+
if %task% == "bd" goto builddebug
25+
if %task% == "br" goto buildrelease
26+
if %task% == "bs" goto buildstaging
27+
if %task% == "c" goto clean
28+
if %task% == "ft" goto fasttests
29+
if %task% == "st" goto slowtests
30+
if %task% == "npack" goto nugetpack
31+
if %task% == "npush" goto nugetpush
32+
33+
:resume
34+
echo.
35+
echo Completed at %date% %time%
36+
echo.
37+
if %interactive% == "true" goto loop
38+
goto done
39+
40+
:builddebug
41+
!msBuildLocation! /m:8 /verbosity:q /p:Configuration=Debug "%CD%\..\src\!solutionAndMainProjectName!.sln"
42+
goto resume
43+
44+
:buildrelease
45+
!msBuildLocation! /m:8 /p:Configuration=Release "%CD%\..\src\!solutionAndMainProjectName!.sln"
46+
goto resume
47+
48+
:buildstaging
49+
!msBuildLocation! /m:8 /p:Configuration=Staging "%CD%\..\src\!solutionAndMainProjectName!.sln"
50+
goto resume
51+
52+
:nugetpack
53+
cd %CD%\..
54+
nuget pack %CD%\src\!solutionAndMainProjectName!\!solutionAndMainProjectName!.csproj -Prop Configuration=Release -Symbols
55+
cd /d %0\..
56+
goto resume
57+
58+
:clean
59+
call %CD%\..\src\clean.bat
60+
::return working directory to the location of this script
61+
cd /d %0\..
62+
goto resume
63+
64+
:fasttests
65+
call %CD%\run-tests.bat "f"
66+
goto resume
67+
68+
:slowtests
69+
call %CD%\run-tests.bat "s"
70+
goto resume
71+
72+
:done

build/run-tests.bat

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
REM This script finds the tests of the specified type in the repository and run them using nunit-console.
2+
REM It is horrendously slow, and there *will* be a better way to do this.
3+
echo Always remember to compile before running tests this way.
4+
REM Enables use of the !var! syntax.
5+
setlocal enabledelayedexpansion
6+
set fastTestSuffix=Test.Fast.dll
7+
set slowTestSuffix=Test.Slow.dll
8+
set repositoryRoot=%CD%\..\
9+
set nunitConsoleLocation=!repositoryroot!src\packages\NUnit.2.5.10.11092\tools\nunit-console-x86.exe
10+
set slowTestCategories=Slow
11+
set fastTestCategories=Fast
12+
set teststorun=%1
13+
@echo off
14+
15+
set nunitCommand=!nunitConsoleLocation!
16+
if !teststorun! == "f" (
17+
set suffix=!fastTestSuffix!
18+
set testCategoriesToExclude=!slowTestCategories!
19+
echo Running fast tests...
20+
) else (
21+
set suffix=!slowTestSuffix!
22+
set testCategoriesToExclude=!fastTestCategories!
23+
echo Running slow tests...
24+
)
25+
FOR /F "DELIMS==" %%d in ('DIR "!repositoryRoot!src\" /AD /B') DO (
26+
set directory=!repositoryRoot!src\%%d\bin\Debug\
27+
28+
for /F "delims==" %%f in ('DIR "!directory!" /B') do (
29+
echo %%f|findstr /i !suffix! >nul:
30+
if not !errorlevel!==1 (
31+
echo %%f|findstr /i !suffix!.config >nul:
32+
if !errorlevel!==1 (set nunitCommand=!nunitCommand! !directory!%%f)
33+
)
34+
)
35+
)
36+
call %nunitCommand% /nologo /exclude:!testCategoriesToExclude!,WIP

0 commit comments

Comments
 (0)