Skip to content

Document user tree, work tree and test tree in the Glossary #4663

@psss

Description

@psss

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

Metadata

Metadata

Assignees

Labels

documentationImprovements or additions to documentationstatus | blockedThe merging of PR is blocked on some other issue

Projects

Status

done

Status

triaged

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions