diff options
author | Jeremy Stanley <fungi@yuggoth.org> | 2014-12-21 16:50:41 +0000 |
---|---|---|
committer | Jeremy Stanley <fungi@yuggoth.org> | 2014-12-21 18:35:27 +0000 |
commit | cd7da23937b66fea3ec42fa2f5a128f363a97e7e (patch) | |
tree | 104fb7b2239523180e984365d9be05a4049b6e32 | |
parent | 0acee45efb9852599f0604ce1539febc350a50c0 (diff) | |
download | pbr-cd7da23937b66fea3ec42fa2f5a128f363a97e7e.tar.gz |
Integration test PBR commits0.10.6
* 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
-rw-r--r-- | pbr/packaging.py | 2 | ||||
-rw-r--r-- | tools/integration.sh | 7 | ||||
-rw-r--r-- | tox.ini | 2 |
3 files changed, 8 insertions, 3 deletions
diff --git a/pbr/packaging.py b/pbr/packaging.py index 6020a81..c84ce73 100644 --- a/pbr/packaging.py +++ b/pbr/packaging.py @@ -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 diff --git a/tools/integration.sh b/tools/integration.sh index 7d6038a..58ffac8 100644 --- a/tools/integration.sh +++ b/tools/integration.sh @@ -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 @@ -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] |