-
Notifications
You must be signed in to change notification settings - Fork 20
/
Makefile
51 lines (37 loc) · 1.12 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
NOSE = nosetests3
FLAKE = flake8 --max-line-length 88 --ignore=E203,W503
# E203 (whitespace before ':') conflicts with black formatting
# W503 (line break before binary operator), ditto
BLACK = black
ISORT = isort --profile black --dont-follow-links -p debsources
SRCDIR = lib/debsources
BINDIR = bin
TESTDIR = $(SRCDIR)/tests
TESTFLAGS = -v
all:
@echo 'Nothing to do by default, maybe you want "make test"?'
@false
doc:
$(MAKE) -C doc/
test: test-fast
test-all:
$(NOSE) $(TESTFLAGS) $(TESTDIR)
test-fast:
$(NOSE) $(TESTFLAGS) $(TESTDIR) -a \!slow
test-slow:
$(NOSE) $(TESTFLAGS) $(TESTDIR) -a slow
test-coverage:
$(NOSE) $(TESTFLAGS) $(TESTDIR) --with-coverage --cover-package=debsources
check:
$(FLAKE) $(SRCDIR)/ $(shell grep -H 'env python' $(BINDIR)/debsources-* | cut -f 1 -d :)
$(BLACK) --check $(SRCDIR)
# deactivated for now - until isort>=5 is available on Alpine Linux for CICD pipeline
# $(ISORT) --check $(SRCDIR) $(BINDIR)
format:
$(BLACK) $(SRCDIR)
$(ISORT) $(SRCDIR) $(BINDIR)
test-online-app:
contrib/test-online-app
clean:
$(MAKE) -C doc $@
.PHONY: all doc test test-all test-fast test-slow check clean