As mentioned in #4602, there's a lot of fmf trees being used all around, let's give them some clear names so that we can clearly distinguish what we're speaking about. These should be documented in the Glossary, depends on #4650.
user tree
The initial fmf tree from which tmt commands are executed is called user tree. For example:
/home/psss/git/tests/nested
By default it is detected from the current working directory. It can be directly $PWD or the closest parent which contains .fmf directory marking root of the fmf tree as implemented by fmf. Alternatively it can be provided using the --root option.
All the following cases result in the fmf root mentioned above:
tmt --root /home/psss/git/tests/nested
tmt --root /home/psss/git/tests/nested/deeper
cd /home/psss/git/tests/nested && tmt
cd /home/psss/git/tests/nested/deeper && tmt
work tree
When a new run is created, the user tree is copied into the run workdir under the tree folder and its path is made available in the TMT_TREE environment variable. For example this is a runner work tree:
runner:/var/tmp/tmt/run-123/plan/tree
Runner work tree is synced to the guest work tree so that tests defined by the discover shell plugin or prepare shell phases can use files from the user tree.
guest:/var/tmp/tmt/run-123/plan/tree
test tree
The discover plugin prepares tests directory where test scripts and files are available for test execution, let's call it test tree.
The fmf discover plugin copies user tree to test tree when url is not provided. Otherwise the whole git repository is cloned into it.
The shell discover plugin creates a symlink to the work tree:
├── discover
│ ├── default-0
│ │ └── tests -> ../../tree
│ ├── step.yaml
│ └── tests.yaml
As mentioned in #4602, there's a lot of fmf trees being used all around, let's give them some clear names so that we can clearly distinguish what we're speaking about. These should be documented in the Glossary, depends on #4650.
user tree
The initial
fmftree from whichtmtcommands are executed is called user tree. For example:By default it is detected from the current working directory. It can be directly
$PWDor the closest parent which contains.fmfdirectory marking root of thefmftree as implemented byfmf. Alternatively it can be provided using the--rootoption.All the following cases result in the
fmfroot mentioned above:work tree
When a new run is created, the user tree is copied into the run workdir under the
treefolder and its path is made available in theTMT_TREEenvironment variable. For example this is a runner work tree:Runner work tree is synced to the guest work tree so that tests defined by the discover shell plugin or prepare shell phases can use files from the user tree.
test tree
The discover plugin prepares
testsdirectory where test scripts and files are available for test execution, let's call it test tree.The
fmfdiscover plugin copies user tree to test tree whenurlis not provided. Otherwise the whole git repository is cloned into it.The
shelldiscover plugin creates a symlink to the work tree: