Skip to content

Commit 6ef8b72

Browse files
committed
checks/test_metadata.py: fix stable tests order
Fixes usage of xdist for testing Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
1 parent 06528fb commit 6ef8b72

2 files changed

Lines changed: 7 additions & 1 deletion

File tree

tests/checks/test_metadata.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -851,7 +851,7 @@ def mk_check(self, pkgs=None, **kwargs):
851851
return super().mk_check(options=kwargs)
852852

853853
# pull the set of dependency attrs from the most recent EAPI
854-
dep_attrs = list(eapi.EAPI.known_eapis.values())[-1].dep_keys
854+
dep_attrs = sorted(list(eapi.EAPI.known_eapis.values())[-1].dep_keys)
855855

856856
@pytest.mark.parametrize('attr', dep_attrs)
857857
def test_depset(self, attr):

tests/scripts/test_pkgcheck_scan.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -508,6 +508,8 @@ def test_scan_repo(self, repo, tmp_path, verbosity=0):
508508
self._script(trigger, triggered_repo)
509509
repo_dir = triggered_repo
510510

511+
if repo not in self._checks:
512+
self.test_scan_repo_data(repo)
511513
args = (['-v'] * verbosity) + ['-r', str(repo_dir), '-c', ','.join(self._checks[repo])]
512514

513515
# add any defined extra repo args
@@ -559,6 +561,10 @@ def test_scan_verify(self, repo, tmp_path):
559561
"""Run pkgcheck against test pkgs in bundled repo, verifying result output."""
560562
results = set()
561563
verbose_results = set()
564+
if repo not in self._results:
565+
self.test_scan_repo(repo, tmp_path, verbosity=0)
566+
if repo not in self._verbose_results:
567+
self.test_scan_repo(repo, tmp_path, verbosity=0)
562568
for check, keywords in self._checks[repo].items():
563569
for keyword in keywords:
564570
# verify the expected results were seen during the repo scans

0 commit comments

Comments
 (0)