Skip to content

Azure CI should fail on test failures #23453

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

Closed
alimcmaster1 opened this issue Nov 1, 2018 · 1 comment · Fixed by #23454
Closed

Azure CI should fail on test failures #23453

alimcmaster1 opened this issue Nov 1, 2018 · 1 comment · Fixed by #23454
Labels
CI Continuous Integration

Comments

@alimcmaster1
Copy link
Member

As per title I imagine this is something we would like?

This CI build seems to have status green on Azure despite the fact tests seem to be failing on MacOS-35, or am I missing something?

Issue found on this PR.

This seems to be related microsoft/azure-pipelines-tasks#1268.

@gfyoung gfyoung added the CI Continuous Integration label Nov 1, 2018
@TomAugspurger
Copy link
Contributor

From
microsoft/azure-pipelines-tasks#1268 (comment)

- powershell: |
    $junitXml = "junit/unit-test.xml"
    $(Get-Content $junitXml | Out-String) -match 'failures="(.*?)"'
    if ($matches[1] -eq 0)
    {
      Write-Host "No test failures"
    }
    else
    {
      # note that this will produce $LASTEXITCODE=1
      Write-Error "$($matches[1]) tests failed"
    }
  displayName: Check for test failures

we'd need to change that to test-data-single.xml and test-data-multi.xml and exit with a failure if either of those contain failures or errors.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CI Continuous Integration
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants