Skip to content

Commit f59d3e8

Browse files
Merge pull request #87 from adamsitnik/master
DNX451 support
2 parents 3c4410f + 43af33a commit f59d3e8

File tree

64 files changed

+1416
-843
lines changed

Some content is hidden

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

64 files changed

+1416
-843
lines changed

.gitignore

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,4 +35,14 @@ packages/
3535
nuget.exe
3636

3737
.idea/
38-
*.iml
38+
*.iml
39+
40+
BenchmarkDotNet.IntegrationTests/**/Program.cs
41+
BenchmarkDotNet.IntegrationTests/**/Program.csproj
42+
BenchmarkDotNet.IntegrationTests/*.csv
43+
BenchmarkDotNet.IntegrationTests/*.txt
44+
BenchmarkDotNet.IntegrationTests/*.md
45+
BenchmarkDotNet.IntegrationTests/*.R
46+
BenchmarkDotNet.Autogenerated/*
47+
**/project.lock.json
48+
testsOutput/*

.nuget/NuGet.Config

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,7 @@
33
<solution>
44
<add key="disableSourceControlIntegration" value="true" />
55
</solution>
6+
<packageSources>
7+
<add key="fsprojects" value="https://www.myget.org/F/fsprojects/api/v3/index.json" />
8+
</packageSources>
69
</configuration>

BenchmarkDotNet.Diagnostics/BenchmarkDotNet.Diagnostics.csproj

Lines changed: 0 additions & 75 deletions
This file was deleted.
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3+
<PropertyGroup>
4+
<VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">14.0</VisualStudioVersion>
5+
<VSToolsPath Condition="'$(VSToolsPath)' == ''">$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)</VSToolsPath>
6+
</PropertyGroup>
7+
<Import Project="$(VSToolsPath)\DNX\Microsoft.DNX.Props" Condition="'$(VSToolsPath)' != ''" />
8+
<PropertyGroup Label="Globals">
9+
<ProjectGuid>B61A2815-4E2F-42F7-A87C-973C488B11CA</ProjectGuid>
10+
<RootNamespace>BenchmarkDotNet.Diagnostics</RootNamespace>
11+
<BaseIntermediateOutputPath Condition="'$(BaseIntermediateOutputPath)'=='' ">..\artifacts\obj\$(MSBuildProjectName)</BaseIntermediateOutputPath>
12+
<OutputPath Condition="'$(OutputPath)'=='' ">..\artifacts\bin\$(MSBuildProjectName)\</OutputPath>
13+
</PropertyGroup>
14+
<PropertyGroup>
15+
<SchemaVersion>2.0</SchemaVersion>
16+
<ProduceOutputsOnBuild>True</ProduceOutputsOnBuild>
17+
<TypeScriptCompileBlocked>True</TypeScriptCompileBlocked>
18+
</PropertyGroup>
19+
<Import Project="$(VSToolsPath)\DNX\Microsoft.DNX.targets" Condition="'$(VSToolsPath)' != ''" />
20+
</Project>
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
{
2+
"title": "BenchmarkDotNet.Diagnostics",
3+
"frameworks": {
4+
"net40": {
5+
},
6+
"dnx451": {
7+
"frameworkAssemblies": {
8+
"System.Runtime": "4.0.10.0"
9+
}
10+
}
11+
},
12+
"dependencies": {
13+
"BenchmarkDotNet": {
14+
"target": "project",
15+
"version": "1.0.0-*"
16+
},
17+
"Dia2Lib": "1.0.0-*",
18+
"Interop.Dia2Lib": "1.0.0-*",
19+
"Microsoft.Diagnostics.Runtime": "1.0.0-*"
20+
},
21+
"scripts": {
22+
"postbuild": [
23+
"%project:Directory%/../build/batchcopy \"%project:Directory%/../CLRMD/*.*\" %project:BuildOutputDir%/Debug/net40",
24+
"%project:Directory%/../build/batchcopy \"%project:Directory%/../CLRMD/*.*\" %project:BuildOutputDir%/Release/net40",
25+
"%project:Directory%/../build/batchcopy \"%project:Directory%/../CLRMD/*.*\" %project:BuildOutputDir%/Debug/dnx451",
26+
"%project:Directory%/../build/batchcopy \"%project:Directory%/../CLRMD/*.*\" %project:BuildOutputDir%/Release/dnx451"
27+
]
28+
}
29+
}
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3+
<PropertyGroup>
4+
<VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">14.0</VisualStudioVersion>
5+
<VSToolsPath Condition="'$(VSToolsPath)' == ''">$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)</VSToolsPath>
6+
</PropertyGroup>
7+
<Import Project="$(VSToolsPath)\DNX\Microsoft.DNX.Props" Condition="'$(VSToolsPath)' != ''" />
8+
<PropertyGroup Label="Globals">
9+
<ProjectGuid>bf35eb0a-4c51-4685-bfd8-8b5eb3dea5ca</ProjectGuid>
10+
<RootNamespace>BenchmarkDotNet.IntegrationTests.FSharp</RootNamespace>
11+
<BaseIntermediateOutputPath Condition="'$(BaseIntermediateOutputPath)'=='' ">..\artifacts\obj\$(MSBuildProjectName)</BaseIntermediateOutputPath>
12+
<OutputPath Condition="'$(OutputPath)'=='' ">..\artifacts\bin\$(MSBuildProjectName)\</OutputPath>
13+
</PropertyGroup>
14+
<PropertyGroup>
15+
<SchemaVersion>2.0</SchemaVersion>
16+
</PropertyGroup>
17+
<ItemGroup>
18+
<DnxInvisibleContent Include="BenchmarkDotNet.IntegrationTests.FSharp.fsproj" />
19+
<DnxInvisibleContent Include="packages.config" />
20+
</ItemGroup>
21+
<Import Project="$(VSToolsPath)\DNX\Microsoft.DNX.targets" Condition="'$(VSToolsPath)' != ''" />
22+
</Project>

BenchmarkDotNet.IntegrationTests.FSharp/Program.fs

Lines changed: 6 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
module FSharpBenchmark
22

3+
open Xunit
34
open BenchmarkDotNet.Attributes
45
open BenchmarkDotNet.Running
5-
open NUnit.Framework
6-
open FsUnit
76
open System.Threading
87

98
type File =
@@ -27,15 +26,9 @@ type Db() =
2726
Thread.Sleep(50)
2827
createDoc("Testing")
2928

30-
[<Test>]
31-
let ShouldExecuteBenchmark() =
32-
let reports = BenchmarkRunner.Run<Db>()
33-
()
29+
type FSharpTests() =
3430

35-
36-
// Can't get NUnit test runner to work in VS, so "simulate" it by calling the Test method from the EntryPoint method (main())
37-
[<EntryPoint>]
38-
let main argv =
39-
printfn "Running Test Method: ShouldExecuteBenchmark()"
40-
ShouldExecuteBenchmark()
41-
0 // return an integer exit code
31+
[<Fact>]
32+
let ShouldExecuteBenchmark() =
33+
let reports = BenchmarkRunner.Run<Db>()
34+
()

BenchmarkDotNet.IntegrationTests.FSharp/packages.config

Lines changed: 0 additions & 6 deletions
This file was deleted.
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
{
2+
"version": "1.0.0-*",
3+
4+
"commands": {
5+
"testOnlyFromConsole": "xunit.runner.dnx"
6+
},
7+
8+
"dependencies": {
9+
"BenchmarkDotNet": {
10+
"target": "project"
11+
},
12+
"xunit": "2.1.0",
13+
"xunit.core": "2.1.0"
14+
},
15+
16+
"frameworks": {
17+
"net45": {
18+
"frameworkAssemblies": {
19+
"System": "4.0.0.0",
20+
"System.Runtime": "4.0.0.0"
21+
}
22+
},
23+
"dnx451": {
24+
"frameworkAssemblies": {
25+
"System": "4.0.0.0",
26+
"System.Runtime": "4.0.10.0"
27+
},
28+
"dependencies": {
29+
"FSharp.Dnx": {
30+
"type": "build",
31+
"version": "1.0.0-*"
32+
},
33+
"xunit.runner.dnx": "2.1.0-rc1-build204"
34+
}
35+
}
36+
},
37+
38+
"compiler": {
39+
"name": "F#",
40+
"compilerAssembly": "FSharp.Dnx",
41+
"compilerType": "FSharp.Dnx.FSharpProjectCompiler"
42+
},
43+
44+
"fsharp": {
45+
"files": [
46+
"AssemblyInfo.fs",
47+
"Program.fs"
48+
]
49+
}
50+
}

0 commit comments

Comments
 (0)