From 5294f5b9ae01429e6d0ee75c8dc98441ba760845 Mon Sep 17 00:00:00 2001 From: drebs Date: Thu, 17 Nov 2016 22:14:51 -0200 Subject: [test] use tags for selecting benchmark tests --- testing/tests/perf/conftest.py | 3 --- testing/tests/perf/test_crypto.py | 3 +++ testing/tests/perf/test_misc.py | 2 ++ testing/tests/perf/test_sqlcipher.py | 2 ++ testing/tests/perf/test_sync.py | 2 ++ 5 files changed, 9 insertions(+), 3 deletions(-) (limited to 'testing/tests/perf') diff --git a/testing/tests/perf/conftest.py b/testing/tests/perf/conftest.py index 2964936b..d08ea61d 100644 --- a/testing/tests/perf/conftest.py +++ b/testing/tests/perf/conftest.py @@ -25,9 +25,6 @@ server.ensure_server() def pytest_addoption(parser): - parser.addoption( - "--couch-url", type="string", default="http://127.0.0.1:5984", - help="the url for the couch server to be used during tests") parser.addoption( "--num-docs", type="int", default=100, help="the number of documents to use in performance tests") diff --git a/testing/tests/perf/test_crypto.py b/testing/tests/perf/test_crypto.py index 367c3b5b..a438ee49 100644 --- a/testing/tests/perf/test_crypto.py +++ b/testing/tests/perf/test_crypto.py @@ -18,6 +18,9 @@ from leap.soledad.client import _crypto LIMIT = int(float(os.environ.get('SIZE_LIMIT', 50 * 1000 * 1000))) +pytestmark = pytest.mark.perf + + def create_doc_encryption(size): @pytest.mark.benchmark(group="test_crypto_encrypt_doc") def test_doc_encryption(soledad_client, benchmark, payload): diff --git a/testing/tests/perf/test_misc.py b/testing/tests/perf/test_misc.py index ead48adf..b45dc04e 100644 --- a/testing/tests/perf/test_misc.py +++ b/testing/tests/perf/test_misc.py @@ -1,5 +1,7 @@ import pytest +pytestmark = pytest.mark.perf + @pytest.mark.benchmark(group="test_instance") def test_initialization(soledad_client, benchmark): diff --git a/testing/tests/perf/test_sqlcipher.py b/testing/tests/perf/test_sqlcipher.py index 39c9e3ad..807af6e9 100644 --- a/testing/tests/perf/test_sqlcipher.py +++ b/testing/tests/perf/test_sqlcipher.py @@ -5,6 +5,8 @@ import pytest from twisted.internet.defer import gatherResults +pytestmark = pytest.mark.perf + def load_up(client, amount, payload, defer=True): results = [client.create_doc({'content': payload}) for _ in xrange(amount)] diff --git a/testing/tests/perf/test_sync.py b/testing/tests/perf/test_sync.py index 1bf6cc21..9bb20389 100644 --- a/testing/tests/perf/test_sync.py +++ b/testing/tests/perf/test_sync.py @@ -1,5 +1,7 @@ import pytest +pytestmark = pytest.mark.perf + @pytest.inlineCallbacks def load_up(client, amount, payload): -- cgit v1.2.3