gating: Switch test to run parted directly
Tests should run the installed package, not the source. So use the test from RHEL 8.5.0 instead of from Fedora. Resolves: rhbz#1968763
This commit is contained in:
parent
6cea6cf291
commit
4a98456ce3
@ -1,29 +1,8 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
set -eux
|
set -eux
|
||||||
|
|
||||||
: ${1?"Usage: $0 TESTSDIR"}
|
# make a small disk image
|
||||||
|
fallocate -l 100M ./disk.img
|
||||||
TESTSDIR="$1"
|
parted -s ./disk.img mklabel gpt
|
||||||
SOURCEDIR="${TESTSDIR}/source/"
|
parted -s ./disk.img 'mkpart root 1MiB 100%'
|
||||||
PACKAGE=parted
|
parted -m -s ./disk.img u s p
|
||||||
|
|
||||||
cd "${TESTSDIR}"
|
|
||||||
if [ ! -e ${PACKAGE}.spec ]; then
|
|
||||||
echo "Missing ${PACKAGE}.spec"
|
|
||||||
pwd
|
|
||||||
ls
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
# This runs from the ./tests/ directory
|
|
||||||
# Install the dependencies from the spec which MUST be copied over by tests.yml
|
|
||||||
dnf -y build-dep ${PACKAGE}.spec
|
|
||||||
|
|
||||||
# Flattened sources from standard-role-sources
|
|
||||||
cd "${SOURCEDIR}" || exit
|
|
||||||
|
|
||||||
# Rebuild the package in place, also runs the %check
|
|
||||||
# skip %prep, it was already run on the source before it was copied over
|
|
||||||
rpmbuild --noprep --nodeps -bb --build-in-place "${TESTSDIR}/${PACKAGE}.spec"
|
|
||||||
RET=$?
|
|
||||||
exit ${RET}
|
|
||||||
|
@ -1,14 +1,13 @@
|
|||||||
---
|
---
|
||||||
|
# Run a simple parted test
|
||||||
- hosts: localhost
|
- hosts: localhost
|
||||||
tags:
|
|
||||||
- classic
|
|
||||||
roles:
|
roles:
|
||||||
- role: standard-test-source
|
- role: standard-test-basic
|
||||||
required_packages:
|
tags:
|
||||||
- dnf
|
- classic
|
||||||
- rpm-build
|
required_packages:
|
||||||
- git
|
- parted
|
||||||
- role: standard-test-basic
|
|
||||||
tests:
|
tests:
|
||||||
- simple:
|
- simple:
|
||||||
run: "./run_tests.sh {{ tenv_workdir }}"
|
run: ./run_tests.sh
|
||||||
|
Loading…
Reference in New Issue
Block a user