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

Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Update AppVeyor comments and show when tests start.
  • Loading branch information
vmuriart committed Feb 8, 2017
commit 0e051f0b83ded0be0ba1e49a415c4d7bc5d7ae29
4 changes: 3 additions & 1 deletion ci/appveyor_run_tests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -12,20 +12,22 @@ $RUNTIME_DIR = ".\src\runtime\bin\"

# Run python tests with C# coverage
# why `2>&1 | %{ "$_" }`? see: http://stackoverflow.com/a/20950421/5208670
Write-Host ("Starting Python tests") -ForegroundColor "Green"
.$OPENCOVER -register:user -searchdirs:"$RUNTIME_DIR" -output:py.coverage -target:"$PY" -targetargs:src\tests\runtests.py -returntargetcode 2>&1 | %{ "$_" }
$PYTHON_STATUS = $LastExitCode
if ($PYTHON_STATUS -ne 0) {
Write-Host "Python tests failed, continuing to embedded tests" -ForegroundColor "Red"
}

# Run Embedded tests with C# coverage
Write-Host ("Starting embedded tests") -ForegroundColor "Green"
.$OPENCOVER -register:user -searchdirs:"$RUNTIME_DIR" -output:cs.coverage -target:"$NUNIT" -targetargs:"$CS_TESTS" -returntargetcode
$NUNIT_STATUS = $LastExitCode
if ($NUNIT_STATUS -ne 0) {
Write-Host "Embedded tests failed" -ForegroundColor "Red"
}

# Embedded tests failing due to open issues, pass/fail only on Python exit code
# Set exit code to fail if either Python or Embedded tests failed
if ($PYTHON_STATUS -ne 0 -or $NUNIT_STATUS -ne 0) {
Write-Host "Tests failed" -ForegroundColor "Red"
$host.SetShouldExit(1)
Expand Down