Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit ad92f96

Browse files
committed
attempted to add performance tests to CI
1 parent 2e28711 commit ad92f96

File tree

4 files changed

+18
-2
lines changed

4 files changed

+18
-2
lines changed

ci/appveyor_run_tests.ps1

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,15 @@ Write-Host ("Starting embedded tests") -ForegroundColor "Green"
4242
$CS_STATUS = $LastExitCode
4343
if ($CS_STATUS -ne 0) {
4444
Write-Host "Embedded tests failed" -ForegroundColor "Red"
45+
} else {
46+
# Run C# Performance tests
47+
Write-Host ("Starting performance tests") -ForegroundColor "Green"
48+
$CS_PERF_TESTS = ".\src\perf_tests\bin\Python.PerformanceTests.dll"
49+
&"$CS_RUNNER" "$CS_PERF_TESTS"
50+
$CS_PERF_STATUS = $LastExitCode
51+
if ($CS_PERF_STATUS -ne 0) {
52+
Write-Host "Performance tests (C#) failed" -ForegroundColor "Red"
53+
}
4554
}
4655

4756
if ($env:BUILD_OPTS -eq "--xplat"){
@@ -62,7 +71,7 @@ if ($env:BUILD_OPTS -eq "--xplat"){
6271
}
6372

6473
# Set exit code to fail if either Python or Embedded tests failed
65-
if ($PYTHON_STATUS -ne 0 -or $CS_STATUS -ne 0) {
74+
if ($PYTHON_STATUS -ne 0 -or $CS_STATUS -ne 0 -or $CS_PERF_STATUS -ne 0) {
6675
Write-Host "Tests failed" -ForegroundColor "Red"
6776
$host.SetShouldExit(1)
6877
}

pythonnet.15.sln

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,12 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Repo", "Repo", "{441A0123-F
1919
.editorconfig = .editorconfig
2020
EndProjectSection
2121
EndProject
22+
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "CI", "CI", "{D301657F-5EAF-4534-B280-B858D651B2E5}"
23+
ProjectSection(SolutionItems) = preProject
24+
ci\appveyor_build_recipe.ps1 = ci\appveyor_build_recipe.ps1
25+
ci\appveyor_run_tests.ps1 = ci\appveyor_run_tests.ps1
26+
EndProjectSection
27+
EndProject
2228
Global
2329
GlobalSection(SolutionConfigurationPlatforms) = preSolution
2430
Debug|Any CPU = Debug|Any CPU

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -356,7 +356,7 @@ def build_extension(self, ext):
356356
" ".join(
357357
cmd
358358
+ [
359-
'"/t:Console_15:publish;Python_EmbeddingTest_15:publish"',
359+
'"/t:Console_15:publish;Python_EmbeddingTest_15:publish;Python_PerformanceTests:publish"',
360360
"/p:TargetFramework=netcoreapp2.0",
361361
]
362362
),

src/perf_tests/Python.PerformanceTests.csproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
<PropertyGroup>
44
<TargetFramework>net461</TargetFramework>
55
<Configurations>DebugMono;DebugMonoPY3;ReleaseMono;ReleaseMonoPY3;DebugWin;DebugWinPY3;ReleaseWin;ReleaseWinPY3</Configurations>
6+
<OutputPath>bin\</OutputPath>
67

78
<IsPackable>false</IsPackable>
89
</PropertyGroup>

0 commit comments

Comments
 (0)