pyparted/tests/scripts/run_tests.sh
Troy Dawson 6f21fb7342 RHEL 9.0.0 Alpha bootstrap
The content of this branch was automatically imported from Fedora ELN
with the following as its source:
https://src.fedoraproject.org/rpms/pyparted#6e7f603dcaeec1eddc02ce72fecd64eabe27189d
2020-10-14 16:42:47 -07:00

30 lines
546 B
Bash
Executable File

#!/bin/sh
PATH=/usr/bin
TMPDIR="$(mktemp -d)"
CWD="$(pwd)"
PACKAGE=pyparted
BRANCH=
# clone the dist-git tree for this package
cd ${TMPDIR}
fedpkg co ${PACKAGE}
cd ${PACKAGE}
[ -z "${BRANCH}" ] || fedpkg switch-branch ${BRANCH}
fedpkg prep
# scramble together the extracted source tree name
SRCDIR="${PACKAGE}-$(grep Version: ${PACKAGE}.spec | cut -d ' ' -f 2)"
# run the tests
cd ${SRCDIR}
#make check # this runs pylint, which is sometimes wrong/noisy
make test
RET=$?
# clean up and exit
cd ${CWD}
rm -rf ${TMPDIR}
exit ${RET}