Skip to content

Commit

Permalink
upgrade to target netcoreapp1.1
Browse files Browse the repository at this point in the history
  • Loading branch information
heynickc committed May 18, 2017
1 parent 7d731f4 commit 5e63684
Show file tree
Hide file tree
Showing 8 changed files with 24 additions and 23 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -204,3 +204,4 @@ build/
.nuget/
.dotnet/
.idea/.idea.NBench.NetCore/.idea/*
launchSettings.json
20 changes: 10 additions & 10 deletions build.fsx
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ Target "Build" (fun _ ->
(fun p ->
{ p with
Project = project
Framework = "netcoreapp1.0"
Framework = "netcoreapp1.1"
Configuration = configuration })

let netCoreProjects = (!! "./src/**/*NBench.Runner.DotNetCli.csproj"
Expand Down Expand Up @@ -127,7 +127,7 @@ Target "RunTests" (fun _ ->
(fun p ->
{ p with
Project = project
Framework = "netcoreapp1.0"
Framework = "netcoreapp1.1"
Configuration = configuration})

let projects = (!! "./tests/**/*NBench.Tests*.csproj"
Expand Down Expand Up @@ -174,10 +174,10 @@ Target "NBench" <| fun _ ->
Project = netCoreNbenchRunnerProject
Configuration = configuration
Runtime = "win7-x64"
Framework = "netcoreapp1.0"})
Framework = "netcoreapp1.1"})

let netCoreNbenchRunner = findToolInSubPath "dotnet-nbench.exe" "/src/NBench.Runner.DotNetCli/bin/Release/netcoreapp1.0/win7-x64/"
let netCoreAssembly = __SOURCE_DIRECTORY__ @@ "/tests/NBench.Tests.Performance/bin/Release/netcoreapp1.0/NBench.Tests.Performance.dll"
let netCoreNbenchRunner = findToolInSubPath "dotnet-nbench.exe" "/src/NBench.Runner.DotNetCli/bin/Release/netcoreapp1.1/win7-x64/"
let netCoreAssembly = __SOURCE_DIRECTORY__ @@ "/tests/NBench.Tests.Performance/bin/Release/netcoreapp1.1/NBench.Tests.Performance.dll"

let netCoreNbenchRunnerArgs = new StringBuilder()
|> append netCoreAssembly
Expand Down Expand Up @@ -206,10 +206,10 @@ Target "NBench" <| fun _ ->
Project = netCoreNbenchRunnerProject
Configuration = configuration
Runtime = "debian.8-x64"
Framework = "netcoreapp1.0"})
Framework = "netcoreapp1.1"})

let linuxNbenchRunner = __SOURCE_DIRECTORY__ @@ "/src/NBench.Runner.DotNetCli/bin/Release/netcoreapp1.0/debian.8-x64/dotnet-nbench"
let linuxPerfAssembly = __SOURCE_DIRECTORY__ @@ "/tests/NBench.Tests.Performance/bin/Release/netcoreapp1.0/NBench.Tests.Performance.dll"
let linuxNbenchRunner = __SOURCE_DIRECTORY__ @@ "/src/NBench.Runner.DotNetCli/bin/Release/netcoreapp1.1/debian.8-x64/dotnet-nbench"
let linuxPerfAssembly = __SOURCE_DIRECTORY__ @@ "/tests/NBench.Tests.Performance/bin/Release/netcoreapp1.1/NBench.Tests.Performance.dll"

let linuxNbenchRunnerArgs = new StringBuilder()
|> append linuxPerfAssembly
Expand All @@ -220,7 +220,7 @@ Target "NBench" <| fun _ ->

let result = ExecProcess(fun info ->
info.FileName <- linuxNbenchRunner
info.WorkingDirectory <- __SOURCE_DIRECTORY__ @@ "/src/NBench.Runner.DotNetCli/bin/Release/netcoreapp1.0/debian.8-x64/"
info.WorkingDirectory <- __SOURCE_DIRECTORY__ @@ "/src/NBench.Runner.DotNetCli/bin/Release/netcoreapp1.1/debian.8-x64/"
info.Arguments <- linuxNbenchRunnerArgs) (System.TimeSpan.FromMinutes 15.0) (* Reasonably long-running task. *)
if result <> 0 then failwithf "NBench.Runner failed. %s %s" linuxNbenchRunner linuxNbenchRunnerArgs

