parted/tests/simple/run_tests.sh
Brian C. Lane e4f4556ff6 - Run the CI tests using rpmbuild
- t6000-dm: Stop using private lvm root
2019-03-01 10:45:52 -08:00

30 lines
678 B
Bash
Executable File

#!/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}