summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRaoul Hidalgo Charman <raoul.hidalgocharman@codethink.co.uk>2019-05-13 14:34:44 +0100
committerRaoul Hidalgo Charman <raoul.hidalgocharman@codethink.co.uk>2019-05-14 17:53:09 +0100
commit839c3e94f02bdca9d525de72fbcbe0abbee3c07b (patch)
treee7b912892139e19fbe09b92d24935d76d46e50ea
parentcc871d37500cc78d16112cf31bf32685c3b7e9aa (diff)
downloadbuildstream-839c3e94f02bdca9d525de72fbcbe0abbee3c07b.tar.gz
setup.cfg: add timeout to prevent hanging tests
Part of #1023
-rw-r--r--setup.cfg1
-rw-r--r--tests/examples/flatpak-autotools.py2
-rw-r--r--tests/integration/artifact.py1
-rw-r--r--tests/integration/shellbuildtrees.py1
4 files changed, 5 insertions, 0 deletions
diff --git a/setup.cfg b/setup.cfg
index efdca7091..0078dc18c 100644
--- a/setup.cfg
+++ b/setup.cfg
@@ -14,6 +14,7 @@ test=pytest
addopts = --verbose --basetemp ./tmp --durations=20
norecursedirs = tests/integration/project integration-cache tmp __pycache__ .eggs
python_files = tests/*/*.py
+timeout = 60
env =
D:BST_TEST_SUITE=True
D:XDG_CACHE_HOME=./tmp/cache
diff --git a/tests/examples/flatpak-autotools.py b/tests/examples/flatpak-autotools.py
index 8af564eb1..5a6377058 100644
--- a/tests/examples/flatpak-autotools.py
+++ b/tests/examples/flatpak-autotools.py
@@ -39,6 +39,7 @@ def workaround_setuptools_bug(project):
reason='Examples are written for x86-64')
@pytest.mark.skipif(not IS_LINUX or not HAVE_OSTREE, reason='Only available on linux with ostree')
@pytest.mark.datafiles(DATA_DIR)
+@pytest.mark.timeout(300)
def test_autotools_build(cli, datafiles):
project = str(datafiles)
checkout = os.path.join(cli.directory, 'checkout')
@@ -62,6 +63,7 @@ def test_autotools_build(cli, datafiles):
reason='Examples are written for x86-64')
@pytest.mark.skipif(not IS_LINUX or not HAVE_OSTREE, reason='Only available on linux with ostree')
@pytest.mark.datafiles(DATA_DIR)
+@pytest.mark.timeout(300)
def test_autotools_run(cli, datafiles):
project = str(datafiles)
workaround_setuptools_bug(project)
diff --git a/tests/integration/artifact.py b/tests/integration/artifact.py
index a5e1f4d77..5fdbb9c54 100644
--- a/tests/integration/artifact.py
+++ b/tests/integration/artifact.py
@@ -45,6 +45,7 @@ DATA_DIR = os.path.join(
# content of an element on caching.
@pytest.mark.datafiles(DATA_DIR)
@pytest.mark.skipif(not HAVE_SANDBOX, reason='Only available with a functioning sandbox')
+@pytest.mark.timeout(300)
def test_cache_buildtrees(cli, tmpdir, datafiles):
project = str(datafiles)
element_name = 'autotools/amhello.bst'
diff --git a/tests/integration/shellbuildtrees.py b/tests/integration/shellbuildtrees.py
index 3d59c78b9..2d1501fcc 100644
--- a/tests/integration/shellbuildtrees.py
+++ b/tests/integration/shellbuildtrees.py
@@ -213,6 +213,7 @@ def test_buildtree_pulled(cli, tmpdir, datafiles):
# This test checks for correct behaviour if a buildtree is not present in the local cache.
@pytest.mark.datafiles(DATA_DIR)
@pytest.mark.skipif(not HAVE_SANDBOX, reason='Only available with a functioning sandbox')
+@pytest.mark.timeout(180)
def test_buildtree_options(cli, tmpdir, datafiles):
project = str(datafiles)
element_name = 'build-shell/buildtree.bst'