Expand All @@ -245,7 +245,7 @@ Target "CopyOutput" (fun _ ->
projects |> List.iter (fun p -> publishSingleProjectNet45 p)

let netCoreProjects = [ ("NBench", "./src/NBench/NBench.csproj", "netstandard1.6");
("NBench.Runner.DotNetCli", "./src/NBench.Runner.DotNetCli/NBench.Runner.DotNetCli.csproj", "netcoreapp1.0") ]
("NBench.Runner.DotNetCli", "./src/NBench.Runner.DotNetCli/NBench.Runner.DotNetCli.csproj", "netcoreapp1.1") ]

let publishSingleProjectNetCoreApp project =
let projectName, projectPath, projectFramework = project
Expand Down
2 changes: 1 addition & 1 deletion src/NBench.Runner.DotNetCli/NBench.Runner.DotNetCli.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<AssemblyName>dotnet-nbench</AssemblyName>
<VersionPrefix>1.0.1</VersionPrefix>
<Authors>Petabridge</Authors>
<TargetFrameworks>netcoreapp1.0</TargetFrameworks>
<TargetFrameworks>netcoreapp1.1</TargetFrameworks>
<OutputType>Exe</OutputType>
<RuntimeIdentifiers>win7-x64;osx.10.10-x64;osx.10.11-x64;ubuntu.14.04-x64;ubuntu.16.04-x64;centos.7-x64;rhel.7.2-x64;debian.8-x64;fedora.23-x64;opensuse.13.2-x64</RuntimeIdentifiers>
<PackageType>DotnetCliTool</PackageType>
Expand Down
6 changes: 3 additions & 3 deletions tests/NBench.Tests.Assembly/NBench.Tests.Assembly.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>net452;netcoreapp1.0</TargetFrameworks>
<TargetFrameworks>net452;netcoreapp1.1</TargetFrameworks>
</PropertyGroup>

<ItemGroup>
Expand All @@ -12,7 +12,7 @@
<ProjectReference Include="..\..\src\NBench\NBench.csproj" />
</ItemGroup>

<ItemGroup Condition=" '$(TargetFramework)' == 'netcoreapp1.0' ">
<ItemGroup Condition=" '$(TargetFramework)' == 'netcoreapp1.1' ">
<PackageReference Include="Microsoft.Extensions.Configuration" Version="1.1.0" />
<PackageReference Include="Microsoft.Extensions.Configuration.Xml" Version="1.1.0" />
</ItemGroup>
Expand All @@ -27,7 +27,7 @@
<DefineConstants>$(DefineConstants);THREADPOOL;APPDOMAIN;SERIALIZATION</DefineConstants>
</PropertyGroup>

<PropertyGroup Condition=" '$(TargetFramework)' == 'netcoreapp1.0' ">
<PropertyGroup Condition=" '$(TargetFramework)' == 'netcoreapp1.1' ">
<DefineConstants>$(DefineConstants);CORECLR</DefineConstants>
</PropertyGroup>

Expand Down
6 changes: 3 additions & 3 deletions tests/NBench.Tests.End2End/NBench.Tests.End2End.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>net46;netcoreapp1.0</TargetFrameworks>
<TargetFrameworks>net46;netcoreapp1.1</TargetFrameworks>
</PropertyGroup>

<ItemGroup>
Expand All @@ -21,7 +21,7 @@
<PackageReference Include="ApprovalTests" Version="3.0.13" />
</ItemGroup>

<ItemGroup Condition=" '$(TargetFramework)' == 'netcoreapp1.0' ">
<ItemGroup Condition=" '$(TargetFramework)' == 'netcoreapp1.1' ">
<PackageReference Include="Microsoft.Extensions.Configuration" Version="1.1.0" />
<PackageReference Include="Microsoft.Extensions.Configuration.Xml" Version="1.1.0" />
</ItemGroup>
Expand All @@ -36,7 +36,7 @@
<DefineConstants>$(DefineConstants);THREADPOOL;APPDOMAIN;SERIALIZATION</DefineConstants>
</PropertyGroup>

