File tree Expand file tree Collapse file tree 10 files changed +20
-20
lines changed Expand file tree Collapse file tree 10 files changed +20
-20
lines changed Original file line number Diff line number Diff line change @@ -21,15 +21,10 @@ module Benchmarker =
21
21
let projectJson = testsProjectDirectory @@ " project.json"
22
22
// running benchmarks can timeout so clean up any generated benchmark files
23
23
try
24
- DotNetCli.Restore( fun p ->
25
- { p with
26
- Project = projectJson
27
- })
28
-
29
24
DotNetCli.RunCommand( fun p ->
30
25
{ p with
31
- WorkingDir = testsProjectDirectory
32
- }) " run Benchmark"
26
+ WorkingDir = testsProjectDirectory
27
+ }) " run -f net46 -c Release Benchmark"
33
28
finally
34
29
let benchmarkOutputFiles =
35
30
let output = combinePaths testsProjectDirectory " BenchmarkDotNet.Artifacts"
Original file line number Diff line number Diff line change 9
9
#load @" Versioning.fsx"
10
10
11
11
open System
12
+ open System.IO
12
13
open Fake
13
14
open FSharp.Data
14
15
@@ -42,6 +43,7 @@ module Build =
42
43
" CurrentAssemblyFileVersion" , ( Versioning.CurrentAssemblyFileVersion.ToString());
43
44
" DoSourceLink" , sourceLink;
44
45
" DotNetCoreOnly" , if buildingOnTravis then " 1" else " " ;
46
+ " OutputPathBaseDir" , Path.GetFullPath Paths.BuildOutput;
45
47
]
46
48
|> List.map ( fun ( p , v ) -> sprintf " %s =%s " p v)
47
49
|> String.concat " ;"
@@ -78,4 +80,4 @@ module Build =
78
80
DotNetCli.RunCommand ( fun p -> { p with TimeOut = TimeSpan.FromMinutes( 3. ) }) " clean src/Elasticsearch.sln -c Release" |> ignore
79
81
DotNetProject.All |> Seq.iter( fun p -> CleanDir( Paths.BinFolder p.Name))
80
82
| (_, _) ->
81
- tracefn " Skiping clean target only run when calling 'release', 'canary', 'clean' as targets directly"
83
+ tracefn " Skipping clean target only run when calling 'release', 'canary', 'clean' as targets directly"
Original file line number Diff line number Diff line change @@ -67,16 +67,17 @@ module Commandline =
67
67
setEnvironVar " FAKEBUILD" " 1"
68
68
printfn " %A " arguments
69
69
match arguments with
70
- | [] | [ " build" ] | [ " test" ] | [ " clean" ] -> ignore()
70
+ | [] | [ " build" ] | [ " test" ] | [ " clean" ] | [ " benchmark " ] | [ " profile " ] -> ignore()
71
71
| [ " release" ; version] -> setBuildParam " version" version
72
72
73
73
| [ " test" ; testFilter] -> setBuildParam " testfilter" testFilter
74
74
75
- | [ " profile" ; esVersions] -> setBuildParam " esversions" esVersions
75
+ | [ " profile" ; esVersions] ->
76
+ setBuildParam " esversions" esVersions
76
77
| [ " profile" ; esVersions; testFilter] ->
77
78
setBuildParam " esversions" esVersions
78
- setBuildParam " testfilter" testFilter
79
-
79
+ setBuildParam " testfilter" testFilter
80
+
80
81
| [ " integrate" ; esVersions] -> setBuildParam " esversions" esVersions
81
82
| [ " integrate" ; esVersions; clusterFilter] ->
82
83
setBuildParam " esversions" esVersions
Original file line number Diff line number Diff line change @@ -48,8 +48,8 @@ module Profiler =
48
48
member val Commit = commit with get, set
49
49
member val Functions = functions with get, set
50
50
51
- let private project = " Tests"
52
- let private profiledApp = sprintf " %s /%s /%s .exe" ( Paths.Output( " v4.6 " )) project project
51
+ let private project = PrivateProject ( Tests) .Name
52
+ let private profiledApp = sprintf " %s /net46 /%s .exe" ( Paths.Output( " Tests " )) project
53
53
let private snapShotOutput = Paths.Output( " ProfilingSnapshot.dtp" )
54
54
let private snapShotStatsOutput = Paths.Output( " ProfilingSnapshotStats.html" )
55
55
let private profileOutput = Paths.Output( " ProfilingReport.xml" )
@@ -63,7 +63,8 @@ module Profiler =
63
63
64
64
let Run () =
65
65
let date = DateTime.UtcNow.ToString( " yyyy-MM-ddTHH:mm:ss.fffz" )
66
- Tooling.execProcessWithTimeout profiledApp [ " Profile" ; " Class" ; getBuildParam " testfilter" ] ( TimeSpan.FromMinutes 30. ) |> ignore
66
+ trace profiledApp
67
+ Tooling.execProcessWithTimeout profiledApp [ " Profile" ; " Class" ; getBuildParam " testfilter" ] ( TimeSpan.FromMinutes 30. ) " ." |> ignore
67
68
trace " Profiling finished."
68
69
69
70
let performanceOutput = Paths.Output( " profiling/performance" ) |> directoryInfo
Original file line number Diff line number Diff line change 16
16
<Folder Include =" RestSpecification\XPack\Info" />
17
17
</ItemGroup >
18
18
<Import Project =" ..\..\..\.paket\Paket.Restore.targets" />
19
+ <Import Project =" ..\..\outputpath.props" />
19
20
</Project >
Original file line number Diff line number Diff line change 19
19
<PackageReference Include =" Newtonsoft.Json" Version =" 10.0.1" />
20
20
</ItemGroup >
21
21
<Import Project =" ..\..\..\.paket\Paket.Restore.targets" />
22
+ <Import Project =" ..\..\outputpath.props" />
22
23
</Project >
Original file line number Diff line number Diff line change 17
17
<PackageReference Include =" Microsoft.CSharp" Version =" 4.3.0" />
18
18
</ItemGroup >
19
19
<Import Project =" ..\..\.paket\Paket.Restore.targets" />
20
+ <Import Project =" ..\outputpath.props" />
20
21
</Project >
Original file line number Diff line number Diff line change 32
32
</ItemGroup >
33
33
<!-- <Import Project="..\..\.paket\Paket.Restore.targets" />-->
34
34
<Import Project =" ..\..\.paket\Paket.Restore.targets" />
35
+ <Import Project =" ..\outputpath.props" />
35
36
</Project >
Original file line number Diff line number Diff line change @@ -59,7 +59,7 @@ static Program()
59
59
// TODO: Renamed this from Main to TestMain because of a bug with Resharper and running unit tests
60
60
// in Visual Studio with .NET Core: https://youtrack.jetbrains.com/issue/RSRP-464233
61
61
// Once this is fixed, look at renaming back and removing additional packages. See https://github.com/elastic/elasticsearch-net/pull/2793
62
- public static void TestMain ( string [ ] args )
62
+ public static void Main ( string [ ] args )
63
63
{
64
64
if ( args . Length == 0 )
65
65
Console . WriteLine ( "Must specify at least one argument: TestAssemblyPath, Profile or Benchmark " ) ;
Original file line number Diff line number Diff line change 23
23
<PackageReference Include =" BenchMarkDotNet" Version =" 0.10.0" />
24
24
<PackageReference Include =" DiffPlex" Version =" 1.4.1" />
25
25
<PackageReference Include =" System.Reactive" Version =" 3.1.1" />
26
- <PackageReference Include =" Microsoft.NET.Test.Sdk" Version =" 15.0.0" />
27
26
<!-- TODO only for Desktop CLR? -->
28
27
<PackageReference Include =" System.Buffers" Version =" 4.3.0" />
29
28
<!-- TODO update -->
32
31
<PackageReference Include =" JetBrains.Profiler.Kernel.Windows.Api" Version =" 108.0.20170209.151431-eap01" />
33
32
<Reference Include =" ..\..\build\profiling\JetBrains.Profiler.Windows.SelfApi.dll" />
34
33
</ItemGroup >
35
- <ItemGroup Condition =" '$(TargetFramework)'!='net45'" >
36
- <PackageReference Include =" xunit.runner.visualstudio" Version =" 2.2.0" />
37
- </ItemGroup >
38
34
<ItemGroup Condition =" '$(TargetFramework)'=='netcoreapp1.1'" >
39
35
<PackageReference Include =" System.Net.Http" Version =" 4.3.0" />
40
36
<PackageReference Include =" System.Diagnostics.FileVersionInfo" Version =" 4.3.0" />
41
37
</ItemGroup >
42
38
<ItemGroup >
43
39
<EmbeddedResource Include =" Document\Single\Index\Attachment_Test_Document.pdf" />
44
40
</ItemGroup >
41
+ <Import Project =" ..\outputpath.props" />
45
42
</Project >
You can’t perform that action at this time.
0 commit comments