Clean up output dir before creating new renderspecs

This avoids left-over files from previous runs affecting
the test results

Change-Id: I30fe43a9b406321550132267acf25801e15d1178
This commit is contained in:
Dirk Mueller 2016-06-24 01:14:29 +02:00
parent 179d3f891c
commit 8e1980f9c6

View File

@ -6,11 +6,19 @@ basedir=$1
specdir=${basedir}/openstack/
WORKSPACE=${WORKSPACE:-$basedir}
OUTPUTDIR=$WORKSPACE/logs/
specstyles="suse fedora"
mkdir -p $OUTPUTDIR
# clean up output dir
for specstyle in $specstyles; do
rm -f $OUTPUTDIR/*.${specstyle}
done
echo "run renderspec over specfiles from ${specdir}"
for spec in ${specdir}/**/*.spec.j2; do
mkdir -p $WORKSPACE/logs/
for specstyle in "suse" "fedora"; do
for specstyle in $specstyles; do
echo "run ${spec} for ${specstyle}"
renderspec --spec-style ${specstyle} ${spec} \
-o $WORKSPACE/logs/${spec##*/}.${specstyle}