@@ -72,78 +72,63 @@ Target "RestorePackages" (fun _ ->
7272)
7373
7474Target " Build" ( fun _ ->
75- if ( isWindows) then
76- let runSingleProject project =
77- DotNetCli.Build
78- ( fun p ->
79- { p with
80- Project = project
81- Configuration = configuration })
82-
83- let projects = !! " ./src/**/*.csproj" ++ " ./tests/**/*.csproj"
84-
85- projects |> Seq.iter ( runSingleProject)
86- else
75+ let runSingleProject project =
8776 DotNetCli.Build
88- ( fun p ->
89- { p with
90- Project = " ./src/NBench/NBench.csproj"
91- Framework = " netstandard1.6"
92- Configuration = configuration })
93-
94- let runSingleProjectNetCore project =
95- DotNetCli.Build
96- ( fun p ->
97- { p with
98- Project = project
99- Framework = " netcoreapp1.0"
100- Configuration = configuration })
101-
102- let netCoreProjects = (!! " ./src/**/*NBench.Runner.DotNetCli.csproj"
103- ++ " ./tests/**/*NBench.Tests*.csproj"
104- -- " ./tests/**/*NBench.PerformanceCounters.Tests.*.csproj" )
77+ ( fun p ->
78+ { p with
79+ Project = project
80+ Configuration = configuration
81+ AdditionalArgs = [ " --no-incremental" ]}) // "Rebuild"
10582
106- netCoreProjects |> Seq.iter ( runSingleProjectNetCore)
83+ let projects = !! " ./src/**/*.csproj" ++ " ./tests/**/*.csproj"
84+
85+ projects |> Seq.iter ( runSingleProject)
10786)
10887
10988Target " RunTests" ( fun _ ->
110- if ( isWindows) then
111- let runSingleProject project =
112- DotNetCli.Test
113- ( fun p ->
114- { p with
115- Project = project
116- Configuration = configuration})
117-
118- let projects = (!! " ./tests/**/*NBench.Tests*.csproj"
119- -- " ./tests/**/*NBench.Tests.Assembly.csproj" )
120-
121- projects |> Seq.iter ( log)
122- projects |> Seq.iter ( runSingleProject)
123-
124- else
125- let runSingleProjectNetCore project =
126- DotNetCli.Test
127- ( fun p ->
128- { p with
129- Project = project
130- Framework = " netcoreapp1.0"
131- Configuration = configuration})
132-
133- let projects = (!! " ./tests/**/*NBench.Tests*.csproj"
134- -- " ./tests/**/*NBench.PerformanceCounters.Tests.*.csproj"
135- -- " ./tests/**/*NBench.Tests.Performance.csproj"
136- -- " ./tests/**/*NBench.Tests.Assembly.csproj" )
89+ let sampleBenchmarProjects = !! " ./tests/**/NBench.Tests.Performance.csproj"
90+ ++ " ./tests/**/NBench.Tests.Performance.WithDependencies.csproj"
91+ ++ " ./tests/**/NBench.Tests.Assembly.csproj"
92+
93+ sampleBenchmarProjects |> Seq.iter ( fun proj ->
94+ DotNetCli.Build
95+ ( fun p ->
96+ { p with
97+ Project = proj
98+ Configuration = configuration
99+ AdditionalArgs = [ " --no-incremental" ]}))
137100
138- projects |> Seq.iter ( log)
139- projects |> Seq.iter ( runSingleProjectNetCore)
101+ let runSingleProject project =
102+ DotNetCli.RunCommand
103+ ( fun p ->
104+ { p with
105+ WorkingDir = ( Directory.GetParent project) .FullName
106+ TimeOut = TimeSpan.FromMinutes 10. })
107+ ( sprintf " xunit -parallel none -teamcity -xml %s _xunit.xml" ( outputTests @@ fileNameWithoutExt project))
108+
109+ let projects =
110+ match ( isWindows) with
111+ | true -> (!! " ./tests/**/*NBench.Tests*.csproj"
112+ -- " ./tests/**/*NBench.PerformanceCounters.Tests.*.csproj"
113+ -- " ./tests/**/*NBench.Tests.Performance.csproj"
114+ -- " ./tests/**/*NBench.Tests.Performance.WithDependencies.csproj"
115+ -- " ./tests/**/*NBench.Tests.Assembly.csproj" )
116+ | _ -> (!! " ./tests/**/*NBench.Tests*.csproj"
117+ -- " ./tests/**/*NBench.Tests.Reporting.csproj"
118+ -- " ./tests/**/*NBench.PerformanceCounters.Tests.*.csproj"
119+ -- " ./tests/**/*NBench.Tests.Performance.csproj"
120+ -- " ./tests/**/*NBench.Tests.Performance.WithDependencies.csproj"
121+ -- " ./tests/**/*NBench.Tests.Assembly.csproj" )
122+
123+ projects |> Seq.iter ( log)
124+ projects |> Seq.iter ( runSingleProject)
140125)
141126
142127Target " NBench" <| fun _ ->
143128 if ( isWindows) then
144129 // .NET 4.5.2
145130 let nbenchRunner = findToolInSubPath " NBench.Runner.exe" " src/NBench.Runner/bin/Release/net452/win7-x64"
146- let assembly = __ SOURCE_ DIRECTORY__ @@ " /tests/NBench.Tests.Performance/bin/Release/net452/NBench.Tests.Performance.dll"
131+ let assembly = __ SOURCE_ DIRECTORY__ @@ " /tests/NBench.Tests.Performance.WithDependencies /bin/Release/net452/NBench.Tests.Performance.WithDependencies .dll"
147132
148133 let spec = getBuildParam " spec"
149134
@@ -174,10 +159,10 @@ Target "NBench" <| fun _ ->
174159 Project = netCoreNbenchRunnerProject
175160 Configuration = configuration
176161 Runtime = " win7-x64"
177- Framework = " netcoreapp1.0 " })
162+ Framework = " netcoreapp1.1 " })
178163
179- let netCoreNbenchRunner = findToolInSubPath " dotnet-nbench.exe" " /src/NBench.Runner.DotNetCli/bin/Release/netcoreapp1.0 /win7-x64/"
180- let netCoreAssembly = __ SOURCE_ DIRECTORY__ @@ " /tests/NBench.Tests.Performance/bin/Release/netcoreapp1.0 /NBench.Tests.Performance.dll"
164+ let netCoreNbenchRunner = findToolInSubPath " dotnet-nbench.exe" " /src/NBench.Runner.DotNetCli/bin/Release/netcoreapp1.1 /win7-x64/"
165+ let netCoreAssembly = __ SOURCE_ DIRECTORY__ @@ " /tests/NBench.Tests.Performance.WithDependencies /bin/Release/netstandard1.6 /NBench.Tests.Performance.WithDependencies .dll"
181166
182167 let netCoreNbenchRunnerArgs = new StringBuilder()
183168 |> append netCoreAssembly
@@ -206,10 +191,10 @@ Target "NBench" <| fun _ ->
206191 Project = netCoreNbenchRunnerProject
207192 Configuration = configuration
208193 Runtime = " debian.8-x64"
209- Framework = " netcoreapp1.0 " })
194+ Framework = " netcoreapp1.1 " })
210195
211- let linuxNbenchRunner = __ SOURCE_ DIRECTORY__ @@ " /src/NBench.Runner.DotNetCli/bin/Release/netcoreapp1.0 /debian.8-x64/dotnet-nbench"
212- let linuxPerfAssembly = __ SOURCE_ DIRECTORY__ @@ " /tests/NBench.Tests.Performance/bin/Release/netcoreapp1.0 /NBench.Tests.Performance.dll"
196+ let linuxNbenchRunner = __ SOURCE_ DIRECTORY__ @@ " /src/NBench.Runner.DotNetCli/bin/Release/netcoreapp1.1 /debian.8-x64/dotnet-nbench"
197+ let linuxPerfAssembly = __ SOURCE_ DIRECTORY__ @@ " /tests/NBench.Tests.Performance.WithDependencies /bin/Release/netstandard1.6 /NBench.Tests.Performance.WithDependencies .dll"
213198
214199 let linuxNbenchRunnerArgs = new StringBuilder()
215200 |> append linuxPerfAssembly
@@ -220,7 +205,7 @@ Target "NBench" <| fun _ ->
220205
221206 let result = ExecProcess( fun info ->
222207 info.FileName <- linuxNbenchRunner
223- info.WorkingDirectory <- __ SOURCE_ DIRECTORY__ @@ " /src/NBench.Runner.DotNetCli/bin/Release/netcoreapp1.0 /debian.8-x64/"
208+ info.WorkingDirectory <- __ SOURCE_ DIRECTORY__ @@ " /src/NBench.Runner.DotNetCli/bin/Release/netcoreapp1.1 /debian.8-x64/"
224209 info.Arguments <- linuxNbenchRunnerArgs) ( System.TimeSpan.FromMinutes 15.0 ) (* Reasonably long-running task. *)
225210 if result <> 0 then failwithf " NBench.Runner failed. %s %s " linuxNbenchRunner linuxNbenchRunnerArgs
226211
@@ -245,7 +230,7 @@ Target "CopyOutput" (fun _ ->
245230 projects |> List.iter ( fun p -> publishSingleProjectNet45 p)
246231
247232 let netCoreProjects = [ ( " NBench" , " ./src/NBench/NBench.csproj" , " netstandard1.6" );
248- ( " NBench.Runner.DotNetCli" , " ./src/NBench.Runner.DotNetCli/NBench.Runner.DotNetCli.csproj" , " netcoreapp1.0 " ) ]
233+ ( " NBench.Runner.DotNetCli" , " ./src/NBench.Runner.DotNetCli/NBench.Runner.DotNetCli.csproj" , " netcoreapp1.1 " ) ]
249234
250235 let publishSingleProjectNetCoreApp project =
251236 let projectName , projectPath , projectFramework = project
0 commit comments