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 5 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"
5 changes: 5 additions & 0 deletions ci/azure/posix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -90,3 +90,8 @@ jobs:
Write-Error "$($matches[1]) tests failed"
}
displayName: Check for test failures
Copy link
Member

Choose a reason for hiding this comment

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

Can you have this in quotes as the rest of displayName properties in the fie? Looks like they are not needed, but better to have it consistent.

- script: |
export PATH=$HOME/miniconda3/bin:$PATH
source activate pandas-dev
python ci/print_skipped.py
displayName: 'print skipped test'
Copy link
Member

Choose a reason for hiding this comment

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

Can you capitalize the p and use tests instead of test? so the display name is Print skipped tests

5 changes: 5 additions & 0 deletions ci/azure/windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,3 +49,8 @@ jobs:
Write-Error "$($matches[1]) tests failed"
}
displayName: Check for test failures
- script: |
export PATH=$HOME/miniconda3/bin:$PATH
source activate pandas-dev
python ci/print_skipped.py
displayName: 'print skipped test'
Copy link
Member

Choose a reason for hiding this comment

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

Same changes as in the other file

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())