Unverified Commit ae9cd5a8 by Marcin Bury Committed by GitHub

Fixing Makefile (#440)

parent 121f875a
...@@ -10,4 +10,4 @@ if [[ "$(uname -s)" == "Darwin" ]]; then ...@@ -10,4 +10,4 @@ if [[ "$(uname -s)" == "Darwin" ]]; then
source ~/.venv/bin/activate source ~/.venv/bin/activate
fi fi
python -m pytest -n16 tests/ make lint tests
.PHONY: build run test lint lint-modules clean prune help .PHONY: build run test lint lint-modules clean prune help
MODULES=routersploit DIRECTORY=.
EXCLUDED=.git,rsf.py
RSF_IMAGE=routersploit RSF_IMAGE=routersploit
FLAKE8_IGNORED_RULES=E501,W503 FLAKE8_IGNORED_RULES=E501,F405,F403
build: build:
docker build -t $(RSF_IMAGE) . docker build -t $(RSF_IMAGE) .
...@@ -11,14 +12,10 @@ run: ...@@ -11,14 +12,10 @@ run:
docker run -it --rm $(RSF_IMAGE) docker run -it --rm $(RSF_IMAGE)
lint: lint:
flake8 --exclude=__init__.py --ignore=$(FLAKE8_IGNORED_RULES) $(MODULES) python3 -m flake8 --exclude=$(EXCLUDED) --ignore=$(FLAKE8_IGNORED_RULES) $(DIRECTORY)
tests: clean tests: clean
ifeq ($(MODULES), routersploit) python3 -m pytest -n16 tests
python -m unittest discover
else
python -m unittest $(MODULES)
endif
clean: clean:
find . -name '*.pyc' -exec rm -f {} + find . -name '*.pyc' -exec rm -f {} +
...@@ -34,8 +31,6 @@ help: ...@@ -34,8 +31,6 @@ help:
@echo " Run Routersploit in docker container" @echo " Run Routersploit in docker container"
@echo " lint" @echo " lint"
@echo " Check style with flake8." @echo " Check style with flake8."
@echo " lint-modules"
@echo " Check modules style with flake8."
@echo " test" @echo " test"
@echo " Run test suite" @echo " Run test suite"
@echo " clean" @echo " clean"
......
...@@ -6,4 +6,5 @@ pycrypto==2.6.1 ...@@ -6,4 +6,5 @@ pycrypto==2.6.1
pytest==3.5.1 pytest==3.5.1
pytest-forked==0.2 pytest-forked==0.2
pytest-xdist==1.22.2 pytest-xdist==1.22.2
flake8==3.5.0
git+git://github.com/threat9/threat9-test-bed git+git://github.com/threat9/threat9-test-bed
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment