updates for tests
This commit is contained in:
parent
462715f0a6
commit
27a0e270e3
8
.gitignore
vendored
8
.gitignore
vendored
@ -10,4 +10,10 @@
|
||||
*.sql
|
||||
.tox
|
||||
.venv
|
||||
.testrepository
|
||||
.testrepository
|
||||
.test
|
||||
AUTHORS
|
||||
build/*
|
||||
ChangeLog
|
||||
doc/build/*
|
||||
dist/
|
||||
|
@ -0,0 +1 @@
|
||||
gear
|
31
setup.cfg
Normal file
31
setup.cfg
Normal file
@ -0,0 +1,31 @@
|
||||
[metadata]
|
||||
name = turbo-hipster
|
||||
summary = A set of CI tools for openstack
|
||||
description-file = README.md
|
||||
author = Rackspace Australia
|
||||
author-email = joshua.hesketh@rackspace.com
|
||||
classifier =
|
||||
Intended Audience :: Information Technology
|
||||
Intended Audience :: System Administrators
|
||||
License :: OSI Approved :: Apache Software License
|
||||
Operating System :: POSIX :: Linux
|
||||
Programming Language :: Python
|
||||
Programming Language :: Python :: 2
|
||||
Programming Language :: Python :: 2.7
|
||||
Programming Language :: Python :: 2.6
|
||||
|
||||
[pbr]
|
||||
warnerrors = True
|
||||
|
||||
[global]
|
||||
setup-hooks =
|
||||
pbr.hooks.setup_hook
|
||||
|
||||
[entry_points]
|
||||
console_scripts =
|
||||
worker_server = turbo_hipster.worker_server:main
|
||||
|
||||
[build_sphinx]
|
||||
source-dir = doc/source
|
||||
build-dir = doc/build
|
||||
all_files = 1
|
27
setup.py
27
setup.py
@ -15,27 +15,8 @@
|
||||
# under the License.
|
||||
|
||||
|
||||
import os
|
||||
from setuptools import setup
|
||||
import setuptools
|
||||
|
||||
# Utility function to read the README file.
|
||||
# Used for the long_description. It's nice, because now 1) we have a top level
|
||||
# README file and 2) it's easier to type in the README file than to put a raw
|
||||
# string in below ...
|
||||
def read(fname):
|
||||
return open(os.path.join(os.path.dirname(__file__), fname)).read()
|
||||
|
||||
setup(
|
||||
name = "turbo-hipster",
|
||||
version = "0.0.1",
|
||||
author = "Joshua Hesketh",
|
||||
author_email = "josh@nitrotech.org",
|
||||
description = ("A set of CI tools for openstack."),
|
||||
license = "GPLv2",
|
||||
keywords = "",
|
||||
url = "https://github.com/rcbau/turbo-hipster",
|
||||
packages=['turbo_hipster', 'tests'],
|
||||
long_description=read('README.md'),
|
||||
classifiers=[
|
||||
],
|
||||
)
|
||||
setuptools.setup(
|
||||
setup_requires=['d2to1', 'pbr'],
|
||||
d2to1=True)
|
||||
|
31
tox.ini
31
tox.ini
@ -4,7 +4,7 @@
|
||||
# and then run "tox" from this directory.
|
||||
|
||||
[tox]
|
||||
envlist = py26, py27, py33
|
||||
envlist = pep8, pyflakes, py26, py27, py33
|
||||
|
||||
[testenv]
|
||||
sitepackages = True
|
||||
@ -12,7 +12,30 @@ setenv = VIRTUAL_ENV={envdir}
|
||||
LANG=en_US.UTF-8
|
||||
LANGUAGE=en_US:en
|
||||
LC_ALL=C
|
||||
deps = -U
|
||||
-r{toxinidir}/requirements.txt
|
||||
deps = -r{toxinidir}/requirements.txt
|
||||
-r{toxinidir}/test-requirements.txt
|
||||
commands = {envpython} setup.py test
|
||||
commands =
|
||||
python setup.py testr --slowest --testr-args='{posargs}'
|
||||
|
||||
[tox:jenkins]
|
||||
downloadcache = ~/cache/pip
|
||||
|
||||
[testenv:pep8]
|
||||
commands = flake8
|
||||
|
||||
[testenv:cover]
|
||||
commands =
|
||||
python setup.py testr --coverage
|
||||
|
||||
[testenv:pyflakes]
|
||||
deps = pyflakes
|
||||
-r{toxinidir}/requirements.txt
|
||||
commands = pyflakes turbo-hipster setup.py
|
||||
|
||||
[testenv:venv]
|
||||
commands = {posargs}
|
||||
|
||||
[flake8]
|
||||
ignore = E125,H
|
||||
show-source = True
|
||||
exclude = .venv,.tox,dist,doc,build,*.egg
|
||||
|
@ -184,12 +184,12 @@ def push_file(job_name, file_path, publish_config):
|
||||
def swift_push_file(job_name, file_path, swift_config):
|
||||
""" Push a log file to a swift server. """
|
||||
with open(file_path, 'r') as fd:
|
||||
name = filename
|
||||
name = job_name + '_' + os.path.basename(file_path)
|
||||
con = swiftclient.client.Connection(swift_config['authurl'],
|
||||
swift_config['user'],
|
||||
swift_config['apikey'])
|
||||
obj = con.put_object(swift_config['container'], name, fd)
|
||||
return con.get_object(swift_config['container'], name)
|
||||
return obj
|
||||
|
||||
|
||||
def local_push_file(job_name, file_path, local_config):
|
||||
|
Loading…
x
Reference in New Issue
Block a user