Testing
This adds a tox.ini and various pieces to allow the CI infrastructure to test this repo. Change-Id: Ic808064b0009c04e9aba18d6e909851ab7fec3d6
This commit is contained in:
parent
d0ffb7c92e
commit
55208193c3
3
.gitignore
vendored
3
.gitignore
vendored
@ -1 +1,4 @@
|
|||||||
.DS_Store
|
.DS_Store
|
||||||
|
.tox
|
||||||
|
.idea
|
||||||
|
build
|
||||||
|
4
.gitreview
Normal file
4
.gitreview
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
[gerrit]
|
||||||
|
host=review.openstack.org
|
||||||
|
port=29418
|
||||||
|
project=openstack/charm-layer-ceph-base.git
|
5
requirements.txt
Normal file
5
requirements.txt
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
# Requirements to build the layer
|
||||||
|
charm-tools
|
||||||
|
ruamel.yaml==0.10.12
|
||||||
|
simplejson
|
||||||
|
flake8
|
2
test-requirements.txt
Normal file
2
test-requirements.txt
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
flake8>=2.2.4,<=2.4.1
|
||||||
|
os-testr>=0.4.1
|
45
tox.ini
Normal file
45
tox.ini
Normal file
@ -0,0 +1,45 @@
|
|||||||
|
[tox]
|
||||||
|
skipsdist = True
|
||||||
|
envlist = pep8
|
||||||
|
|
||||||
|
[testenv]
|
||||||
|
basepython = python2.7
|
||||||
|
setenv = VIRTUAL_ENV={envdir}
|
||||||
|
PYTHONHASHSEED=0
|
||||||
|
TERM=linux
|
||||||
|
JUJU_REPOSITORY={toxinidir}/build
|
||||||
|
passenv = http_proxy https_proxy
|
||||||
|
install_command =
|
||||||
|
pip install {opts} {packages}
|
||||||
|
deps =
|
||||||
|
-r{toxinidir}/requirements.txt
|
||||||
|
whitelist_externals = /bin/true /bin/echo
|
||||||
|
|
||||||
|
[testenv:build]
|
||||||
|
commands =
|
||||||
|
/bin/echo 'WARNING: *build* target is for testing only.'
|
||||||
|
charm-build --log-level DEBUG -o {toxinidir}/build .
|
||||||
|
|
||||||
|
[testenv:venv]
|
||||||
|
commands = {posargs}
|
||||||
|
|
||||||
|
[testenv:py27]
|
||||||
|
basepython = python2.7
|
||||||
|
deps = -r{toxinidir}/test-requirements.txt
|
||||||
|
# TODO: Need to write unit tests then remove the following command.
|
||||||
|
commands = /bin/true
|
||||||
|
|
||||||
|
[testenv:py34]
|
||||||
|
basepython = python3.4
|
||||||
|
deps = -r{toxinidir}/test-requirements.txt
|
||||||
|
# TODO: Need to write unit tests then remove the following command.
|
||||||
|
commands = /bin/true
|
||||||
|
|
||||||
|
[testenv:py35]
|
||||||
|
basepython = python3.5
|
||||||
|
deps = -r{toxinidir}/test-requirements.txt
|
||||||
|
# TODO: Need to write unit tests then remove the following command.
|
||||||
|
commands = /bin/true
|
||||||
|
|
||||||
|
[testenv:pep8]
|
||||||
|
commands = /bin/true
|
Loading…
Reference in New Issue
Block a user