Skip to content

Commit 72f97ba

Browse files
committed
TMT: Run integration and unit tests
Include system and integration tests in the same file, get rid of tags and filter by plan name. Adjust names and identifiers for consistency. Signed-off-by: Lokesh Mandvekar <[email protected]>
1 parent 7b3b842 commit 72f97ba

File tree

3 files changed

+111
-26
lines changed

3 files changed

+111
-26
lines changed

.packit.yaml

Lines changed: 40 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
distros: [RHEL-9.6.0-Nightly]
2020
epel-9-aarch64:
2121
distros: [RHEL-9.6.0-Nightly]
22-
tmt_plan: "/plans/system/root-local"
22+
tmt_plan: "/plans/sys-root-local"
2323
identifier: "sys-local-root"
2424

2525
- job: tests
@@ -28,7 +28,7 @@ jobs:
2828
use_internal_tf: true
2929
notifications: *packit_failure_notification
3030
targets: *test_targets
31-
tmt_plan: "/plans/system/rootless-local"
31+
tmt_plan: "/plans/sys-rootless-local"
3232
identifier: "sys-local-rootless"
3333

3434
- job: tests
@@ -37,7 +37,7 @@ jobs:
3737
use_internal_tf: true
3838
notifications: *packit_failure_notification
3939
targets: *test_targets
40-
tmt_plan: "/plans/system/root-remote"
40+
tmt_plan: "/plans/sys-root-remote"
4141
identifier: "sys-remote-root"
4242

4343
- job: tests
@@ -46,5 +46,41 @@ jobs:
4646
use_internal_tf: true
4747
notifications: *packit_failure_notification
4848
targets: *test_targets
49-
tmt_plan: "/plans/system/rootless-remote"
49+
tmt_plan: "/plans/sys-rootless-remote"
5050
identifier: "sys-remote-rootless"
51+
52+
- job: tests
53+
trigger: pull_request
54+
skip_build: true
55+
use_internal_tf: true
56+
notifications: *packit_failure_notification
57+
targets: *test_targets
58+
tmt_plan: "/plans/int-rootless-local"
59+
identifier: "int-local-rootless"
60+
61+
- job: tests
62+
trigger: pull_request
63+
skip_build: true
64+
use_internal_tf: true
65+
notifications: *packit_failure_notification
66+
targets: *test_targets
67+
tmt_plan: "/plans/int-root-remote"
68+
identifier: "int-remote-root"
69+
70+
- job: tests
71+
trigger: pull_request
72+
skip_build: true
73+
use_internal_tf: true
74+
notifications: *packit_failure_notification
75+
targets: *test_targets
76+
tmt_plan: "/plans/int-rootless-remote"
77+
identifier: "int-remote-rootless"
78+
79+
- job: tests
80+
trigger: pull_request
81+
skip_build: true
82+
use_internal_tf: true
83+
notifications: *packit_failure_notification
84+
targets: *test_targets
85+
tmt_plan: "/plans/localunit"
86+
identifier: "unit"

plans/system.fmf renamed to plans/main.fmf

Lines changed: 35 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -52,22 +52,47 @@ provision:
5252
disk:
5353
- size: ">= 512 GB"
5454

55-
/root-local:
56-
summary: Local root system tests
55+
/sys-root-local:
56+
summary: Local rootful system tests
5757
discover+:
58-
filter: 'tag:local & tag:root & tag:system'
58+
test: /test/tmt/sys-root-local
5959

60-
/rootless-local:
60+
/sys-rootless-local:
6161
summary: Local rootless system tests
6262
discover+:
63-
filter: 'tag:local & tag:rootless & tag:system'
63+
test: /test/tmt/sys-rootless-local
6464

65-
/root-remote:
66-
summary: Remote root system tests
65+
/sys-root-remote:
66+
summary: Remote rootful system tests
6767
discover+:
68-
filter: 'tag:remote & tag:root & tag:system'
68+
test: /test/tmt/sys-root-remote
6969

