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
|
||||
set -eux
|
||||
|
||||
: ${1?"Usage: $0 TESTSDIR"}
|
||||
|
||||
TESTSDIR="$1"
|
||||
SOURCEDIR="${TESTSDIR}/source/"
|
||||
PACKAGE=parted
|
||||
|
||||
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}
|
||||
# make a small disk image
|
||||
fallocate -l 100M ./disk.img
|
||||
parted -s ./disk.img mklabel gpt
|
||||
parted -s ./disk.img 'mkpart root 1MiB 100%'
|
||||
parted -m -s ./disk.img u s p
|
||||
|
@ -1,14 +1,13 @@
|
||||
---
|
||||
# Run a simple parted test
|
||||
- hosts: localhost
|
||||
tags:
|
||||
- classic
|
||||
roles:
|
||||
- role: standard-test-source
|
||||
required_packages:
|
||||
- dnf
|
||||
- rpm-build
|
||||
- git
|
||||
- role: standard-test-basic
|
||||
tests:
|
||||
- simple:
|
||||
run: "./run_tests.sh {{ tenv_workdir }}"
|
||||
- role: standard-test-basic
|
||||
tags:
|
||||
- classic
|
||||
required_packages:
|
||||
- parted
|
||||
|
||||
tests:
|
||||
- simple:
|
||||
run: ./run_tests.sh
|
||||
|
Loading…
Reference in New Issue
Block a user