Skip to content

Commit

Permalink
Add timeout flag to pytest
Browse files Browse the repository at this point in the history
fix #3339

Signed-off-by: Sebastian Wojciechowski <s.wojciechowski89@gmail.com>
  • Loading branch information
sebwoj committed Nov 5, 2019
1 parent 2723771 commit 5c1d641
Show file tree
Hide file tree
Showing 8 changed files with 13 additions and 2 deletions.
6 changes: 6 additions & 0 deletions devel/ansible/roles/bodhi/tasks/main.yml
Expand Up @@ -66,6 +66,12 @@
- zlib-devel
state: present

# Make pytest able to use --timeout
- name: pip install pytest-timeout
pip:
name: pytest-timeout
executable: pip3

- name: Initialize PostgreSQL
command: postgresql-setup initdb
args:
Expand Down
1 change: 1 addition & 0 deletions devel/ci/Dockerfile-f29
Expand Up @@ -33,6 +33,7 @@ RUN dnf install --disablerepo rawhide-modular -y \
python3-pyramid-mako \
python3-pytest \
python3-pytest-cov \
python3-pytest-timeout \
python3-pyyaml \
python3-responses \
python3-simplemediawiki \
Expand Down
1 change: 1 addition & 0 deletions devel/ci/Dockerfile-f30
Expand Up @@ -39,6 +39,7 @@ RUN dnf install --disablerepo rawhide-modular -y \
python3-pyramid-mako \
python3-pytest \
python3-pytest-cov \
python3-pytest-timeout \
python3-responses \
python3-simplemediawiki \
python3-sqlalchemy \
Expand Down
1 change: 1 addition & 0 deletions devel/ci/Dockerfile-f31
Expand Up @@ -37,6 +37,7 @@ RUN dnf install -y \
python3-pyramid-mako \
python3-pytest \
python3-pytest-cov \
python3-pytest-timeout \
python3-responses \
python3-simplemediawiki \
python3-sqlalchemy \
Expand Down
1 change: 1 addition & 0 deletions devel/ci/Dockerfile-pip
Expand Up @@ -35,6 +35,7 @@ RUN pip-3 install \
"pydocstyle<4.0" \
pytest \
pytest-cov \
pytest-timeout \
"sphinx<2.1" \
sqlalchemy_schemadisplay \
webtest
Expand Down
1 change: 1 addition & 0 deletions devel/ci/Dockerfile-rawhide
Expand Up @@ -37,6 +37,7 @@ RUN dnf install --disablerepo rawhide-modular -y \
python3-pyramid-mako \
python3-pytest \
python3-pytest-cov \
python3-pytest-timeout \
python3-responses \
python3-simplemediawiki \
python3-sqlalchemy \
Expand Down
2 changes: 1 addition & 1 deletion devel/ci/cico.pipeline
Expand Up @@ -46,7 +46,7 @@ def configure_node = {
onmyduffynode 'yum install -y docker python36-click python36-pip python36-psycopg2 python36-requests rsync python36-cryptography python36-devel gcc'
onmyduffynode 'systemctl start docker'
// To run the integration testsuite
onmyduffynode 'python3.6 -m pip install \'pytest<4.0\' pytest-cov conu munch fedora-messaging'
onmyduffynode 'python3.6 -m pip install \'pytest<4.0\' pytest-cov conu munch fedora-messaging pytest-timeout'
}


Expand Down
2 changes: 1 addition & 1 deletion setup.cfg
Expand Up @@ -61,7 +61,7 @@ inherit = true
add-ignore = D413

[tool:pytest]
addopts = --cov-config .coveragerc --cov=bodhi --cov-report term --cov-report xml --cov-report html
addopts = --cov-config .coveragerc --cov=bodhi --cov-report term --cov-report xml --cov-report html --timeout=60

[update_catalog]
domain = bodhi
Expand Down

0 comments on commit 5c1d641

Please sign in to comment.