ci/lava: Add `slow` pytest marker

Mark test_full_yaml_log with this new marker to be easily run by the
developers.
Make `debian-testing` skip this test with `not slow` marker hint.

Signed-off-by: Guilherme Gallo <guilherme.gallo@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17389>
This commit is contained in:
Guilherme Gallo 2022-07-06 23:31:27 -03:00 committed by Marge Bot
parent 84abb3df13
commit 4783e55039
3 changed files with 10 additions and 2 deletions

View File

@ -31,4 +31,5 @@ TEST_DIR=${CI_PROJECT_DIR}/.gitlab-ci/tests
PYTHONPATH="${TEST_DIR}:${PYTHONPATH}" python3 -m \
pytest "${TEST_DIR}" \
-W ignore::DeprecationWarning \
--junitxml=artifacts/ci_scripts_report.xml
--junitxml=artifacts/ci_scripts_report.xml \
-m 'not slow'

View File

@ -7,6 +7,11 @@ from freezegun import freeze_time
from .lava.helpers import generate_testsuite_result, jobs_logs_response
def pytest_configure(config):
config.addinivalue_line(
"markers", "slow: marks tests as slow (deselect with '-m \"not slow\"')"
)
@pytest.fixture
def mock_sleep():
"""Mock time.sleep to make test faster"""

View File

@ -275,7 +275,9 @@ def test_parse_job_result_from_log(message, expectation, mock_proxy):
assert job.status == expectation
@pytest.mark.skip(reason="Integration test. Needs a LAVA log raw file at /tmp/log.yaml")
@pytest.mark.slow(
reason="Slow and sketchy test. Needs a LAVA log raw file at /tmp/log.yaml"
)
def test_full_yaml_log(mock_proxy, frozen_time):
import itertools
import random