Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
9574dac
TST: Call tests just once with --dist=loadscope
Sep 19, 2019
f772aa1
Remove code that was left by mistake
Sep 19, 2019
c527e55
Merge remote-tracking branch 'upstream/master' into remove_tests_mult…
Sep 20, 2019
490e0b7
Replacing loadscope by loadfile
Sep 20, 2019
f93999a
Merge remote-tracking branch 'upstream/master' into remove_tests_mult…
datapythonista Oct 1, 2019
a7fdb62
Merge remote-tracking branch 'upstream/master' into remove_tests_mult…
datapythonista Oct 1, 2019
432b352
Empty commit to rerun CI
datapythonista Oct 2, 2019
ff5148e
Merging from master
datapythonista Oct 4, 2019
5c7575a
Pinning pytest-xdist
datapythonista Oct 4, 2019
1055fc7
Merge remote-tracking branch 'upstream/master' into remove_tests_mult…
datapythonista Oct 12, 2019
5d49eba
Merge remote-tracking branch 'upstream/master' into remove_tests_mult…
datapythonista Oct 20, 2019
fba470b
Adding xvfb
datapythonista Oct 20, 2019
09618aa
Merging from master
datapythonista Nov 14, 2019
b848799
Printing errors for xvfb-run
datapythonista Nov 14, 2019
8823919
Not failing if xvfb is already running
datapythonista Nov 14, 2019
699d7d9
Removing xvfb
datapythonista Nov 14, 2019
a8f15c3
Running xvfb only in travis
datapythonista Nov 14, 2019
0c54fa0
Adding error information for xvfb
datapythonista Nov 14, 2019
73934b6
Only run xvfb when DISPLAY is not defined
datapythonista Nov 14, 2019
9972e4d
Merge remote-tracking branch 'upstream/master' into remove_tests_mult…
datapythonista Nov 14, 2019
a27609d
Clarifying comment
datapythonista Nov 14, 2019
2e79f38
Removing xvfb in Travis config
datapythonista Nov 16, 2019
bff544b
Merge remote-tracking branch 'upstream/master' into remove_tests_mult…
datapythonista Nov 16, 2019
a4b1397
Merge remote-tracking branch 'upstream/master' into remove_tests_mult…
datapythonista Nov 16, 2019
5750713
Merge remote-tracking branch 'upstream/master' into remove_tests_mult…
datapythonista Nov 16, 2019
bd100ac
Merge remote-tracking branch 'upstream/master' into remove_tests_mult…
datapythonista Nov 17, 2019
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
Next Next commit
TST: Call tests just once with --dist=loadscope
  • Loading branch information
Marc Garcia committed Sep 19, 2019
commit 9574daced32edad5468ef8a375cbb48a09f3345f
29 changes: 6 additions & 23 deletions ci/azure/posix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,33 +71,16 @@ jobs:

- task: PublishTestResults@2
inputs:
testResultsFiles: 'test-data-*.xml'
testResultsFiles: 'test-data.xml'
testRunTitle: ${{ format('{0}-$(CONDA_PY)', parameters.name) }}
displayName: 'Publish test results'

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

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

Expand Down
19 changes: 9 additions & 10 deletions ci/print_skipped.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,13 @@ def main(filename):
if __name__ == "__main__":
print("SKIPPED TESTS:")
i = 1
for file_type in ("-single", "-multiple", ""):
for test_data in main("test-data{}.xml".format(file_type)):
if test_data is None:
print("-" * 80)
else:
print(
"#{i} {class_name}.{test_name}: {message}".format(
**dict(test_data, i=i)
)
for test_data in main("test-data.xml"):
if test_data is None:
print("-" * 80)
else:
print(
"#{i} {class_name}.{test_name}: {message}".format(
**dict(test_data, i=i)
)
i += 1
)
i += 1
39 changes: 14 additions & 25 deletions ci/run_tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,38 +15,27 @@ if [ -n "$LOCALE_OVERRIDE" ]; then
# exit 1
fi
fi

if [[ "not network" == *"$PATTERN"* ]]; then
export http_proxy=http://1.2.3.4 https_proxy=http://1.2.3.4;
fi


if [ -n "$PATTERN" ]; then
PATTERN=" and $PATTERN"
fi

for TYPE in single multiple
do
if [ "$COVERAGE" ]; then
COVERAGE_FNAME="/tmp/coc-$TYPE.xml"
COVERAGE="-s --cov=pandas --cov-report=xml:$COVERAGE_FNAME"
fi

TYPE_PATTERN=$TYPE
NUM_JOBS=1
if [[ "$TYPE_PATTERN" == "multiple" ]]; then
TYPE_PATTERN="not single"
NUM_JOBS=2
fi
if [ "$COVERAGE" ]; then
COVERAGE_FNAME="/tmp/test_coverage.xml"
COVERAGE="-s --cov=pandas --cov-report=xml:$COVERAGE_FNAME"
fi

PYTEST_CMD="pytest -m \"$TYPE_PATTERN$PATTERN\" -n $NUM_JOBS -s --strict --durations=10 --junitxml=test-data-$TYPE.xml $TEST_ARGS $COVERAGE pandas"
echo $PYTEST_CMD
# if no tests are found (the case of "single and slow"), pytest exits with code 5, and would make the script fail, if not for the below code
sh -c "$PYTEST_CMD; ret=\$?; [ \$ret = 5 ] && exit 0 || exit \$ret"
PYTEST_CMD="pytest -m \"$PATTERN\" -n auto --dist=loadscope -s --strict --durations=10 --junitxml=test-data.xml $TEST_ARGS $COVERAGE pandas"
echo $PYTEST_CMD
sh -c "$PYTEST_CMD"

# 2019-08-21 disabling because this is hitting HTTP 400 errors GH#27602
# if [[ "$COVERAGE" && $? == 0 && "$TRAVIS_BRANCH" == "master" ]]; then
# echo "uploading coverage for $TYPE tests"
# echo "bash <(curl -s https://codecov.io/bash) -Z -c -F $TYPE -f $COVERAGE_FNAME"
# bash <(curl -s https://codecov.io/bash) -Z -c -F $TYPE -f $COVERAGE_FNAME
# fi
done
# 2019-08-21 disabling because this is hitting HTTP 400 errors GH#27602
# if [[ "$COVERAGE" && $? == 0 && "$TRAVIS_BRANCH" == "master" ]]; then
# echo "uploading coverage for $TYPE tests"
# echo "bash <(curl -s https://codecov.io/bash) -Z -c -F $TYPE -f $COVERAGE_FNAME"
# bash <(curl -s https://codecov.io/bash) -Z -c -F $TYPE -f $COVERAGE_FNAME
# fi