Skip to content

CI: Add print skipped tests into azure step #26698

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 7 commits into from
Jun 10, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
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
7 changes: 1 addition & 6 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -103,10 +103,5 @@ script:
after_script:
- echo "after_script start"
- source activate pandas-dev && pushd /tmp && python -c "import pandas; pandas.show_versions();" && popd
- if [ -e test-data-single.xml ]; then
ci/print_skipped.py test-data-single.xml;
fi
- if [ -e test-data-multiple.xml ]; then
ci/print_skipped.py test-data-multiple.xml;
fi
- ci/print_skipped.py
- echo "after_script done"
7 changes: 6 additions & 1 deletion ci/azure/posix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -89,4 +89,9 @@ jobs:
# note that this will produce $LASTEXITCODE=1
Write-Error "$($matches[1]) tests failed"
}
displayName: Check for test failures
displayName: 'Check for test failures'
- script: |
export PATH=$HOME/miniconda3/bin:$PATH
source activate pandas-dev
python ci/print_skipped.py
displayName: 'Print skipped tests'
11 changes: 8 additions & 3 deletions ci/azure/windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@ jobs:

steps:
- powershell: Write-Host "##vso[task.prependpath]$env:CONDA\Scripts"
displayName: Add conda to PATH
displayName: 'Add conda to PATH'
- script: conda update -q -n base conda
displayName: Update conda
- script: conda env create -q --file ci\\deps\\azure-windows-$(CONDA_PY).yaml
displayName: Create anaconda environment
displayName: 'Create anaconda environment'
- script: |
call activate pandas-dev
call conda list
Expand All @@ -48,4 +48,9 @@ jobs:
# note that this will produce $LASTEXITCODE=1
Write-Error "$($matches[1]) tests failed"
}
displayName: Check for test failures
displayName: 'Check for test failures'
- script: |
export PATH=$HOME/miniconda3/bin:$PATH
source activate pandas-dev
python ci/print_skipped.py
displayName: 'Print skipped tests'
23 changes: 12 additions & 11 deletions ci/print_skipped.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#!/usr/bin/env python

import os
import sys
import math
import xml.etree.ElementTree as et
Expand Down Expand Up @@ -36,19 +37,19 @@ def parse_results(filename):
return '\n'.join(skipped)


def main(args):
def main():
test_files = [
'test-data-single.xml',
'test-data-multiple.xml',
'test-data.xml',
]

print('SKIPPED TESTS:')
for fn in args.filename:
print(parse_results(fn))
for fn in test_files:
if os.path.isfile(fn):
print(parse_results(fn))
return 0


def parse_args():
import argparse
parser = argparse.ArgumentParser()
parser.add_argument('filename', nargs='+', help='XUnit file to parse')
return parser.parse_args()


if __name__ == '__main__':
sys.exit(main(parse_args()))
sys.exit(main())