Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added no_numa bz marker. #7

Merged
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion pytest_marker_bugzilla.py
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,9 @@ def _should_skip_due_to_storage(self, item, storages):
def _should_skip_due_to_ppc(self, item, is_ppc):
return is_ppc is None or is_ppc is True

def _should_skip_due_to_no_numa_support(self, item, no_numa):
return no_numa is None or no_numa is True

def _should_skip(self, item, bz_mark):

is_ppc_affected = self._should_skip_due_to_ppc(
Expand All @@ -190,7 +193,11 @@ def _should_skip(self, item, bz_mark):
item, bz_mark.get('storage')
)

if is_api_affected and is_storage_affected and is_ppc_affected:
is_numa_affected = self._should_skip_due_to_no_numa_support(
item, bz_mark.get('no_numa')
)

if is_api_affected and is_storage_affected and is_ppc_affected and is_numa_affected:
return True

return False
Expand Down
15 changes: 15 additions & 0 deletions tests/test_bugzilla.py
Original file line number Diff line number Diff line change
Expand Up @@ -381,3 +381,18 @@ def test_new_bug_but_ppc(self):
""")
result = testdir.runpytest(*BUGZILLA_ARGS)
result.assert_outcomes(0, 1, 0)


def test_skip_because_of_no_numa(testdir):
testdir.makeconftest(CONFTEST)
testdir.makepyfile("""
import os
import pytest

@pytest.mark.bugzilla({'1': {'no_numa': True}})
def test_new_bug_but_no_numa(self):
assert True
""")
result = testdir.runpytest(*BUGZILLA_ARGS)
result.assert_outcomes(0, 1, 0)