Skip to content
This repository was archived by the owner on Jul 22, 2023. It is now read-only.

Commit c64e34e

Browse files
committed
Rename NUnit vars to generic names
Makes it easier to switch test-runners in the future. Note the if section is being skipped for NUnit3, but leaving it in case needed to rollback to NUnit2, or upgrade to XUnit
1 parent 4ecde5b commit c64e34e

File tree

2 files changed

+14
-8
lines changed

2 files changed

+14
-8
lines changed

appveyor.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ environment:
1010
PYTHONUNBUFFERED: True
1111
PYTHONWARNINGS: 'ignore:::wheel.pep425tags:'
1212
PYTHONPATH: C:\testdir
13-
NUNIT: nunit3-console
1413
CONDA_BLD: C:\miniconda35
1514

1615
matrix:
@@ -29,7 +28,6 @@ init:
2928
- set CONDA_BLD_ARCH=%PLATFORM:x=%
3029
- set PYTHON=C:\PYTHON%PYTHON_VERSION:.=%
3130
- if %PLATFORM%==x86 (set CONDA_BLD_ARCH=32)
32-
# - if %PLATFORM%==x86 (set NUNIT=%NUNIT%-x86)
3331
- if %PLATFORM%==x64 (set PYTHON=%PYTHON%-x64)
3432
- if %PLATFORM%==x64 (set CONDA_BLD=%CONDA_BLD%-x64)
3533

ci/appveyor_run_tests.ps1

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,17 @@
1-
# Script to simplify appveyor configuration and resolve path to tools
1+
# Script to simplify AppVeyor configuration and resolve path to tools
2+
3+
# Test Runner framework being used for embedded tests
4+
$CS_RUNNER = "nunit3-console"
5+
6+
# Needed for ARCH specific runners(NUnit2/XUnit3). Skip for NUnit3
7+
if ($FALSE -and $env:PLATFORM -eq "x86"){
8+
$CS_RUNNER = $CS_RUNNER + "-x86"
9+
}
210

311
# Executable paths for OpenCover
412
# Note if OpenCover fails, it won't affect the exit codes.
513
$OPENCOVER = Resolve-Path .\packages\OpenCover.*\tools\OpenCover.Console.exe
6-
$NUNIT = Resolve-Path .\packages\NUnit.*\tools\"$env:NUNIT".exe
14+
$CS_RUNNER = Resolve-Path .\packages\NUnit.*\tools\"$CS_RUNNER".exe
715
$PY = Get-Command python
816

917
# Can't use ".\build\*\Python.EmbeddingTest.dll". Missing framework files.
@@ -27,16 +35,16 @@ if ($PYTHON_STATUS -ne 0) {
2735
# Powershell options splatting: http://stackoverflow.com/a/24313253/5208670
2836
Write-Host ("Starting embedded tests") -ForegroundColor "Green"
2937
.$OPENCOVER -register:user -searchdirs:"$RUNTIME_DIR" -output:cs.coverage `
30-
-target:"$NUNIT" -targetargs:"$CS_TESTS" `
38+
-target:"$CS_RUNNER" -targetargs:"$CS_TESTS" `
3139
-filter:"+[*]Python.Runtime*" `
3240
-returntargetcode
33-
$NUNIT_STATUS = $LastExitCode
34-
if ($NUNIT_STATUS -ne 0) {
41+
$CS_STATUS = $LastExitCode
42+
if ($CS_STATUS -ne 0) {
3543
Write-Host "Embedded tests failed" -ForegroundColor "Red"
3644
}
3745

3846
# Set exit code to fail if either Python or Embedded tests failed
39-
if ($PYTHON_STATUS -ne 0 -or $NUNIT_STATUS -ne 0) {
47+
if ($PYTHON_STATUS -ne 0 -or $CS_STATUS -ne 0) {
4048
Write-Host "Tests failed" -ForegroundColor "Red"
4149
$host.SetShouldExit(1)
4250
}

0 commit comments

Comments
 (0)