From 3d353c8dc174c88b637da9808e2478151b90c7d1 Mon Sep 17 00:00:00 2001 From: Matthew Erbs Date: Wed, 15 Jun 2016 08:12:05 +1000 Subject: [PATCH] Moved to isolated perf test scripts --- RunPerfTests.ps1 | 21 +++++++++++++++++++++ build.sh | 3 +-- run_perf_tests.sh | 10 ++++++++++ 3 files changed, 32 insertions(+), 2 deletions(-) create mode 100644 RunPerfTests.ps1 create mode 100755 run_perf_tests.sh diff --git a/RunPerfTests.ps1 b/RunPerfTests.ps1 new file mode 100644 index 000000000..8e83073ce --- /dev/null +++ b/RunPerfTests.ps1 @@ -0,0 +1,21 @@ +Push-Location $PSScriptRoot + +if(Test-Path .\artifacts) { Remove-Item .\artifacts -Force -Recurse } + +& dotnet restore + +$revision = @{ $true = $env:APPVEYOR_BUILD_NUMBER; $false = 1 }[$env:APPVEYOR_BUILD_NUMBER -ne $NULL]; + +Push-Location src/Serilog + +& dotnet build -c Release -o ..\..\.\artifacts --version-suffix=$revision +if($LASTEXITCODE -ne 0) { exit 1 } + +Pop-Location +Push-Location test/Serilog.PerformanceTests + +& dotnet test -c Release +if($LASTEXITCODE -ne 0) { exit 2 } + +Pop-Location +Pop-Location diff --git a/build.sh b/build.sh index 6c0a70578..ff84facad 100755 --- a/build.sh +++ b/build.sh @@ -13,6 +13,5 @@ done for path in test/Serilog.PerformanceTests/project.json; do dirname="$(dirname "${path}")" - dotnet build ${dirname} -f netcoreapp1.0 -c Release - dotnet test ${dirname} -f netcoreapp1.0 -c Release + dotnet build ${dirname} -f netcoreapp1.0 -c Release done \ No newline at end of file diff --git a/run_perf_tests.sh b/run_perf_tests.sh new file mode 100755 index 000000000..18403fd8e --- /dev/null +++ b/run_perf_tests.sh @@ -0,0 +1,10 @@ +#!/bin/bash +dotnet restore +for path in src/*/project.json; do + dirname="$(dirname "${path}")" + dotnet build ${dirname} -c Release +done +for path in test/Serilog.PerformanceTests/project.json; do + dirname="$(dirname "${path}")" + dotnet test ${dirname} -f netcoreapp1.0 -c Release +done \ No newline at end of file