diff options
author | 2015-03-30 00:27:16 -0400 | |
---|---|---|
committer | 2015-03-30 01:35:20 -0400 | |
commit | 37563137727e42d0b4447d7d09db306fb8f95137 (patch) | |
tree | 381d9cd464e91355f918ad0f4e171836f01be92d /tox.ini | |
parent | various setup.py info updates (diff) | |
download | pkgcheck-37563137727e42d0b4447d7d09db306fb8f95137.tar.gz pkgcheck-37563137727e42d0b4447d7d09db306fb8f95137.tar.bz2 pkgcheck-37563137727e42d0b4447d7d09db306fb8f95137.zip |
add tox and coverage config files
Diffstat (limited to 'tox.ini')
-rw-r--r-- | tox.ini | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/tox.ini b/tox.ini new file mode 100644 index 00000000..c29d8df1 --- /dev/null +++ b/tox.ini @@ -0,0 +1,28 @@ +[tox] +envlist = py27, py33, py34 +skipsdist = True +[testenv] +whitelist_externals = bash +# need to install manually using setup.py for now +skip_install = True +deps = + pytest + mock + coverage>3.9 +commands = + bash -c '\ + [[ -d {toxworkdir}/snakeoil ]] || ( mkdir "{toxworkdir}/snakeoil" && wget -O - https://github.com/pkgcore/snakeoil/archive/master.tar.gz | tar -xz --strip-components=1 -C "{toxworkdir}/snakeoil" ) && \ + [[ -d {toxworkdir}/pkgcore ]] || ( mkdir "{toxworkdir}/pkgcore" && wget -O - https://github.com/pkgcore/pkgcore/archive/master.tar.gz | tar -xz --strip-components=1 -C "{toxworkdir}/pkgcore" ) && \ + pushd "{toxworkdir}/snakeoil" >/dev/null && \ + python setup.py build_ext -I {envdir}/include build -b {envdir}/build install --install-headers "{envdir}/include/snakeoil" && \ + popd >/dev/null && \ + pushd "{toxworkdir}/pkgcore" >/dev/null && \ + python setup.py build_ext -I {envdir}/include build -b {envdir}/build --disable-man-pages --disable-html-docs install --disable-man-pages --disable-html-docs && \ + popd >/dev/null && \ + python setup.py build -b "{envdir}/build" install && \ + cp .coveragerc "{envsitepackagesdir}" && \ + pushd "{envsitepackagesdir}" >/dev/null && \ + coverage run -m py.test {posargs:pkgcheck/test} && \ + coverage report && \ + coverage html -d "{envdir}/coverage" && \ + popd >/dev/null' |