Skip to content

Commit 7165403

Browse files
committed
Add support for full recipe loading
1 parent 4675d6c commit 7165403

File tree

18 files changed

+677
-1103
lines changed

18 files changed

+677
-1103
lines changed

docs/releases/pending/4661.fmf

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
description: |
2+
Full :tmt:story:`recipe</spec/recipe>` loading is now supported,
3+
and all phases can now be loaded directly from the recipe.
4+
Note that the recipe feature is still experimental and subject to change.

spec/recipe.fmf

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -40,11 +40,8 @@ description: |
4040
plans:
4141
# String, name of the plan
4242
- name: /plan/name
43-
# Mapping, stores plan environment from various sources
44-
environment-from-fmf: ...
45-
environment-from-importing: ...
46-
environment-from-cli: ...
47-
environment-from-intrinsics: ...
43+
# Mapping, stores plan environment
44+
environment: ...
4845
# Mapping, stores plan context
4946
context: ...
5047

tests/recipe/data/import.yaml

Lines changed: 8 additions & 115 deletions
Original file line numberDiff line numberDiff line change
@@ -4,192 +4,85 @@ run:
44
environment:
55
RUN_ENV: run_value
66
context: {}
7-
__class__:
8-
module: tmt.recipe
9-
name: _RecipeRun
107
plans:
118
- name: /plans/import
129
summary: A simple smoke plan for remote testing
1310
description: This is just a simple smoke plan used for testing import of
1411
remote plans. See the related test coverage for more details.
15-
author: []
16-
contact: []
1712
enabled: true
1813
order: 50
19-
id:
20-
tag: []
21-
tier:
22-
adjust: []
23-
link:
24-
- relates: https://github.com/teemtee/tmt/tree/main/tests/plan/import
25-
environment-from-fmf: {}
26-
environment-from-importing:
27-
PLAN_ENV: plan_value
28-
environment-from-cli:
29-
RUN_ENV: run_value
30-
environment-from-intrinsics:
31-
TMT_VERSION: version
32-
TMT_TREE: /run_path/plans/import/tree
33-
TMT_PLAN_DATA: /run_path/plans/import/data
34-
TMT_PLAN_ENVIRONMENT_FILE:
35-
/run_path/plans/import/data/variables.env
36-
TMT_PLAN_SOURCE_SCRIPT:
37-
/run_path/plans/import/data/plan-source-script.sh
3814
discover:
3915
enabled: true
4016
phases:
4117
- name: default-0
4218
how: fmf
4319
order: 50
44-
when: []
45-
summary:
46-
where: &id001 []
47-
url:
4820
url-content-type: git
49-
ref:
5021
dist-git-source: false
51-
dist-git-type:
5222
dist-git-download-only: false
5323
dist-git-install-builddeps: false
54-
dist-git-require: []
55-
require-test: []
56-
path:
57-
test: []
58-
link: []
5924
filter:
6025
- tag:remote
61-
include: []
62-
exclude: []
6326
modified-only: false
64-
modified-url:
65-
modified-ref:
6627
dist-git-init: false
6728
dist-git-remove-fmf-root: false
6829
dist-git-merge: false
69-
dist-git-extract:
7030
sync-repo: false
7131
fmf-id: false
7232
prune: false
73-
adjust-tests: []
74-
upgrade-path:
75-
repository:
76-
revision:
77-
__class__:
78-
module: tmt.steps.discover.fmf
79-
name: DiscoverFmfStepData
8033
tests:
8134
- name: /tests/one
35+
discover-phase: default-0
36+
test: echo one
37+
path: /default-0/tests/tests
8238
summary: Remote test one
83-
description:
84-
author: []
85-
contact: []
8639
enabled: true
8740
order: 50
88-
id:
8941
tag:
9042
- remote
91-
tier:
92-
adjust: []
93-
component: []
9443
framework: shell
9544
manual: false
9645
tty: false
9746
duration: 5m
98-
where: *id001
99-
restart-on-exit-code: []
10047
restart-max-count: 1
10148
restart-with-reboot: false
10249
serial-number: 1
103-
discover-phase: default-0
104-
link: []
105-
test: echo one
106-
path: /default-0/tests/tests
107-
require: []
108-
recommend: []
109-
environment: {}
11050
result: respect
111-
check: []
112-
__class__:
113-
module: tmt.recipe
114-
name: _RecipeTest
11551
- name: /tests/two
52+
discover-phase: default-0
53+
test: echo two
54+
path: /default-0/tests/tests
11655
summary: Remote test two
117-
description:
118-
author: []
119-
contact: []
12056
enabled: true
12157
order: 50
122-
id:
12358
tag:
12459
- remote
125-
tier:
126-
adjust: []
127-
component: []
12860
framework: shell
12961
manual: false
13062
tty: false
13163
duration: 5m
132-
where: *id001
133-
restart-on-exit-code: []
13464
restart-max-count: 1
13565
restart-with-reboot: false
13666
serial-number: 2
137-
discover-phase: default-0
138-
link: []
139-
test: echo two
140-
path: /default-0/tests/tests
141-
require: []
142-
recommend: []
143-
environment: {}
14467
result: respect
145-
check: []
146-
__class__:
147-
module: tmt.recipe
148-
name: _RecipeTest
149-
__class__:
150-
module: tmt.recipe
151-
name: _RecipeDiscoverStep
15268
provision:
15369
enabled: false
15470
phases: []
155-
__class__:
156-
module: tmt.recipe
157-
name: _RecipeStep
15871
prepare:
15972
enabled: false
16073
phases: []
161-
__class__:
162-
module: tmt.recipe
163-
name: _RecipeStep
16474
execute:
16575
enabled: false
16676
phases: []
16777
results-path: plans/import/execute/results.yaml
168-
__class__:
169-
module: tmt.recipe
170-
name: _RecipeExecuteStep
17178
report:
17279
enabled: false
17380
phases: []
174-
__class__:
175-
module: tmt.recipe
176-
name: _RecipeStep
17781
finish:
17882
enabled: false
17983
phases: []
180-
__class__:
181-
module: tmt.recipe
182-
name: _RecipeStep
18384
cleanup:
18485
enabled: false
18586
phases: []
186-
__class__:
187-
module: tmt.recipe
188-
name: _RecipeStep
189-
context: {}
190-
__class__:
191-
module: tmt.recipe
192-
name: _RecipePlan
193-
__class__:
194-
module: tmt.recipe
195-
name: Recipe
87+
link:
88+
- relates: https://github.com/teemtee/tmt/tree/main/tests/plan/import

0 commit comments

Comments
 (0)