Files
vppcfg/Makefile
Pim van Pelt 61f8169d69 fix: execute YAML tests
The execution of vppcfg/tests.py from the main directory will cause the
--test flag to not glob any YAML files. Enter the source directory
before executing the tests.

Before:
- No YAML tests were executed, so 'success' was always returned. Unit
  tests were all executed.
After:
- Both unit tests and YAML tests are executed (and they all pass)
2022-12-03 12:21:34 +00:00

44 lines
863 B
Makefile

VERSION=0.0.2
VPPCFG:=vppcfg
PYTHON?=python3
PIP?=pip
PIP_DEPENDS=build yamale netaddr pylint
PIP_DEPENDS+=argparse pyyaml ipaddress black
WIPE=dist $(VPPCFG).egg-info .pybuild debian/vppcfg debian/vppcfg.*.log
WIPE+=debian/vppcfg.*.debhelper debian/.debhelper debian/files
WIPE+=debian/vppcfg.substvars
WHL_INSTALL=dist/$(VPPCFG)-$(VERSION)-py3-none-any.whl
TESTS=tests.py
.PHONY: build
build:
$(PYTHON) -m build
.PHONY: install-deps
install-deps:
sudo $(PIP) install $(PIP_DEPENDS)
.PHONY: install
install:
sudo $(PIP) install $(WHL_INSTALL)
.PHONY: pkg-deb
pkg-deb:
dpkg-buildpackage -uc -us -b
.PHONY: check-style
check-style:
PYTHONPATH=./$(VPPCFG) pylint ./$(VPPCFG)
.PHONY: test
test:
@cd $(VPPCFG); PYTHONPATH=./$(VPPCFG) $(PYTHON) tests.py
.PHONY: uninstall
uninstall:
sudo $(PIP) uninstall $(VPPCFG)
.PHONY: wipe
wipe:
$(RM) -rf $(WIPE)