70-
/rootless-remote:
70+
/sys-rootless-remote:
7171
summary: Remote rootless system tests
7272
discover+:
73-
filter: 'tag:remote & tag:rootless & tag:system'
73+
test: /test/tmt/sys-rootless-remote
74+
75+
/int-root-local:
76+
summary: Local rootful integration tests
77+
discover+:
78+
test: /test/tmt/int-root-local
79+
80+
/int-rootless-local:
81+
summary: Local rootless integration tests
82+
discover+:
83+
test: /test/tmt/int-rootless-local
84+
85+
/int-root-remote:
86+
summary: Remote rootful integration tests
87+
discover+:
88+
test: /test/tmt/int-root-remote
89+
90+
/int-rootless-remote:
91+
summary: Remote rootless integration tests
92+
discover+:
93+
test: /test/tmt/int-rootless-remote
94+
95+
/localunit:
96+
summary: Run unit tests
97+
discover+:
98+
test: /test/tmt/localunit

test/tmt/system.fmf renamed to test/tmt/main.fmf

Lines changed: 36 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -8,38 +8,62 @@ adjust+:
88
environment+:
99
ROOTLESS_USER: "cloud-user"
1010

11-
/local-root:
12-
tag: [ local, root, system ]
13-
summary: local rootful test
11+
/sys-root-local:
1412
test: >
1513
bash ./setup.sh &&
1614
make -C $TMT_TREE localsystem
1715
duration: 40m
1816

19-
/local-rootless:
20-
tag: [ local, rootless, system ]
21-
summary: rootless test
17+
/sys-rootless-local:
2218
test: >
2319
bash ./setup.sh &&
2420
loginctl enable-linger $ROOTLESS_USER &&
2521
chown -R $ROOTLESS_USER $TMT_TREE &&
2622
su - "$ROOTLESS_USER" -c "CI_DESIRED_NETWORK=netavark make -C $TMT_TREE localsystem"
2723
duration: 40m
2824

29-
/remote-root:
30-
tag: [ remote, root, system ]
31-
summary: remote rootful test
25+
/sys-root-remote:
3226
test: >
3327
bash ./setup.sh &&
3428
make -C $TMT_TREE remotesystem
3529
duration: 40m
3630

37-
/remote-rootless:
38-
tag: [ remote, rootless, system ]
39-
summary: remote rootless test
31+
/sys-rootless-remote:
4032
test: >
4133
bash ./setup.sh &&
4234
loginctl enable-linger $ROOTLESS_USER &&
4335
chown -R $ROOTLESS_USER $TMT_TREE &&
4436
su - "$ROOTLESS_USER" -c "CI_DESIRED_NETWORK=netavark make -C $TMT_TREE remotesystem"
4537
duration: 40m
38+
39+
/int-root-local:
40+
test: >
41+
bash ./setup.sh &&
42+
make -C $TMT_TREE localintegration
43+
duration: 40m
44+
45+
/int-rootless-local:
46+
test: >
47+
bash ./setup.sh &&
48+
loginctl enable-linger $ROOTLESS_USER &&
49+
chown -R $ROOTLESS_USER $TMT_TREE &&
50+
su - "$ROOTLESS_USER" -c "make -C $TMT_TREE localintegration"
51+
duration: 40m
52+
53+
/int-root-remote:
54+
test: >
55+
bash ./setup.sh &&
56+
make -C $TMT_TREE remoteintegration
57+
duration: 40m
58+
59+
/int-rootless-remote:
60+
test: >
61+
bash ./setup.sh &&
62+
loginctl enable-linger $ROOTLESS_USER &&
63+
chown -R $ROOTLESS_USER $TMT_TREE &&
64+
su - "$ROOTLESS_USER" -c "make -C $TMT_TREE remoteintegration"
65+
duration: 40m
66+
67+
/localunit:
68+
test: make -C $TMT_TREE localunit
69+
duration: 40m

0 commit comments

Comments
 (0)