Integration test PBR commits

* pbr/packaging.py(_get_version_from_git): Correct a bug which is
causing install failures for PBR-based projects with no Git tags.
This slipped through because integration testing was using the most
recent PBR release rather than the commit being proposed.

* tools/integration.sh: Make sure that if a PBR commit is being
tested then we install and use that source rather than the latest
PBR release.

* tox.ini(testenv:pep8): Get rid of the custom deps list for pep8
and inherit the one from testenv which is already fixed with the
self-dependency. Without this, pep8 jobs fail when run with
Setuptools 8.

Change-Id: Icc7275261e8fc0df8b0ae99184437ca50b89c13a
This commit is contained in:
Jeremy Stanley 2014-12-21 16:50:41 +00:00
parent 0acee45efb
commit cd7da23937
3 changed files with 8 additions and 3 deletions

View File

@ -490,7 +490,7 @@ def _get_version_from_git(pre_version):
# First, if there are no -'s or .'s, then it's just a short sha.
# Create a synthetic version for it.
if '-' not in raw_version and '.' not in raw_version:
return "0.0.0.post%s" % _get_revno_and_last_tag(git_dir)[0]
return "0.0.0.post%s" % _get_revno_and_last_tag(git_dir)
# Now, we want to strip the short-sha prefix
stripped_version = raw_version.split('-g')[0]
# Finally, if we convert - to .post, which will turn the remaining

View File

@ -6,6 +6,9 @@ function mkvenv {
rm -rf $venv
virtualenv $venv
$venv/bin/pip install -U pip wheel
if [ $ZUUL_PROJECT = "openstack-dev/pbr" ] ; then
$venv/bin/pip install $pbrsdistdir
fi
}
# BASE should be a directory with a subdir called "new" and in that
@ -34,6 +37,10 @@ PROJECTS=$*
pbrsdistdir=$tmpdir/pbrsdist
git clone $REPODIR/pbr $pbrsdistdir
cd $pbrsdistdir
if [ $ZUUL_PROJECT = "openstack-dev/pbr" ] ; then
git fetch $ZUUL_URL/$ZUUL_PROJECT $ZUUL_REF
git reset --hard FETCH_HEAD
fi
eptest=$tmpdir/eptest
mkdir $eptest

View File

@ -21,8 +21,6 @@ sitepackages = True
downloadcache = ~/cache/pip
[testenv:pep8]
deps = -r{toxinidir}/requirements.txt
-r{toxinidir}/test-requirements.txt
commands = flake8 {posargs}
[testenv:cover]