fab: Add more targets, remove nose config file
This commit is contained in:
parent
9a9eff3c62
commit
04a9c69e48
36
fabfile.py
vendored
36
fabfile.py
vendored
@ -1,21 +1,51 @@
|
||||
from fabric.api import local, settings
|
||||
from fabric.api import execute, local, settings, task
|
||||
|
||||
|
||||
@task
|
||||
def docs():
|
||||
local('make -C docs/ html')
|
||||
|
||||
|
||||
@task
|
||||
def autodocs():
|
||||
auto(docs)
|
||||
|
||||
|
||||
@task
|
||||
def test(path=None):
|
||||
path = path or 'tests/'
|
||||
local('nosetests ' + path)
|
||||
|
||||
|
||||
@task
|
||||
def autotest(path=None):
|
||||
auto(test, path=path)
|
||||
|
||||
|
||||
@task
|
||||
def coverage(path=None):
|
||||
path = path or 'tests/'
|
||||
local(
|
||||
'nosetests --with-coverage --cover-package=mopidy '
|
||||
'--cover-branches --cover-html ' + path)
|
||||
|
||||
|
||||
@task
|
||||
def autocoverage(path=None):
|
||||
auto(coverage, path=path)
|
||||
|
||||
|
||||
def auto(task, *args, **kwargs):
|
||||
while True:
|
||||
local('clear')
|
||||
with settings(warn_only=True):
|
||||
test(path)
|
||||
execute(task, *args, **kwargs)
|
||||
local(
|
||||
'inotifywait -q -e create -e modify -e delete '
|
||||
'--exclude ".*\.(pyc|sw.)" -r mopidy/ tests/')
|
||||
'--exclude ".*\.(pyc|sw.)" -r docs/ mopidy/ tests/')
|
||||
|
||||
|
||||
@task
|
||||
def update_authors():
|
||||
# Keep authors in the order of appearance and use awk to filter out dupes
|
||||
local(
|
||||
|
||||
Loading…
Reference in New Issue
Block a user