Install pytest-faulthandler for py27 and add timeout
This commit is contained in:
parent
98e66a855e
commit
df0467961e
|
@ -64,6 +64,11 @@ install:
|
||||||
- pip install pytest-xdist # multi-thread pytest
|
- pip install pytest-xdist # multi-thread pytest
|
||||||
- pip install pytest-cov # add coverage stats
|
- pip install pytest-cov # add coverage stats
|
||||||
|
|
||||||
|
# faulthandler support not built in to pytest for python 2.7
|
||||||
|
- if [ "${PYTHON}" == "2.7" ]; then
|
||||||
|
pip install pytest-faulthandler;
|
||||||
|
fi;
|
||||||
|
|
||||||
# Debugging helpers
|
# Debugging helpers
|
||||||
- uname -a
|
- uname -a
|
||||||
- cat /etc/issue
|
- cat /etc/issue
|
||||||
|
@ -139,7 +144,7 @@ script:
|
||||||
|
|
||||||
# Run unit tests
|
# Run unit tests
|
||||||
- start_test "unit tests";
|
- start_test "unit tests";
|
||||||
PYTHONPATH=. pytest --cov pyqtgraph -sv;
|
PYTHONPATH=. pytest --cov pyqtgraph -sv -o faulthandler_timeout=15;
|
||||||
check_output "unit tests";
|
check_output "unit tests";
|
||||||
- echo "test script finished. Current directory:"
|
- echo "test script finished. Current directory:"
|
||||||
- pwd
|
- pwd
|
||||||
|
|
|
@ -99,6 +99,10 @@ jobs:
|
||||||
pip install $(qt.bindings) numpy scipy pyopengl pytest six coverage
|
pip install $(qt.bindings) numpy scipy pyopengl pytest six coverage
|
||||||
fi
|
fi
|
||||||
pip install pytest-xdist pytest-cov
|
pip install pytest-xdist pytest-cov
|
||||||
|
if [ $(python.version) == "2.7" ]
|
||||||
|
then
|
||||||
|
pip install pytest-faulthandler
|
||||||
|
fi
|
||||||
displayName: "Install Dependencies"
|
displayName: "Install Dependencies"
|
||||||
|
|
||||||
- bash: |
|
- bash: |
|
||||||
|
@ -170,7 +174,8 @@ jobs:
|
||||||
# echo "https://dev.azure.com/pyqtgraph/pyqtgraph/_apis/build/builds/$(Build.BuildId)/artifacts?artifactName=Screenshots&api-version=5.0"
|
# echo "https://dev.azure.com/pyqtgraph/pyqtgraph/_apis/build/builds/$(Build.BuildId)/artifacts?artifactName=Screenshots&api-version=5.0"
|
||||||
pytest . -sv \
|
pytest . -sv \
|
||||||
--junitxml=junit/test-results.xml \
|
--junitxml=junit/test-results.xml \
|
||||||
-n 1 --cov pyqtgraph --cov-report=xml --cov-report=html
|
-n 1 --cov pyqtgraph --cov-report=xml --cov-report=html \
|
||||||
|
-o faulthandler_timeout=15
|
||||||
displayName: 'Unit tests'
|
displayName: 'Unit tests'
|
||||||
env:
|
env:
|
||||||
AZURE: 1
|
AZURE: 1
|
||||||
|
|
Loading…
Reference in New Issue
Block a user