-
Notifications
You must be signed in to change notification settings - Fork 163
Description
This requirement come from slack link
Description: If a test e.g(/networking/openvswitch/topo) need another folder as a library(/networking/common). These two folder come from the same git-root.
Currently, relative path didn't work in test-level require option.
test level path as below
houminxi@houminxi:~/code/kernel/networking/openvswitch/topo$ pwd
/home/houminxi/code/kernel/networking/openvswitch/topo
# realpath ../../common
/home/houminxi/code/kernel/networking/common
But when I define a local library in openvswitch/topo/main.fmf.
require:
- name: /common
path: ../../
type: library
TMT didn't find the correct path.
10:25:45 Detected library '{'path': Path('../..'), 'name': '/common', 'type': 'library'}'.
10:25:45 Fetch library '../common'.
10:25:45 Failed to find library ../common at ../..
dependencies = [DependencyFmfId(fmf_root=None, git_root=None, default_branch=None, url=None, ref=None, path=Path('../..'), name='/common', destination=None, nick=None, type='library')]
error_message = 'After beakerlib processing, tests may have only simple requirements'
logger = <Logger: name=tmt.run.logger0.prepare verbosity=2 debug=0 quiet=False topics={<Topic.CLI_INVOCATIONS: 'cli-invocations'>} apply_colors_output=False apply_colors_logging=False>
non_simple_dependencies = [DependencyFmfId(fmf_root=None, git_root=None, default_branch=None, url=None, ref=None, path=Path('../..'), name='/common', destination=None, nick=None, type='library')]
dependency = DependencyFmfId(fmf_root=None, git_root=None, default_branch=None, url=None, ref=None, path=Path('../..'), name='/common', destination=None, nick=None, type='library')
Generally, we'll only encounter a few possibilities:
- From different git repositories. This is self-explanatory; use URL + name.
- From other directories within the same git repositories. #<----This is what we're discussing now.
- From a directory under an absolute path. I understand that this is currently supported very well.
tmt currently lacks a variable to point to an absolute path. So I hope require can support only pass name such as below:
require:
- name: /networking/common
type: library
When fmf == git root, using only name means starting the search for the folder specified by name from the current git root.
When fmf points to a subfolder of git, using only name means starting the search for the folder specified by name from within that subfolder.