Compare commits
167 commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b7c04fccdf | ||
|
|
a05f166701 | ||
|
|
69aa69ce9f | ||
|
|
46e4c5cb69 |
||
|
|
26e56e009e | ||
|
|
79a2083f22 | ||
|
|
05088c122a | ||
|
|
ffc3a2cfe4 | ||
|
|
6a0cbd4f54 | ||
|
|
cc02dba574 | ||
|
|
cedabe303c | ||
|
|
9fe63a30e3 | ||
|
|
01d5f7a72d | ||
|
|
57a53f65eb | ||
|
|
03beeaabfe | ||
|
|
10f2788e2e | ||
|
|
bf6ed770f4 | ||
|
|
f21cb2e226 | ||
|
|
b862c5236f | ||
|
|
d045d1ee1d | ||
|
|
f74651e09a | ||
|
|
acc97bad56 | ||
|
|
1d416a1edd | ||
|
|
d003eff4f6 | ||
|
|
62a8f656f7 | ||
|
|
3863ba7579 | ||
|
|
3ed588da80 | ||
|
|
87244d0604 | ||
|
|
cf78f8d0ee | ||
|
|
1e20b7413b | ||
|
|
492d8dd5ab | ||
|
|
0e767184b7 | ||
|
|
22b98ffb7a | ||
|
|
d663ffb93a | ||
|
|
b076ceb696 | ||
|
|
7239772901 | ||
|
|
732517bcf0 | ||
|
|
213a753b33 |
||
|
|
4504feb5ba | ||
|
|
fae5d037f0 | ||
|
|
8b5b9366ca | ||
|
|
ae948af1e4 |
||
|
|
9d5f73f6c2 |
||
|
|
8fc9a5e791 | ||
|
|
4e32b279e6 |
||
|
|
4e66fad703 |
||
|
|
00795d94e9 |
||
|
|
bfa16d53dc |
||
|
|
e5d2c7da8e | ||
|
|
f4fcb9cdd9 | ||
|
|
8874dd69ea | ||
|
|
c0a479988d | ||
|
|
7379c6b819 | ||
|
|
ae2ab9006f | ||
|
|
bd9b7cc977 | ||
|
|
01f144734d | ||
|
|
23f0390c4c | ||
|
|
0e862cd8df | ||
|
|
0680f2ccf6 | ||
|
|
a36c9b6eff | ||
|
|
4456f265f9 | ||
|
|
574e70789c | ||
|
|
963d6215af | ||
|
|
bba065a9f6 | ||
|
|
cca56b7722 | ||
|
|
6b9f8ae13c | ||
|
|
7324d4a8a0 | ||
|
|
40faa8f303 | ||
|
|
1382e24f45 | ||
|
|
59ea618069 | ||
|
|
06d80d5fef | ||
|
|
de771889de | ||
|
|
c6a0f3a1f7 | ||
|
|
6c4e471637 | ||
|
|
82d7f71a7f | ||
|
|
0a7aa1737e | ||
|
|
97b9782493 | ||
|
|
f67255266e | ||
|
|
be0b5702b3 | ||
|
|
13f4a6c2e9 | ||
|
|
8b352dbe22 | ||
|
|
bae7304f0f | ||
|
|
9e8729711b | ||
|
|
adf93252d1 | ||
|
|
1fb76b43d7 | ||
|
|
2a4989d7df | ||
|
|
0ebb3a3ccd | ||
|
|
570fedc753 | ||
|
|
a33643159d | ||
|
|
ec9428aeb2 | ||
|
|
126625f838 |
||
|
|
6e129c6642 | ||
|
|
9e798a2f09 | ||
|
|
b33be10a83 | ||
|
|
01b13ceb37 | ||
|
|
f264b52c88 | ||
|
|
c3d32e2816 | ||
|
|
e82b08ebb3 | ||
|
|
315273e50b | ||
|
|
14b23e65ce | ||
|
|
f3eec64bf2 | ||
|
|
8a5f32dbb6 | ||
|
|
7d6c5bbf24 | ||
|
|
a1975fc232 | ||
|
|
e1c07e65f7 | ||
|
|
92ea64fa26 | ||
|
|
8eb2081995 | ||
|
|
17d4f5176e |
||
|
|
b0c83820bd | ||
|
|
4d8eec011d | ||
|
|
b4a0e51a8a | ||
|
|
47c860282e | ||
|
|
c9e8f5efe8 | ||
|
|
2d52169453 | ||
|
|
20075c5a17 | ||
|
|
f62b7863b9 | ||
|
|
b12df8bb43 | ||
|
|
ee23d88125 | ||
|
|
aa2b8e24b1 | ||
|
|
3d3b288109 | ||
|
|
5f89c86fb9 | ||
|
|
c581165b09 | ||
|
|
adbb6328a9 | ||
|
|
3168de5f1f | ||
|
|
6c831b89a4 | ||
|
|
9951f02205 | ||
|
|
361d6fb52e | ||
|
|
25b19c2bbb | ||
|
|
0e70f35288 | ||
|
|
cb0cf0b703 | ||
|
|
1f03cd944f | ||
|
|
ff8eba7581 | ||
|
|
ec12d3d702 | ||
|
|
27dc04a494 | ||
|
|
56b71b78b3 | ||
|
|
cd15fec66c | ||
|
|
1ea227d943 | ||
|
|
87a8506f9c | ||
|
|
ef09dca223 | ||
|
|
fcb0b8d150 | ||
|
|
f44e71e512 | ||
|
|
8344d84052 | ||
|
|
5309e7d666 | ||
|
|
a26383613e | ||
|
|
219c5aa8cb | ||
|
|
91f4a9f028 | ||
|
|
6786288d2c | ||
|
|
5a13e4f7e5 | ||
|
|
ddbd8f7fd2 | ||
|
|
30beb7c7f3 | ||
|
|
ae2c4f26cf | ||
|
|
364abd3af7 | ||
|
|
966cc60f90 | ||
|
|
230d532eab | ||
|
|
6c3012da2b | ||
|
|
aedc9b8f2c | ||
|
|
2a74b3dc26 | ||
|
|
bb2f87171b | ||
|
|
93a0bf8bbb | ||
|
|
2f65b0e11e | ||
|
|
340f465f1d | ||
|
|
4c60f07468 | ||
|
|
8c9254b0c9 | ||
|
|
47ca8a085b | ||
|
|
3ed31ee037 | ||
|
|
fd7f7f38c3 | ||
|
|
75c5c7afea |
21 changed files with 38831 additions and 151 deletions
1
.fmf/version
Normal file
1
.fmf/version
Normal file
|
|
@ -0,0 +1 @@
|
|||
1
|
||||
133
.gitignore
vendored
133
.gitignore
vendored
|
|
@ -17,3 +17,136 @@
|
|||
/osbuild-17.tar.gz
|
||||
/osbuild-18.tar.gz
|
||||
/osbuild-19.tar.gz
|
||||
/osbuild-20.tar.gz
|
||||
/osbuild-21.tar.gz
|
||||
/osbuild-22.tar.gz
|
||||
/osbuild-23.tar.gz
|
||||
/osbuild-24.tar.gz
|
||||
/osbuild-25.tar.gz
|
||||
/osbuild-26.tar.gz
|
||||
/osbuild-27.tar.gz
|
||||
/osbuild-28.tar.gz
|
||||
/osbuild-29.tar.gz
|
||||
/osbuild-30.tar.gz
|
||||
/osbuild-31.tar.gz
|
||||
/osbuild-32.tar.gz
|
||||
/osbuild-33.tar.gz
|
||||
/osbuild-35.tar.gz
|
||||
/osbuild-36.tar.gz
|
||||
/osbuild-37.tar.gz
|
||||
/osbuild-38.tar.gz
|
||||
/osbuild-39.tar.gz
|
||||
/osbuild-40.tar.gz
|
||||
/osbuild-41.tar.gz
|
||||
/osbuild-42.tar.gz
|
||||
/osbuild-43.tar.gz
|
||||
/osbuild-44.tar.gz
|
||||
/osbuild-45.tar.gz
|
||||
/osbuild-46.tar.gz
|
||||
/osbuild-47.tar.gz
|
||||
/osbuild-48.tar.gz
|
||||
/osbuild-49.tar.gz
|
||||
/osbuild-50.tar.gz
|
||||
/osbuild-51.tar.gz
|
||||
/osbuild-52.tar.gz
|
||||
/osbuild-53.tar.gz
|
||||
/osbuild-54.tar.gz
|
||||
/osbuild-55.tar.gz
|
||||
/osbuild-53.1.tar.gz
|
||||
/osbuild-56.tar.gz
|
||||
/osbuild-57.tar.gz
|
||||
/osbuild-58.tar.gz
|
||||
/osbuild-59.tar.gz
|
||||
/osbuild-60.tar.gz
|
||||
/osbuild-61.tar.gz
|
||||
/osbuild-62.tar.gz
|
||||
/osbuild-63.tar.gz
|
||||
/osbuild-64.tar.gz
|
||||
/osbuild-65.tar.gz
|
||||
/osbuild-66.tar.gz
|
||||
/osbuild-67.tar.gz
|
||||
/osbuild-68.tar.gz
|
||||
/osbuild-69.tar.gz
|
||||
/osbuild-70.tar.gz
|
||||
/osbuild-71.tar.gz
|
||||
/osbuild-72.tar.gz
|
||||
/osbuild-73.tar.gz
|
||||
/osbuild-74.tar.gz
|
||||
/osbuild-75.tar.gz
|
||||
/osbuild-76.tar.gz
|
||||
/osbuild-77.tar.gz
|
||||
/osbuild-78.tar.gz
|
||||
/osbuild-79.tar.gz
|
||||
/osbuild-80.tar.gz
|
||||
/osbuild-81.tar.gz
|
||||
/osbuild-82.tar.gz
|
||||
/osbuild-83.tar.gz
|
||||
/osbuild-84.tar.gz
|
||||
/osbuild-85.tar.gz
|
||||
/osbuild-86.tar.gz
|
||||
/osbuild-87.tar.gz
|
||||
/osbuild-88.tar.gz
|
||||
/osbuild-89.tar.gz
|
||||
/osbuild-90.tar.gz
|
||||
/osbuild-91.tar.gz
|
||||
/osbuild-92.tar.gz
|
||||
/osbuild-93.tar.gz
|
||||
/osbuild-94.tar.gz
|
||||
/osbuild-95.tar.gz
|
||||
/osbuild-96.tar.gz
|
||||
/osbuild-97.tar.gz
|
||||
/osbuild-98.tar.gz
|
||||
/osbuild-99.tar.gz
|
||||
/osbuild-100.tar.gz
|
||||
/osbuild-101.tar.gz
|
||||
/osbuild-102.tar.gz
|
||||
/osbuild-103.tar.gz
|
||||
/osbuild-104.tar.gz
|
||||
/osbuild-105.tar.gz
|
||||
/osbuild-106.tar.gz
|
||||
/osbuild-109.tar.gz
|
||||
/osbuild-110.tar.gz
|
||||
/osbuild-111.tar.gz
|
||||
/osbuild-112.tar.gz
|
||||
/osbuild-113.tar.gz
|
||||
/osbuild-114.tar.gz
|
||||
/osbuild-115.tar.gz
|
||||
/osbuild-117.tar.gz
|
||||
/osbuild-118.tar.gz
|
||||
/osbuild-119.tar.gz
|
||||
/osbuild-122.tar.gz
|
||||
/osbuild-123.tar.gz
|
||||
/osbuild-124.tar.gz
|
||||
/osbuild-125.tar.gz
|
||||
/osbuild-126.tar.gz
|
||||
/osbuild-129.tar.gz
|
||||
/osbuild-130.tar.gz
|
||||
/osbuild-131.tar.gz
|
||||
/osbuild-132.tar.gz
|
||||
/osbuild-135.tar.gz
|
||||
/osbuild-136.tar.gz
|
||||
/osbuild-137.tar.gz
|
||||
/osbuild-138.tar.gz
|
||||
/osbuild-139.tar.gz
|
||||
/osbuild-140.tar.gz
|
||||
/osbuild-141.tar.gz
|
||||
/osbuild-142.tar.gz
|
||||
/osbuild-143.tar.gz
|
||||
/osbuild-144.tar.gz
|
||||
/osbuild-146.tar.gz
|
||||
/osbuild-147.tar.gz
|
||||
/osbuild-149.tar.gz
|
||||
/osbuild-151.tar.gz
|
||||
/osbuild-152.tar.gz
|
||||
/osbuild-153.tar.gz
|
||||
/osbuild-155.tar.gz
|
||||
/osbuild-156.tar.gz
|
||||
/osbuild-158.tar.gz
|
||||
/osbuild-159.tar.gz
|
||||
/osbuild-161.tar.gz
|
||||
/osbuild-162.tar.gz
|
||||
/osbuild-163.tar.gz
|
||||
/osbuild-164.tar.gz
|
||||
/osbuild-166.tar.gz
|
||||
/osbuild-167.tar.gz
|
||||
/osbuild-169.tar.gz
|
||||
|
|
|
|||
97
.packit.yaml
97
.packit.yaml
|
|
@ -1,37 +1,66 @@
|
|||
# we have the specfile in the root of our repository
|
||||
# https://packit.dev/docs/configuration/
|
||||
|
||||
specfile_path: osbuild.spec
|
||||
# when doing an update in Fedora, we want to copy the spec file and the config file
|
||||
synced_files:
|
||||
- osbuild.spec
|
||||
- .packit.yaml
|
||||
upstream_project_name: osbuild
|
||||
|
||||
files_to_sync:
|
||||
- osbuild.spec
|
||||
- .packit.yaml
|
||||
|
||||
upstream_package_name: osbuild
|
||||
downstream_package_name: osbuild
|
||||
|
||||
copy_upstream_release_description: true
|
||||
|
||||
upstream_tag_template: v{version}
|
||||
|
||||
srpm_build_deps: []
|
||||
actions:
|
||||
get-current-version: bash -c "git describe --tags --abbrev=0 | sed 's|v||'"
|
||||
|
||||
# Handle only releases without a "dot" (e.g. v88.2), since "dot" releases should never be released to Fedora
|
||||
# "dot" releases are used only for "backports" to RHEL.
|
||||
upstream_tag_include: 'v\d+'
|
||||
|
||||
jobs:
|
||||
# trigger a COPR build for push events in open PRs
|
||||
- job: copr_build
|
||||
trigger: pull_request
|
||||
metadata:
|
||||
targets:
|
||||
- fedora-30-x86_64
|
||||
- fedora-31-x86_64
|
||||
- fedora-rawhide-x86_64
|
||||
# this is triggered by a commit on src.fedoraproject.org, not Github!
|
||||
# e.g. in case of mass rebuild or automated changes of spec file (e.g. Python packagers)
|
||||
# it will create a PR on Github with changes in synchronized files
|
||||
- job: sync_from_downstream
|
||||
trigger: commit
|
||||
# create a PR on src.fedoraproject.org containing updated spec file and new sources (tarball)
|
||||
# triggered by Github release
|
||||
- job: propose_downstream
|
||||
trigger: release
|
||||
metadata:
|
||||
dist-git-branch: master
|
||||
# The same as above only for f31
|
||||
- job: propose_downstream
|
||||
trigger: release
|
||||
metadata:
|
||||
dist-git-branch: f31
|
||||
- job: propose_downstream
|
||||
trigger: release
|
||||
metadata:
|
||||
dist-git-branch: f30
|
||||
- &copr
|
||||
job: copr_build
|
||||
trigger: pull_request
|
||||
targets:
|
||||
- centos-stream-9-aarch64
|
||||
- centos-stream-9-s390x
|
||||
- centos-stream-9-pcc64le
|
||||
- centos-stream-9-x86_64
|
||||
- centos-stream-10-aarch64
|
||||
- centos-stream-10-s390x
|
||||
- centos-stream-10-ppc64le
|
||||
- centos-stream-10-x86_64
|
||||
- epel-8-aarch64
|
||||
- epel-8-x86_64
|
||||
- epel-9-aarch64
|
||||
- epel-9-x86_64
|
||||
- fedora-all-aarch64
|
||||
- fedora-all-s390x
|
||||
- fedora-all-ppc64le
|
||||
- fedora-all
|
||||
- <<: *copr
|
||||
trigger: commit
|
||||
branch: main
|
||||
owner: "@osbuild" # copr repo namespace
|
||||
project: osbuild # copr repo name so you can consume the builds
|
||||
- <<: *copr
|
||||
trigger: release
|
||||
branch: main
|
||||
owner: "@osbuild" # copr repo namespace
|
||||
project: osbuild-stable # copr repo name so you can consume the builds
|
||||
- job: propose_downstream
|
||||
trigger: release
|
||||
dist_git_branches:
|
||||
- fedora-all
|
||||
- job: koji_build
|
||||
trigger: commit
|
||||
dist_git_branches:
|
||||
- fedora-all
|
||||
- job: bodhi_update
|
||||
trigger: commit
|
||||
dist_git_branches:
|
||||
- fedora-branched # rawhide updates are created automatically
|
||||
|
|
|
|||
40
PR1827.patch
Normal file
40
PR1827.patch
Normal file
|
|
@ -0,0 +1,40 @@
|
|||
From 54c0a2cce45ad385d793d494e62222cd254a866a Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Hozza?= <thozza@redhat.com>
|
||||
Date: Wed, 31 Jul 2024 18:12:24 +0200
|
||||
Subject: [PATCH] Test/dnf4.mark: adjust the test for markings used by DNF5
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
When I rolled back from using 'dnf4', to check package markings, to
|
||||
using 'dnf', I didn't verify the test case on Fedora Rawhide with DNF5.
|
||||
It turns out that the strings reported by DNF5 differ and make the test
|
||||
case fail. This time I tested the change on Fedora Rawhide with DNF5 and
|
||||
it works.
|
||||
|
||||
Signed-off-by: Tomáš Hozza <thozza@redhat.com>
|
||||
---
|
||||
test/run/test_stages.py | 6 ++++--
|
||||
1 file changed, 4 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/test/run/test_stages.py b/test/run/test_stages.py
|
||||
index dc91bf8f..7fec10c8 100644
|
||||
--- a/test/run/test_stages.py
|
||||
+++ b/test/run/test_stages.py
|
||||
@@ -565,9 +565,11 @@ class TestStages(test.TestBase):
|
||||
raise
|
||||
|
||||
if package == "dnf":
|
||||
- assert mark == "user"
|
||||
+ # dnf4 marks packages as 'user', while dnf5 marks them as 'User'
|
||||
+ assert mark in ("user", "User")
|
||||
else:
|
||||
- assert mark == "unknown"
|
||||
+ # dnf4 marks packages as 'unknown', while dnf5 marks them as 'External User'
|
||||
+ assert mark in ("unknown", "External User")
|
||||
|
||||
@unittest.skipUnless(test.TestBase.has_filesystem_support("btrfs"), "btrfs needed")
|
||||
def test_btrfs(self):
|
||||
--
|
||||
2.45.2
|
||||
|
||||
|
|
@ -1,3 +1,3 @@
|
|||
This repository is maintained by packit.
|
||||
https://packit.dev/
|
||||
The file was generated using packit 0.7.2.dev96+g8ed72cd.
|
||||
The file was generated using packit 1.14.0.post1.dev2+g6506c7467.
|
||||
|
|
|
|||
2819
osbuild.spec
2819
osbuild.spec
File diff suppressed because it is too large
Load diff
10
plans/integration-tests.fmf
Normal file
10
plans/integration-tests.fmf
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
summary: Run osbuild integration tests
|
||||
prepare:
|
||||
how: install
|
||||
package:
|
||||
- osbuild
|
||||
discover:
|
||||
how: fmf
|
||||
filter: tag:integration-test
|
||||
execute:
|
||||
how: tmt
|
||||
13
plans/unit-tests.fmf
Normal file
13
plans/unit-tests.fmf
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
summary: Run osbuild unit tests from dist-git sources
|
||||
prepare:
|
||||
how: install
|
||||
package:
|
||||
- git
|
||||
- make
|
||||
- osbuild
|
||||
discover:
|
||||
how: fmf
|
||||
dist-git-source: true
|
||||
filter: tag:unit-test
|
||||
execute:
|
||||
how: tmt
|
||||
2
sources
2
sources
|
|
@ -1 +1 @@
|
|||
SHA512 (osbuild-19.tar.gz) = 88d3851b4034930a73dddd175521be58cba5be6bb9a66ebb7264b1f4df1dc1fac3dba480c136e689abf25c651f81ec9241078a90a84fe047e5e78de6165d1b23
|
||||
SHA512 (osbuild-169.tar.gz) = 981b6dae05d0f1fe0475549b5c72c2adafb656a7b9f3dbdf64fe660fe0852166bf327f654192f7f83583e2d559590b98dac8aba226e8203c3a0af274d51b33cf
|
||||
|
|
|
|||
52
tests/image-build/build-images.sh
Executable file
52
tests/image-build/build-images.sh
Executable file
|
|
@ -0,0 +1,52 @@
|
|||
#!/usr/bin/bash
|
||||
set -euxo pipefail
|
||||
|
||||
MANIFESTS_DIR=$1
|
||||
# check that MANIFESTS_DIR is a directory
|
||||
if [ ! -d "$MANIFESTS_DIR" ]; then
|
||||
echo "Error: $MANIFESTS_DIR is not a directory"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# ensure that we are running on x86_64 architecture
|
||||
if [ "$(uname -m)" != "x86_64" ]; then
|
||||
echo "Error: this script is only supported on x86_64 architecture"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
. /etc/os-release
|
||||
|
||||
case "${ID}-${VERSION_ID}" in
|
||||
fedora-*)
|
||||
IMAGE_MANIFEST="${MANIFESTS_DIR}/fedora.json"
|
||||
;;
|
||||
rhel-8.*)
|
||||
IMAGE_MANIFEST="${MANIFESTS_DIR}/rhel-8.json"
|
||||
;;
|
||||
rhel-9.*)
|
||||
IMAGE_MANIFEST="${MANIFESTS_DIR}/rhel-9.json"
|
||||
;;
|
||||
centos-8)
|
||||
IMAGE_MANIFEST="${MANIFESTS_DIR}/centos-8.json"
|
||||
;;
|
||||
centos-9)
|
||||
IMAGE_MANIFEST="${MANIFESTS_DIR}/centos-9.json"
|
||||
;;
|
||||
centos-10)
|
||||
IMAGE_MANIFEST="${MANIFESTS_DIR}/centos-10.json"
|
||||
;;
|
||||
*)
|
||||
echo "Error: unsupported OS: ${ID}-${VERSION_ID}"
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
OUTPUT_DIR=/var/tmp/osbuild-output
|
||||
STORE_DIR=/var/tmp/osbuild-store
|
||||
sudo mkdir -p "${OUTPUT_DIR}"
|
||||
sudo mkdir -p "${STORE_DIR}"
|
||||
|
||||
# all the images are built with qcow2 format, so export it
|
||||
EXPORT_PIPELINE="qcow2"
|
||||
|
||||
sudo osbuild --output-directory "${OUTPUT_DIR}" --store "${STORE_DIR}" --export "${EXPORT_PIPELINE}" "${IMAGE_MANIFEST}"
|
||||
4
tests/image-build/main.fmf
Normal file
4
tests/image-build/main.fmf
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
summary: Build simple image using osbuild
|
||||
tag: integration-test
|
||||
duration: 1h
|
||||
test: ./build-images.sh ./manifests
|
||||
3518
tests/image-build/manifests/centos-10.json
Normal file
3518
tests/image-build/manifests/centos-10.json
Normal file
File diff suppressed because it is too large
Load diff
7202
tests/image-build/manifests/centos-8.json
Normal file
7202
tests/image-build/manifests/centos-8.json
Normal file
File diff suppressed because it is too large
Load diff
6799
tests/image-build/manifests/centos-9.json
Normal file
6799
tests/image-build/manifests/centos-9.json
Normal file
File diff suppressed because it is too large
Load diff
7073
tests/image-build/manifests/fedora.json
Normal file
7073
tests/image-build/manifests/fedora.json
Normal file
File diff suppressed because it is too large
Load diff
4083
tests/image-build/manifests/rhel-8.json
Normal file
4083
tests/image-build/manifests/rhel-8.json
Normal file
File diff suppressed because it is too large
Load diff
7021
tests/image-build/manifests/rhel-9.json
Normal file
7021
tests/image-build/manifests/rhel-9.json
Normal file
File diff suppressed because it is too large
Load diff
|
|
@ -1,19 +0,0 @@
|
|||
---
|
||||
- hosts: localhost
|
||||
roles:
|
||||
- role: standard-test-source
|
||||
tags:
|
||||
- always
|
||||
- role: standard-test-basic
|
||||
tags:
|
||||
- atomic
|
||||
- classic
|
||||
required_packages:
|
||||
- osbuild
|
||||
tests:
|
||||
- smoke:
|
||||
dir: smoke
|
||||
run: osbuild --help
|
||||
- image:
|
||||
dir: .
|
||||
run: osbuild source/samples/base-qcow2.json
|
||||
4
tests/unit-tests/main.fmf
Normal file
4
tests/unit-tests/main.fmf
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
summary: Run osbuild unit tests from dist-git sources
|
||||
tag: unit-test
|
||||
duration: 4h
|
||||
test: ./prep-host-environment.sh; sudo chcon $(matchpathcon -n /usr/bin/osbuild) ./run-unit-tests.sh; ./run-unit-tests.sh
|
||||
35
tests/unit-tests/prep-host-environment.sh
Executable file
35
tests/unit-tests/prep-host-environment.sh
Executable file
|
|
@ -0,0 +1,35 @@
|
|||
#!/usr/bin/bash
|
||||
# Prepare the host environment for running the osbuild unit tests.
|
||||
# This includes installing missing dependencies and tools.
|
||||
|
||||
set -euxo pipefail
|
||||
|
||||
source /etc/os-release
|
||||
|
||||
# Move to the checked out git repo with the test plans
|
||||
# this should be the root of the dist-git repo
|
||||
cd "${TMT_TREE}"
|
||||
|
||||
# install all test dependencies
|
||||
sudo dnf install -y \
|
||||
rpmdevtools \
|
||||
python3-mako \
|
||||
python3-pip \
|
||||
rpm-ostree \
|
||||
dosfstools \
|
||||
gdisk \
|
||||
python3-tomli-w
|
||||
sudo dnf builddep -y osbuild.spec
|
||||
|
||||
# Install pytst from pip, because the version in some RHEL / CentOS releases is too old
|
||||
sudo pip3 install pytest
|
||||
|
||||
# Make sure that /usr/lib/systemd/boot/efi/linuxx64.efi.stub is available to enable pe32p tests
|
||||
case "${ID}-${VERSION_ID}" in
|
||||
rhel-8.* | centos-8)
|
||||
sudo dnf install -y systemd-udev
|
||||
;;
|
||||
*)
|
||||
sudo dnf install -y systemd-boot-unsigned
|
||||
;;
|
||||
esac
|
||||
55
tests/unit-tests/run-unit-tests.sh
Executable file
55
tests/unit-tests/run-unit-tests.sh
Executable file
|
|
@ -0,0 +1,55 @@
|
|||
#!/usr/bin/bash
|
||||
# Execute osbuild unit tests from a checked out dist-git repo
|
||||
|
||||
set -euxo pipefail
|
||||
|
||||
source /etc/os-release
|
||||
|
||||
# The 'test/run/test_assemblers.py::test_tar' test case uses system tar to extract the built tar archive.
|
||||
# However, files in the tar archive can have SELinux context not present in the system policy. Therefore,
|
||||
# in order for the system tar to be able to set it when extracting the archive, it must be labeled with
|
||||
# 'install_exec_t' type.
|
||||
|
||||
ORIGINAL_TAR_CONTEXT="$(matchpathcon -n "$(which tar)")"
|
||||
sudo chcon "system_u:object_r:install_exec_t:s0" "$(which tar)"
|
||||
function restore_tar_context() {
|
||||
sudo chcon "${ORIGINAL_TAR_CONTEXT}" "$(which tar)"
|
||||
}
|
||||
trap restore_tar_context EXIT
|
||||
|
||||
# Run the unit tests
|
||||
# Note:
|
||||
# - Ignore the boot test, because it requires qemu-system-x86_64 not available on all distributions.
|
||||
# - Ignore source code tests, which run linters, since we can't ensure that all linters are available
|
||||
# and of the same version as in upstream.
|
||||
# - Explicitly mark btrfs as unsupported on CentOS / RHEL
|
||||
|
||||
if [ "${ID}" == "centos" ] || [ "${ID}" == "rhel" ]; then
|
||||
UNSUPPORTED_FS="--unsupported-fs btrfs"
|
||||
fi
|
||||
|
||||
TEST_SELECTION_EXPR="not (TestBoot and boot)"
|
||||
|
||||
# disable some tests on RHEL-8
|
||||
if ([ "${ID}" == "rhel" ] || [ "${ID}" == "centos" ]) && [ "${VERSION_ID%%.*}" == "8" ]; then
|
||||
# qemu-img info in RHEL-8 produces "raw" as the image format for "vdi" images, which causes tests to fail. Skip it.
|
||||
TEST_SELECTION_EXPR="${TEST_SELECTION_EXPR} and not (test_qemu[ext4-vdi] or test_qemu[xfs-vdi])"
|
||||
TEST_SELECTION_EXPR="${TEST_SELECTION_EXPR} and not (TestStages and test_qemu)"
|
||||
fi
|
||||
|
||||
# Move to the directory with sources
|
||||
cd "${TMT_SOURCE_DIR}"
|
||||
|
||||
# Extract the Source0 basename without extension
|
||||
SRC_DIR=$(spectool --source 0 osbuild.spec | sed 's/.\+\(osbuild-[0-9]\+\)\.tar\.gz/\1/')
|
||||
|
||||
# Move to the extracted sources directory (patches are applied by default)
|
||||
cd "${SRC_DIR}"
|
||||
|
||||
sudo python3 -m pytest \
|
||||
--rootdir "$(pwd)" \
|
||||
--ignore "$(pwd)/test/src" \
|
||||
${UNSUPPORTED_FS:-} \
|
||||
-k "${TEST_SELECTION_EXPR}" \
|
||||
-v \
|
||||
"$(pwd)/test/"
|
||||
Loading…
Add table
Add a link
Reference in a new issue