Add tox tests/pep8 for devstack-gate scripts.

Bug: 1010610

With this commit, we could run py26, py27 and pep8 tests
against these scripts, using tox.

* .gitignore
  Ignore build files.

* MANIFEST.in
  List of files to include in sdist package.

* setup.cfg
  Setup configuration.

* setup.py
  Script to generate sdist package.

* tools/pip-requires
  Pip dependency list.

* tools/test-requires
  Extensive list of dependencies to execute tests.

* tox.ini
  Tox targets.

Change-Id: I3f14af096b3078214d0747c2ab99b0a42b5190e9
This commit is contained in:
Bhuvan Arumugam
2012-06-15 23:09:14 -07:00
parent d8233a2dc7
commit 33fbc416ba
7 changed files with 80 additions and 1 deletions

16
.gitignore vendored
View File

@@ -1,2 +1,16 @@
*.pyc
*~
*.swp
vendor
.ksl-venv
.venv
.tox
devstack_gate.egg-info/
*.log
.coverage
covhtml
pep8.txt
nosetests.xml
*.db
.DS_Store
build/
dist/

7
MANIFEST.in Normal file
View File

@@ -0,0 +1,7 @@
include README.md
include setup.cfg
include setup.py
include tox.ini
graft tests
graft tools
global-exclude *.pyc *.sdx *.log *.db *.swp

10
setup.cfg Normal file
View File

@@ -0,0 +1,10 @@
[egg_info]
tag_build =
tag_date = 0
tag_svn_revision = 0
[nosetests]
verbosity=2
detailed-errors=1
cover-erase = true
cover-inclusive = true

25
setup.py Normal file
View File

@@ -0,0 +1,25 @@
import os
import sys
import setuptools
setuptools.setup(
name="devstack-gate",
version="2012.2",
description="Devstack gate scripts used by Openstack CI team for testing longest line in this screen",
url='https://github.com/openstack-ci/devstack-gate',
license='Apache',
author='Openstack CI team',
author_email='openstack@lists.launchpad.net',
packages=setuptools.find_packages(exclude=['tests', 'tests.*']),
classifiers=[
'Development Status :: 4 - Beta',
'Environment :: Console',
'Intended Audience :: Developers',
'Intended Audience :: Information Technology',
'License :: OSI Approved :: Apache Software License',
'Operating System :: OS Independent',
'Programming Language :: Python',
],
test_suite="nose.collector",
)

3
tools/pip-requires Normal file
View File

@@ -0,0 +1,3 @@
# devstack-gate dependencies
sqlalchemy
sqlalchemy-migrate

8
tools/test-requires Normal file
View File

@@ -0,0 +1,8 @@
# Testing
coverage # computes code coverage percentages
mox # mock object framework
nose # for test discovery and console feedback
nosexcover
pylint # static code analysis
pep8==0.6.1 # checks for PEP8 code style compliance
unittest2 # backport of unittest lib in python 2.7

12
tox.ini Normal file
View File

@@ -0,0 +1,12 @@
[tox]
envlist = py26,py27,pep8
[testenv]
deps = -r{toxinidir}/tools/pip-requires
-r{toxinidir}/tools/test-requires
commands = nosetests {posargs}
[testenv:pep8]
deps = pep8
commands = pep8 --count --repeat --show-source --exclude=.tox setup.py .