From d0d9bca7994b8f93244a5a73810bc9f4ed2c8dc8 Mon Sep 17 00:00:00 2001 From: Ismail Ibrahim Quwarah Date: Thu, 9 Jan 2025 15:11:11 +0100 Subject: [PATCH] Add workaround to detect feature plugin playbook --- tmt/steps/prepare/feature/__init__.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tmt/steps/prepare/feature/__init__.py b/tmt/steps/prepare/feature/__init__.py index 848507d202..f3735f6cce 100644 --- a/tmt/steps/prepare/feature/__init__.py +++ b/tmt/steps/prepare/feature/__init__.py @@ -1,4 +1,5 @@ import dataclasses +import inspect from typing import Callable, Optional, cast import tmt @@ -84,6 +85,10 @@ def _find_playbook(cls, filename: str, logger: tmt.log.Logger) -> Optional[Path] if filepath.exists(): return filepath + filepath = Path(inspect.getfile(cls)).parent / filename + if filepath.exists(): + return filepath + logger.warning(f"Cannot find any suitable playbook for '{filename}'.", 0) return None