From 4bf4f67aed90b66273bae43e5dc60b4b44fb34b9 Mon Sep 17 00:00:00 2001 From: Nicholas Blumhardt Date: Sat, 31 Oct 2015 23:00:18 +1000 Subject: [PATCH] Fixed build and test. --- Build.ps1 | 2 +- Serilog.sln | 1 + test/Serilog.Tests/Context/LogContextTests.cs | 8 +++++++- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/Build.ps1 b/Build.ps1 index ee1a8d889..933708e8c 100644 --- a/Build.ps1 +++ b/Build.ps1 @@ -40,7 +40,7 @@ function Build-Projects function Test-Projects { param([string] $DirectoryName) - & dnx ("""" + $DirectoryName + """") test; if($LASTEXITCODE -ne 0) { exit 2 } + & dnx -p ("""" + $DirectoryName + """") test; if($LASTEXITCODE -ne 0) { exit 2 } } function Remove-PathVariable diff --git a/Serilog.sln b/Serilog.sln index f2b4bfb3e..f725e1bfd 100644 --- a/Serilog.sln +++ b/Serilog.sln @@ -12,6 +12,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "assets", "assets", "{E9D1B5 .editorconfig = .editorconfig Build.ps1 = Build.ps1 assets\CommonAssemblyInfo.cs = assets\CommonAssemblyInfo.cs + global.json = global.json NuGet.Config = NuGet.Config README.md = README.md assets\Serilog.snk = assets\Serilog.snk diff --git a/test/Serilog.Tests/Context/LogContextTests.cs b/test/Serilog.Tests/Context/LogContextTests.cs index d6a65d2b9..58cdd2f36 100644 --- a/test/Serilog.Tests/Context/LogContextTests.cs +++ b/test/Serilog.Tests/Context/LogContextTests.cs @@ -145,6 +145,12 @@ public async Task ContextPropertiesPersistWhenCrossAppDomainCallsAreEnabled() [Fact] public void DoesNotPreventCrossDomainCalls() { + var projectRoot = Environment.CurrentDirectory; + while (!File.Exists(Path.Combine(projectRoot, "global.json"))) + { + projectRoot = Directory.GetParent(projectRoot).FullName; + } + AppDomain domain = null; try { @@ -157,7 +163,7 @@ public void DoesNotPreventCrossDomainCalls() var domaininfo = new AppDomainSetup { - ApplicationBase = @"..\..\artifacts\bin\", + ApplicationBase = Path.Combine(projectRoot, @"artifacts\bin\"), PrivateBinPath = @"Serilog\Debug\dnx451;Serilog.Tests\Debug\dnx451".Replace("Debug", configuration) }; var evidence = AppDomain.CurrentDomain.Evidence;