Add Fedora CI tests and gating files for pykickstart.
This commit is contained in:
parent
1b50657062
commit
ba5324f83c
6
gating.yml
Normal file
6
gating.yml
Normal file
@ -0,0 +1,6 @@
|
||||
--- !Policy
|
||||
product_versions:
|
||||
- fedora-*
|
||||
decision_context: bodhi_update_push_testing
|
||||
rules:
|
||||
- !PassingTestCaseRule {test_case_name: dist.depcheck}
|
31
tests/scripts/run_tests.sh
Executable file
31
tests/scripts/run_tests.sh
Executable file
@ -0,0 +1,31 @@
|
||||
#!/bin/sh
|
||||
|
||||
PATH=/usr/bin
|
||||
TMPDIR="$(mktemp -d)"
|
||||
CWD="$(pwd)"
|
||||
|
||||
PACKAGE=pykickstart
|
||||
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
|
||||
CHECK_RET=$?
|
||||
make test
|
||||
TEST_RET=$?
|
||||
RET=$((${CHECK_RET} + ${TEST_RET}))
|
||||
|
||||
# clean up and exit
|
||||
cd ${CWD}
|
||||
rm -rf ${TMPDIR}
|
||||
exit ${RET}
|
15
tests/tests.yml
Normal file
15
tests/tests.yml
Normal 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
|
Loading…
Reference in New Issue
Block a user