mirror of https://github.com/openXC7/prjxray.git
Adding `make test` target.
Uses [py.test](https://pytest.org) to collect all Python doctests and unittests. Signed-off-by: Tim 'mithro' Ansell <me@mith.ro>
This commit is contained in:
parent
9ebaf01de6
commit
841905c1e0
10
Makefile
10
Makefile
|
|
@ -20,8 +20,14 @@ build:
|
|||
database: build
|
||||
$(MAKE) -C $@
|
||||
|
||||
FORMAT_EXCLUDE = third_party .git env build
|
||||
FIND_EXCLUDE = $(foreach x,$(FORMAT_EXCLUDE),-and -not -path './$(x)/*')
|
||||
ALL_EXCLUDE = third_party .git env build
|
||||
|
||||
TEST_EXCLUDE = $(foreach x,$(ALL_EXCLUDE) fuzzers minitests experiments,--ignore $(x))
|
||||
test: build
|
||||
# FIXME: Add C++ unit tests
|
||||
$(IN_ENV) py.test $(TEST_EXCLUDE) --doctest-modules
|
||||
|
||||
FIND_EXCLUDE = $(foreach x,$(ALL_EXCLUDE),-and -not -path './$(x)/*')
|
||||
format:
|
||||
find . -name \*.cc $(FIND_EXCLUDE) -print0 | xargs -0 -P $$(nproc) ${CLANG_FORMAT} -style=file -i
|
||||
find . -name \*.h $(FIND_EXCLUDE) -print0 | xargs -0 -P $$(nproc) ${CLANG_FORMAT} -style=file -i
|
||||
|
|
|
|||
|
|
@ -8,3 +8,4 @@ scipy
|
|||
sympy
|
||||
yapf==0.24.0
|
||||
textx
|
||||
pytest
|
||||
|
|
|
|||
Loading…
Reference in New Issue