diff --git a/.travis.yml b/.travis.yml index 96dba262ebfb6..eecb4a1695fd6 100644 --- a/.travis.yml +++ b/.travis.yml @@ -49,3 +49,4 @@ script: after_script: - ci/print_versions.py + - ci/print_skipped.py /tmp/nosetests.xml diff --git a/ci/print_skipped.py b/ci/print_skipped.py new file mode 100755 index 0000000000000..9fb05df64bcea --- /dev/null +++ b/ci/print_skipped.py @@ -0,0 +1,51 @@ +#!/usr/bin/env python + +import sys +import math +import xml.etree.ElementTree as et + + +def parse_results(filename): + tree = et.parse(filename) + root = tree.getroot() + skipped = [] + + current_class = old_class = '' + i = 1 + assert i - 1 == len(skipped) + for el in root.findall('testcase'): + cn = el.attrib['classname'] + for sk in el.findall('skipped'): + old_class = current_class + current_class = cn + name = '{classname}.{name}'.format(classname=current_class, + name=el.attrib['name']) + msg = sk.attrib['message'] + out = '' + if old_class != current_class: + ndigits = int(math.log(i, 10) + 1) + out += ('-' * (len(name + msg) + 4 + ndigits) + '\n') # 4 for : + space + # + space + out += '#{i} {name}: {msg}'.format(i=i, name=name, msg=msg) + skipped.append(out) + i += 1 + assert i - 1 == len(skipped) + assert i - 1 == len(skipped) + assert len(skipped) == int(root.attrib['skip']) + return '\n'.join(skipped) + + +def main(args): + print('SKIPPED TESTS:') + print(parse_results(args.filename)) + return 0 + + +def parse_args(): + import argparse + parser = argparse.ArgumentParser() + parser.add_argument('filename', help='XUnit file to parse') + return parser.parse_args() + + +if __name__ == '__main__': + sys.exit(main(parse_args())) diff --git a/ci/script.sh b/ci/script.sh index 9721139091c7b..e8c3cf66bd9ba 100755 --- a/ci/script.sh +++ b/ci/script.sh @@ -9,10 +9,5 @@ if [ x"$LOCALE_OVERRIDE" != x"" ]; then fi -echo nosetests --exe -w /tmp -A "$NOSE_ARGS" pandas; -nosetests --exe -w /tmp -A "$NOSE_ARGS" pandas; - -# if [ x"$VBENCH" == x"true" ]; then -# python vb_suite/perf_HEAD.py; -# exit -# fi +echo nosetests --exe -w /tmp -A "$NOSE_ARGS" pandas --with-xunit --xunit-file=/tmp/nosetests.xml +nosetests --exe -w /tmp -A "$NOSE_ARGS" pandas --with-xunit --xunit-file=/tmp/nosetests.xml