Skip to content

Commit 95410fc

Browse files
committed
TMT: initial enablement
This commit adds `validate`, `unit`, and `integration` tests using for aarch64 and x86_64 arches on all active Fedora and CentOS Stream versions. Signed-off-by: Lokesh Mandvekar <[email protected]>
1 parent 8309b68 commit 95410fc

File tree

4 files changed

+57
-5
lines changed

4 files changed

+57
-5
lines changed

.fmf/version

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
1

.packit.yaml

Lines changed: 33 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,13 @@ jobs:
1717
failure_comment:
1818
message: "Ephemeral COPR build failed. @containers/packit-build please check."
1919
enable_net: true
20-
targets:
20+
targets: &copr_build_targets
2121
- fedora-all-x86_64
2222
- fedora-all-aarch64
23-
- centos-stream+epel-next-8-x86_64
24-
- centos-stream+epel-next-8-aarch64
25-
- centos-stream+epel-next-9-x86_64
26-
- centos-stream+epel-next-9-aarch64
23+
- centos-stream-9-x86_64
24+
- centos-stream-9-aarch64
25+
- centos-stream-8-x86_64
26+
- centos-stream-8-aarch64
2727
additional_repos:
2828
- "copr://rhcontainerbot/podman-next"
2929

@@ -38,6 +38,34 @@ jobs:
3838
project: podman-next
3939
enable_net: true
4040

41+
# Test on the same arches as copr_build_targets used for ephemeral copr build
42+
- job: tests
43+
trigger: pull_request
44+
notifications:
45+
failure_comment:
46+
message: "TMT validate test failed. @containers/packit-build please check."
47+
targets: *copr_build_targets
48+
identifier: validate
49+
tmt_plan: "/plans/validate_test"
50+
51+
- job: tests
52+
trigger: pull_request
53+
notifications:
54+
failure_comment:
55+
message: "TMT unit tests failed. @containers/packit-build please check."
56+
targets: *copr_build_targets
57+
identifier: validate
58+
tmt_plan: "/plans/unit_test"
59+
60+
- job: tests
61+
trigger: pull_request
62+
notifications:
63+
failure_comment:
64+
message: "TMT integration tests failed. @containers/packit-build please check."
65+
targets: *copr_build_targets
66+
identifier: validate
67+
tmt_plan: "/plans/integration_test"
68+
4169
- job: propose_downstream
4270
trigger: release
4371
update_release: false

Makefile

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,13 @@ unit: $(CARGO_TARGET_DIR)
120120
$(CARGO) test
121121

122122
.PHONY: integration
123+
# The NETAVARK envvar is used by bats to specify path to a netavark binary.
124+
ifdef NETAVARK
125+
$(info Skipping build as NETAVARK binary is specified)
126+
integration: $(CARGO_TARGET_DIR)
127+
else
123128
integration: $(CARGO_TARGET_DIR) examples
129+
endif
124130
# needs to be run as root or with podman unshare --rootless-netns
125131
bats test/
126132
bats test-dhcp/

plans/main.fmf

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
/validate_test:
2+
summary: Run validate test
3+
execute:
4+
how: tmt
5+
script: make validate
6+
7+
/unit_test:
8+
summary: Run unit tests
9+
execute:
10+
how: tmt
11+
script: make unit
12+
13+
/integration_test:
14+
summary: Run integration tests
15+
execute:
16+
how: tmt
17+
script: NETAVARK=/usr/libexec/podman/netavark make integration

0 commit comments

Comments
 (0)