Add Fedora CI gating tests for pyparted.

This commit is contained in:
David Cantrell 2018-12-19 09:55:01 -05:00
parent efb99947ae
commit b859cadf3f
3 changed files with 50 additions and 0 deletions

6
gating.yml Normal file
View File

@ -0,0 +1,6 @@
--- !Policy
product_versions:
- fedora-*
decision_context: bodhi_update_push_testing
rules:
- !PassingTestCaseRule {test_case_name: dist.depcheck}

29
tests/scripts/run_tests.sh Executable file
View File

@ -0,0 +1,29 @@
#!/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}

15
tests/tests.yaml Normal file
View File

@ -0,0 +1,15 @@
---
- hosts: localhost
roles:
- role: standard-test-basic
tags:
- classic
required_packages:
- fedpkg
tests:
- simple:
dir: scripts/
run: run_tests.sh