Add test for rebuilding qmeu
This commit is contained in:
parent
8f44f59b6f
commit
dec0f4d3da
3 changed files with 41 additions and 0 deletions
17
tests/lib.sh
Normal file
17
tests/lib.sh
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
#!/bin/bash
|
||||
|
||||
. /usr/share/beakerlib/beakerlib.sh || exit 1
|
||||
|
||||
function llvmRebuildPackage() {
|
||||
|
||||
local pkg=$1
|
||||
|
||||
rlRun "dnf download --source $pkg"
|
||||
rlRun "koji_srpm=$(ls $pkg*.src.rpm)"
|
||||
# We need to rebuild the source RPM, so that we get the correct BuildRequires
|
||||
# for this platform.
|
||||
rlRun "rpmbuild -D 'toolchain clang' -rs --nodeps $koji_srpm"
|
||||
rlRun "srpm=$(ls $HOME/rpmbuild/SRPMS/$pkg*.src.rpm)"
|
||||
rlRun "dnf builddep -y $srpm"
|
||||
rlRun "rpmbuild -D 'toolchain clang' --rebuild $srpm"
|
||||
}
|
||||
11
tests/rebuild-qemu/main.fmf
Normal file
11
tests/rebuild-qemu/main.fmf
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
summary: Rebuild the qemu package
|
||||
framework: beakerlib
|
||||
duration: 5h
|
||||
tier: 1
|
||||
|
||||
require+:
|
||||
- clang
|
||||
- rpm-build
|
||||
- type: file
|
||||
pattern:
|
||||
- lib.sh
|
||||
13
tests/rebuild-qemu/test.sh
Executable file
13
tests/rebuild-qemu/test.sh
Executable file
|
|
@ -0,0 +1,13 @@
|
|||
# This also sources the beakerlib helpers
|
||||
. "$TMT_TREE/tests/lib.sh" || exit 1
|
||||
|
||||
rlJournalStart
|
||||
rlPhaseStartTest
|
||||
rlRun "env"
|
||||
# TODO: I think it would be better to pass the $distro variable here
|
||||
# explicitly, but I couldn't figure out how to put the distro context
|
||||
# value from tmt into an environment variable.
|
||||
rlRun "llvmRebuildPackage qemu"
|
||||
rlPhaseEnd
|
||||
|
||||
rlJournalEnd
|
||||
Loading…
Add table
Add a link
Reference in a new issue