Skip to content

Commit

Permalink
Fixing Makefile (#440)
Browse files Browse the repository at this point in the history
  • Loading branch information
lucyoa authored May 28, 2018
1 parent 121f875 commit ae9cd5a
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 11 deletions.
2 changes: 1 addition & 1 deletion .travis/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ if [[ "$(uname -s)" == "Darwin" ]]; then
source ~/.venv/bin/activate
fi

python -m pytest -n16 tests/
make lint tests
15 changes: 5 additions & 10 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
.PHONY: build run test lint lint-modules clean prune help

MODULES=routersploit
DIRECTORY=.
EXCLUDED=.git,rsf.py
RSF_IMAGE=routersploit
FLAKE8_IGNORED_RULES=E501,W503
FLAKE8_IGNORED_RULES=E501,F405,F403

build:
docker build -t $(RSF_IMAGE) .
Expand All @@ -11,14 +12,10 @@ run:
docker run -it --rm $(RSF_IMAGE)

lint:
flake8 --exclude=__init__.py --ignore=$(FLAKE8_IGNORED_RULES) $(MODULES)
python3 -m flake8 --exclude=$(EXCLUDED) --ignore=$(FLAKE8_IGNORED_RULES) $(DIRECTORY)

tests: clean
ifeq ($(MODULES), routersploit)
python -m unittest discover
else
python -m unittest $(MODULES)
endif
python3 -m pytest -n16 tests

clean:
find . -name '*.pyc' -exec rm -f {} +
Expand All @@ -34,8 +31,6 @@ help:
@echo " Run Routersploit in docker container"
@echo " lint"
@echo " Check style with flake8."
@echo " lint-modules"
@echo " Check modules style with flake8."
@echo " test"
@echo " Run test suite"
@echo " clean"
Expand Down
1 change: 1 addition & 0 deletions requirements-dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,5 @@ pycrypto==2.6.1
pytest==3.5.1
pytest-forked==0.2
pytest-xdist==1.22.2
flake8==3.5.0
git+git://github.com/threat9/threat9-test-bed

0 comments on commit ae9cd5a

Please sign in to comment.