Skip to content

Fail Azure CI for failing tests #23454

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 10 commits into from
Nov 7, 2018
25 changes: 25 additions & 0 deletions ci/azure/linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,3 +54,28 @@ jobs:
inputs:
testResultsFiles: 'test-data-*.xml'
testRunTitle: 'Linux'
- powershell: |
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@alimcmaster1 any idea if there is a way to do this in bash? xref #30393 the two remaining places where we do this are among the last windows-special-casing left

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure let me take a look - unless we are moving the CI to github actions soon? #29715 @datapythonista in which case I might wait for that to happen.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not so soon - things will move gradually and smooothly

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It will take time, and besides what Jeff said, it's not yet clear that GitHub will give us all the workers we need, so may be we need to keep Azure in the long term.

$junitXml = "test-data-single.xml"
$(Get-Content $junitXml | Out-String) -match 'failures="(.*?)"'
if ($matches[1] -eq 0)
{
Write-Host "No test failures in test-data-single"
}
else
{
# note that this will produce $LASTEXITCODE=1
Write-Error "$($matches[1]) tests failed"
}

$junitXmlMulti = "test-data-multiple.xml"
$(Get-Content $junitXmlMulti | Out-String) -match 'failures="(.*?)"'
if ($matches[1] -eq 0)
{
Write-Host "No test failures in test-data-multi"
}
else
{
# note that this will produce $LASTEXITCODE=1
Write-Error "$($matches[1]) tests failed"
}
displayName: Check for test failures
25 changes: 25 additions & 0 deletions ci/azure/macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,3 +41,28 @@ jobs:
inputs:
testResultsFiles: 'test-data-*.xml'
testRunTitle: 'MacOS-35'
- powershell: |
$junitXml = "test-data-single.xml"
$(Get-Content $junitXml | Out-String) -match 'failures="(.*?)"'
if ($matches[1] -eq 0)
{
Write-Host "No test failures in test-data-single"
}
else
{
# note that this will produce $LASTEXITCODE=1
Write-Error "$($matches[1]) tests failed"
}

$junitXmlMulti = "test-data-multiple.xml"
$(Get-Content $junitXmlMulti | Out-String) -match 'failures="(.*?)"'
if ($matches[1] -eq 0)
{
Write-Host "No test failures in test-data-multi"
}
else
{
# note that this will produce $LASTEXITCODE=1
Write-Error "$($matches[1]) tests failed"
}
displayName: Check for test failures
13 changes: 13 additions & 0 deletions ci/azure/windows-py27.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,3 +43,16 @@ jobs:
inputs:
testResultsFiles: 'test-data.xml'
testRunTitle: 'Windows 27'
- powershell: |
$junitXml = "test-data.xml"
$(Get-Content $junitXml | Out-String) -match 'failures="(.*?)"'
if ($matches[1] -eq 0)
{
Write-Host "No test failures in test-data"
}
else
{
# note that this will produce $LASTEXITCODE=1
Write-Error "$($matches[1]) tests failed"
}
displayName: Check for test failures
13 changes: 13 additions & 0 deletions ci/azure/windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,3 +34,16 @@ jobs:
inputs:
testResultsFiles: 'test-data.xml'
testRunTitle: 'Windows 36'
- powershell: |
$junitXml = "test-data.xml"
$(Get-Content $junitXml | Out-String) -match 'failures="(.*?)"'
if ($matches[1] -eq 0)
{
Write-Host "No test failures in test-data"
}
else
{
# note that this will produce $LASTEXITCODE=1
Write-Error "$($matches[1]) tests failed"
}
displayName: Check for test failures
2 changes: 1 addition & 1 deletion ci/deps/azure-macos-35.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ dependencies:
- nomkl
- numexpr
- numpy=1.12.0
- openpyxl
- openpyxl=2.5.5
- pytables
- python=3.5*
- pytz
Expand Down