Add basic renderspec test integration
Use renderspec to render the jinja2 templates into real RPM spec files. Abort if the conversion doesn't work. Change-Id: I31edbe16129a627236db0c980602ca23a0ba2a4a
This commit is contained in:
parent
b960d13dd0
commit
bf55ef3508
1
test-requirements.txt
Normal file
1
test-requirements.txt
Normal file
@ -0,0 +1 @@
|
||||
-e git+https://git.openstack.org/openstack/renderspec#egg=renderspec
|
18
tools/run_renderspec.sh
Executable file
18
tools/run_renderspec.sh
Executable file
@ -0,0 +1,18 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -eux
|
||||
|
||||
basedir=$1
|
||||
specdir=${basedir}/openstack/
|
||||
|
||||
WORKSPACE=${WORKSPACE:-$basedir}
|
||||
|
||||
echo "run renderspec over specfiles from ${specdir}"
|
||||
for spec in ${specdir}/**/*.spec.j2; do
|
||||
mkdir -p $WORKSPACE/logs/
|
||||
for specstyle in "suse" "fedora"; do
|
||||
echo "run ${spec} for ${specstyle}"
|
||||
renderspec --spec-style ${specstyle} ${spec} \
|
||||
-o $WORKSPACE/logs/`basename ${spec}`.${specstyle}
|
||||
done
|
||||
done
|
20
tox.ini
Normal file
20
tox.ini
Normal file
@ -0,0 +1,20 @@
|
||||
[tox]
|
||||
minversion = 1.8
|
||||
envlist = rpm-packaging-lint
|
||||
skipsdist = True
|
||||
|
||||
[testenv]
|
||||
setenv = VIRTUAL_ENV={envdir}
|
||||
install_command = pip install -U {opts} {packages}
|
||||
deps = -r{toxinidir}/test-requirements.txt
|
||||
passenv = http_proxy HTTP_PROXY https_proxy HTTPS_PROXY no_proxy NO_PROXY
|
||||
|
||||
[tox:jenkins]
|
||||
downloadcache = ~/cache/pip
|
||||
|
||||
[testenv:rpm-packaging-lint]
|
||||
commands =
|
||||
{toxinidir}/tools/run_renderspec.sh {toxinidir}
|
||||
|
||||
[testenv:venv]
|
||||
commands = {posargs}
|
Loading…
x
Reference in New Issue
Block a user