Skip to content

Commit cde5644

Browse files
committed
test: Add Packit and gating test
Use 'system-reinstall-bootc' to re-install TF runner from package mode to image mode Signed-off-by: Xiaofeng Wang <[email protected]>
1 parent 78f3439 commit cde5644

File tree

12 files changed

+239
-17
lines changed

12 files changed

+239
-17
lines changed

.github/workflows/integration.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ jobs:
9999

100100
- name: Run all TMT tests
101101
run: |
102-
just test-tmt-nobuild
102+
just test-tmt-nobuild plans --filter 'tag:unify'
103103
104104
- name: Archive TMT logs
105105
if: always()

.packit.yaml

Lines changed: 13 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -64,21 +64,19 @@ jobs:
6464
failure_comment:
6565
message: "bootc Copr build failed for {commit_sha}. @admin check logs {logs_url} and packit dashboard {packit_dashboard_url}"
6666

67-
# TODO: Readd some tmt tests that install the built RPM and e.g. test out system-reinstall-bootc
68-
# - job: tests
69-
# trigger: pull_request
70-
# targets:
71-
# - centos-stream-9-x86_64
72-
# - centos-stream-9-aarch64
73-
# - centos-stream-10-x86_64
74-
# - centos-stream-10-aarch64
75-
# - fedora-42-x86_64
76-
# - fedora-42-aarch64
77-
# - fedora-rawhide-x86_64
78-
# - fedora-rawhide-aarch64
79-
# tmt_plan: /integration
80-
# skip_build: true
81-
# identifier: integration-test
67+
- job: tests
68+
trigger: pull_request
69+
targets:
70+
- centos-stream-9-x86_64
71+
- centos-stream-9-aarch64
72+
- centos-stream-10-x86_64
73+
- centos-stream-10-aarch64
74+
- fedora-42-x86_64
75+
- fedora-42-aarch64
76+
- fedora-rawhide-x86_64
77+
- fedora-rawhide-aarch64
78+
tmt_plan: /integration
79+
identifier: test
8280

8381
- job: propose_downstream
8482
trigger: release

hack/Containerfile.packit

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
# Build image for system-reinstall-bootc test
2+
3+
# Use centos-bootc:10 as default
4+
FROM quay.io/centos-bootc/centos-bootc:stream10
5+
6+
WORKDIR /bootc-test
7+
8+
# Some rhts-*, rstrnt-* and tmt-* commands are in /usr/local/bin
9+
COPY bin /usr/local/bin
10+
11+
RUN <<EORUN
12+
set -xeuo pipefail
13+
. /usr/lib/os-release
14+
if [[ $ID == "rhel" ]]; then
15+
cp rhel.repo /etc/yum.repos.d/
16+
fi
17+
cp test-artifacts.repo /etc/yum.repos.d/
18+
dnf -y update bootc
19+
./provision-derived.sh
20+
21+
# For test-22-logically-bound-install
22+
cp -a lbi/usr/. /usr
23+
for x in curl.container curl-base.image podman.image; do
24+
ln -s /usr/share/containers/systemd/$x /usr/lib/bootc/bound-images.d/$x
25+
done
26+
27+
# Add some testing kargs into our dev builds
28+
install -D -t /usr/lib/bootc/kargs.d test-kargs/*
29+
# Also copy in some default install configs we use for testing
30+
install -D -t /usr/lib/bootc/install/ install-test-configs/*
31+
32+
# Finally, test our own linting
33+
bootc container lint --fatal-warnings
34+
EORUN

hack/bin/aws

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/usr/local/aws-cli/v2/current/bin/aws

hack/bin/aws_completer

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/usr/local/aws-cli/v2/current/bin/aws_completer

hack/bin/tomlq

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
#!/usr/bin/python3
2+
# -*- coding: utf-8 -*-
3+
import re
4+
import sys
5+
from yq import tq_cli
6+
if __name__ == '__main__':
7+
sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0])
8+
sys.exit(tq_cli())

hack/bin/xq

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
#!/usr/bin/python3
2+
# -*- coding: utf-8 -*-
3+
import re
4+
import sys
5+
from yq import xq_cli
6+
if __name__ == '__main__':
7+
sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0])
8+
sys.exit(xq_cli())

hack/bin/yq

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
#!/usr/bin/python3
2+
# -*- coding: utf-8 -*-
3+
import re
4+
import sys
5+
from yq import cli
6+
if __name__ == '__main__':
7+
sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0])
8+
sys.exit(cli())

hack/test-artifacts.repo

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
[bootc]
2+
name=bootc
3+
baseurl=https://download.copr.fedorainfracloud.org/results/packit/bootc-dev-bootc-1642/fedora-42-$basearch/
4+
enabled=1
5+
gpgcheck=0
6+
repo_gpgcheck=0

tmt/plans/integration.fmf

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,51 +4,66 @@ provision:
44
image: $@{test_disk_image}
55
execute:
66
how: tmt
7+
exit-first: true
78

8-
/readonly-tests:
9+
/test-00-system-reinstall-bootc:
10+
summary: Run system-reinstall-bootc in package mode machine
11+
discover:
12+
how: fmf
13+
test:
14+
- /tmt/tests/test-00-system-reinstall-bootc
15+
16+
/test-01-readonly:
917
summary: Execute booted readonly/nondestructive tests
18+
tag: unify
1019
discover:
1120
how: fmf
1221
test:
1322
- /tmt/tests/test-01-readonly
1423

1524
/test-20-local-upgrade:
1625
summary: Execute local upgrade tests
26+
tag: unify
1727
discover:
1828
how: fmf
1929
test:
2030
- /tmt/tests/test-20-local-upgrade
2131

2232
/test-21-logically-bound-switch:
2333
summary: Execute logically bound images tests for switching images
34+
tag: unify
2435
discover:
2536
how: fmf
2637
test:
2738
- /tmt/tests/test-21-logically-bound-switch
2839

2940
/test-22-logically-bound-install:
3041
summary: Execute logically bound images tests for switching images
42+
tag: unify
3143
discover:
3244
how: fmf
3345
test:
3446
- /tmt/tests/test-22-logically-bound-install
3547

3648
/test-23-install-outside-container:
3749
summary: Execute tests for installing outside of a container
50+
tag: unify
3851
discover:
3952
how: fmf
4053
test:
4154
- /tmt/tests/test-23-install-outside-container
4255

4356
/test-24-local-upgrade-reboot:
4457
summary: Execute local upgrade tests with automated reboot
58+
tag: unify
4559
discover:
4660
how: fmf
4761
test:
4862
- /tmt/tests/test-24-local-upgrade-reboot
4963

5064
/test-25-soft-reboot:
5165
summary: Soft reboot support
66+
tag: unify
5267
discover:
5368
how: fmf
5469
test:

0 commit comments

Comments
 (0)