Skip to content

Commit 04e1307

Browse files
committed
moving to nunit3
1 parent 7436ce9 commit 04e1307

Some content is hidden

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

71 files changed

+182
-17044
lines changed

.gitignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,9 @@ TestResult.xml
2020
rabbit-mock.snk
2121
test.sh
2222
*.VisualState.xml
23-
23+
test-output.log
24+
InternalTrace*
25+
nunit-agent*
2426
#################
2527
## Visual Studio
2628
#################

appveyor.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,5 +43,7 @@ after_build:
4343
4444
artifacts:
4545
- path: '*.nupkg'
46+
- path: '*.log'
47+
name: Logs
4648

4749
deploy: off

build.fsx

Lines changed: 26 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,13 @@ let amqpSpec0_9BaseName = "amqp0-9.stripped.xml"
5858
let amqpSpec0_9_1i = specsDir </> amqpSpec0_9_1BaseName
5959
let autogeneratedApi0_9_1BaseName = "autogenerated-api-0-9-1.cs"
6060

61+
let setRabbitMqCtlPath () =
62+
let current = Environment.GetEnvironmentVariable "RABBITMQ_RABBITMQCTL_PATH"
63+
let ctlPath = __SOURCE_DIRECTORY__ </> "../rabbit/scripts/rabbitmqctl"
64+
if current = null then
65+
trace <| sprintf "setting RABBITMQ_RABBITMQCTL_PATH to %s" ctlPath
66+
Environment.SetEnvironmentVariable("RABBITMQ_RABBITMQCTL_PATH", ctlPath)
67+
6168
let createGensrcDirs () =
6269
projects
6370
|> List.map (fun p -> "./gensrc" </> p)
@@ -117,39 +124,43 @@ Target "UpdateAssemblyInfos"
117124
ReplaceAssemblyInfoVersionsBulk assemblyInfos (fun f ->
118125
{ f with AssemblyVersion = version }))
119126

120-
let test excludes =
127+
let test w =
128+
setRabbitMqCtlPath ()
129+
//TODO reimplement fixure selection
121130
let fixture = getBuildParamOrDefault "fixture" ""
122131
trace <| sprintf "fixture %s" fixture
123132
!! ("./projects/client/**/build/**/unit-tests.dll")
124-
|> NUnit (fun p ->
133+
|> Testing.NUnit3.NUnit3 (fun p ->
125134
{ p with
126-
Fixture = fixture
135+
Labels = Testing.NUnit3.LabelsLevel.All
136+
ProcessModel = Testing.NUnit3.SingleProcessModel
127137
TimeOut = TimeSpan.FromMinutes 30.
128-
ExcludeCategory = excludes
129-
DisableShadowCopy = true;
130-
OutputFile = "./TestResults.xml"})
138+
Where = w
139+
OutputDir = "test-output.log"})
131140

132141
Target "Test" (fun _ ->
133142
match buildEnv with
134-
| Mono -> "MonoBug"
143+
| Mono -> "cat != MonoBug"
135144
| _ -> ""
136145
|> test)
137146

138147
Target "TestQuick" (fun _ ->
139-
let excludes =
148+
setRabbitMqCtlPath ()
149+
let ``where`` =
140150
match buildEnv with
141-
| Mono -> "RequireSMP,LongRunning,MonoBug"
142-
| _ -> "RequireSMP,LongRunning"
151+
| Mono -> "cat != RequireSMP & cat != LongRunning & cat != MonoBug"
152+
| _ -> "cat != RequireSMP & cat != LongRunning"
143153
!! ("./projects/client/Unit/build/**/unit-tests.dll")
144-
|> NUnit (fun p ->
154+
|> Testing.NUnit3.NUnit3 (fun p ->
145155
{ p with
156+
Labels = Testing.NUnit3.LabelsLevel.All
157+
ProcessModel = Testing.NUnit3.SingleProcessModel
146158
TimeOut = TimeSpan.FromMinutes 30.
147-
ExcludeCategory = excludes
148-
DisableShadowCopy = true;
149-
OutputFile = "./TestResults.xml"}))
159+
Where = ``where``
160+
OutputDir = "test-output.log"}))
150161

151162
Target "AppVeyorTest" (fun _ ->
152-
test "RequireSMP,LongRunning,GCTest")
163+
test "cat != RequireSMP & cat != LongRunning & cat != GCTest")
153164

154165
Target "CreateGensrcDir" createGensrcDirs
155166

lib/nunit/Images/Ellipsis.gif

-101 Bytes
Binary file not shown.
-761 Bytes
Binary file not shown.
-688 Bytes
Binary file not shown.
-734 Bytes
Binary file not shown.
-689 Bytes
Binary file not shown.
-731 Bytes
Binary file not shown.
-808 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)