<PropertyGroup Condition=" '$(TargetFramework)' == 'netcoreapp1.0' ">
<PropertyGroup Condition=" '$(TargetFramework)' == 'netcoreapp1.1' ">
<DefineConstants>$(DefineConstants);CORECLR</DefineConstants>
</PropertyGroup>

Expand Down
4 changes: 2 additions & 2 deletions tests/NBench.Tests.End2End/NBenchIntregrationTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -100,13 +100,13 @@ public void RunnerExcludePattern()
private static TestPackage LoadPackage(IEnumerable<string> include = null, IEnumerable<string> exclude = null)
{
#if CORECLR
var assemblySubfolder = "netcoreapp1.0";
var assemblySubfolder = "netcoreapp1.1";
#else
var assemblySubfolder = "net452";
#endif

#if DEBUG
var package = new TestPackage(".." + Path.DirectorySeparatorChar + ".." + Path.DirectorySeparatorChar + ".." + Path.DirectorySeparatorChar + ".." + Path.DirectorySeparatorChar + "NBench.Tests.Assembly" + Path.DirectorySeparatorChar + "bin" + Path.DirectorySeparatorChar + "Debug" + Path.DirectorySeparatorChar + assemblySubfolder + Path.DirectorySeparatorChar + "NBench.Tests.Assembly.dll", include, exclude);
var package = new TestPackage(".." + Path.DirectorySeparatorChar + ".." + Path.DirectorySeparatorChar + ".." + Path.DirectorySeparatorChar + ".." + Path.DirectorySeparatorChar + "NBench.Tests.Assembly" + Path.DirectorySeparatorChar + "bin" + Path.DirectorySeparatorChar + "Release" + Path.DirectorySeparatorChar + assemblySubfolder + Path.DirectorySeparatorChar + "NBench.Tests.Assembly.dll", include, exclude);
#else
var package = new TestPackage(".." + Path.DirectorySeparatorChar + ".."+ Path.DirectorySeparatorChar + ".." + Path.DirectorySeparatorChar + ".." + Path.DirectorySeparatorChar + "NBench.Tests.Assembly" + Path.DirectorySeparatorChar + "bin" + Path.DirectorySeparatorChar + "Release" + Path.DirectorySeparatorChar + assemblySubfolder + Path.DirectorySeparatorChar + "NBench.Tests.Assembly.dll", include, exclude);
#endif
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>net452;netcoreapp1.0</TargetFrameworks>
<TargetFrameworks>net452;netcoreapp1.1</TargetFrameworks>
</PropertyGroup>

<ItemGroup>
Expand All @@ -23,7 +23,7 @@
<DefineConstants>$(DefineConstants);THREADPOOL;APPDOMAIN;SERIALIZATION</DefineConstants>
</PropertyGroup>

<PropertyGroup Condition=" '$(TargetFramework)' == 'netcoreapp1.0' ">
<PropertyGroup Condition=" '$(TargetFramework)' == 'netcoreapp1.1' ">
<DefineConstants>$(DefineConstants);CORECLR</DefineConstants>
</PropertyGroup>

Expand Down
4 changes: 2 additions & 2 deletions tests/NBench.Tests/NBench.Tests.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>net46;netcoreapp1.0</TargetFrameworks>
<TargetFrameworks>net46;netcoreapp1.1</TargetFrameworks>
</PropertyGroup>

<ItemGroup>
Expand All @@ -24,7 +24,7 @@
<DefineConstants>$(DefineConstants);THREADPOOL;APPDOMAIN;SERIALIZATION</DefineConstants>
</PropertyGroup>

<PropertyGroup Condition=" '$(TargetFramework)' == 'netcoreapp1.0' ">
<PropertyGroup Condition=" '$(TargetFramework)' == 'netcoreapp1.1' ">
<DefineConstants>$(DefineConstants);CORECLR</DefineConstants>
</PropertyGroup>

Expand Down

0 comments on commit 5e63684

Please sign in to comment.