From e06ebb88a443ec172e9393904747cd256b5a786c Mon Sep 17 00:00:00 2001 From: chuanzhu xu Date: Thu, 6 Jun 2019 21:43:37 -0400 Subject: [PATCH 1/6] Add print skiped into azure step --- azure-pipelines.yml | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 85325c52e7e6d..d52e89bdfc013 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -116,3 +116,15 @@ jobs: fi displayName: 'Running benchmarks' condition: true + + - script: | + export PATH=$HOME/miniconda3/bin:$PATH + source activate pandas-dev + 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 + displayName: 'Printing Skipped test' + condition: true From 69a9cbcf23c326cb777fd87c9e92c3e2d02c805b Mon Sep 17 00:00:00 2001 From: chuanzhu xu Date: Thu, 6 Jun 2019 21:43:37 -0400 Subject: [PATCH 2/6] Revert "Add print skiped into azure step" This reverts commit e06ebb88a443ec172e9393904747cd256b5a786c. --- azure-pipelines.yml | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index d52e89bdfc013..85325c52e7e6d 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -116,15 +116,3 @@ jobs: fi displayName: 'Running benchmarks' condition: true - - - script: | - export PATH=$HOME/miniconda3/bin:$PATH - source activate pandas-dev - 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 - displayName: 'Printing Skipped test' - condition: true From 181c09aa9fcd83157ea414b204a3b538fd02017e Mon Sep 17 00:00:00 2001 From: Chuanzhu Xu Date: Sat, 8 Jun 2019 11:06:17 -0400 Subject: [PATCH 3/6] update print_skipped file to find test file Update travis and azure related --- .travis.yml | 7 +------ ci/azure/posix.yml | 5 +++++ ci/azure/windows.yml | 5 +++++ ci/print_skipped.py | 23 ++++++++++++----------- 4 files changed, 23 insertions(+), 17 deletions(-) diff --git a/.travis.yml b/.travis.yml index ce8817133a477..fd59544d9b3c6 100644 --- a/.travis.yml +++ b/.travis.yml @@ -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" diff --git a/ci/azure/posix.yml b/ci/azure/posix.yml index f53e284c221c6..666af738553e3 100644 --- a/ci/azure/posix.yml +++ b/ci/azure/posix.yml @@ -90,3 +90,8 @@ jobs: Write-Error "$($matches[1]) tests failed" } displayName: Check for test failures + - script: | + export PATH=$HOME/miniconda3/bin:$PATH + source activate pandas-dev + ci/print_skipped.py + displayName: 'print skipped test' \ No newline at end of file diff --git a/ci/azure/windows.yml b/ci/azure/windows.yml index eeb03a0b28130..f955566af8f25 100644 --- a/ci/azure/windows.yml +++ b/ci/azure/windows.yml @@ -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 + ci/print_skipped.py + displayName: 'print skipped test' \ No newline at end of file diff --git a/ci/print_skipped.py b/ci/print_skipped.py index 67bc7b556cd43..859481c5d188d 100755 --- a/ci/print_skipped.py +++ b/ci/print_skipped.py @@ -1,5 +1,6 @@ #!/usr/bin/env python +import os import sys import math import xml.etree.ElementTree as et @@ -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()) From 82a2910c164b6ca502a76cab33f96404bc272c35 Mon Sep 17 00:00:00 2001 From: Chuanzhu Xu Date: Sat, 8 Jun 2019 23:25:28 -0400 Subject: [PATCH 4/6] update the how to execute print_skipped --- ci/azure/posix.yml | 2 +- ci/azure/windows.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ci/azure/posix.yml b/ci/azure/posix.yml index 666af738553e3..3fd670f78d40c 100644 --- a/ci/azure/posix.yml +++ b/ci/azure/posix.yml @@ -93,5 +93,5 @@ jobs: - script: | export PATH=$HOME/miniconda3/bin:$PATH source activate pandas-dev - ci/print_skipped.py + python ci/print_skipped.py displayName: 'print skipped test' \ No newline at end of file diff --git a/ci/azure/windows.yml b/ci/azure/windows.yml index f955566af8f25..8eff70a184b0d 100644 --- a/ci/azure/windows.yml +++ b/ci/azure/windows.yml @@ -52,5 +52,5 @@ jobs: - script: | export PATH=$HOME/miniconda3/bin:$PATH source activate pandas-dev - ci/print_skipped.py + python ci/print_skipped.py displayName: 'print skipped test' \ No newline at end of file From 557d3cc7ad395b21895f990015df5c1d60f88784 Mon Sep 17 00:00:00 2001 From: Chuanzhu Xu Date: Sun, 9 Jun 2019 08:04:22 -0400 Subject: [PATCH 5/6] format displayName value --- ci/azure/posix.yml | 4 ++-- ci/azure/windows.yml | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/ci/azure/posix.yml b/ci/azure/posix.yml index 3fd670f78d40c..0f0c2f3e077cb 100644 --- a/ci/azure/posix.yml +++ b/ci/azure/posix.yml @@ -89,9 +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 test' \ No newline at end of file + displayName: 'Print skipped tests' \ No newline at end of file diff --git a/ci/azure/windows.yml b/ci/azure/windows.yml index 8eff70a184b0d..6363cb0278055 100644 --- a/ci/azure/windows.yml +++ b/ci/azure/windows.yml @@ -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 @@ -48,9 +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 test' \ No newline at end of file + displayName: 'Print skipped tests' \ No newline at end of file From 68c39a13a9f0ffab4ef640b3793585fbe8da9cf1 Mon Sep 17 00:00:00 2001 From: Chuanzhu Xu Date: Sun, 9 Jun 2019 08:11:01 -0400 Subject: [PATCH 6/6] fix linting --- ci/azure/posix.yml | 2 +- ci/azure/windows.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ci/azure/posix.yml b/ci/azure/posix.yml index 0f0c2f3e077cb..c5676e0a2a6a0 100644 --- a/ci/azure/posix.yml +++ b/ci/azure/posix.yml @@ -94,4 +94,4 @@ jobs: export PATH=$HOME/miniconda3/bin:$PATH source activate pandas-dev python ci/print_skipped.py - displayName: 'Print skipped tests' \ No newline at end of file + displayName: 'Print skipped tests' diff --git a/ci/azure/windows.yml b/ci/azure/windows.yml index 6363cb0278055..6d4afccb57865 100644 --- a/ci/azure/windows.yml +++ b/ci/azure/windows.yml @@ -53,4 +53,4 @@ jobs: export PATH=$HOME/miniconda3/bin:$PATH source activate pandas-dev python ci/print_skipped.py - displayName: 'Print skipped tests' \ No newline at end of file + displayName: 'Print skipped tests'