Skip to content

Commit ae9cd5a

Browse files
authored
Fixing Makefile (#440)
1 parent 121f875 commit ae9cd5a

File tree

3 files changed

+7
-11
lines changed

3 files changed

+7
-11
lines changed

.travis/run.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,4 @@ if [[ "$(uname -s)" == "Darwin" ]]; then
1010
source ~/.venv/bin/activate
1111
fi
1212

13-
python -m pytest -n16 tests/
13+
make lint tests

Makefile

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
.PHONY: build run test lint lint-modules clean prune help
22

3-
MODULES=routersploit
3+
DIRECTORY=.
4+
EXCLUDED=.git,rsf.py
45
RSF_IMAGE=routersploit
5-
FLAKE8_IGNORED_RULES=E501,W503
6+
FLAKE8_IGNORED_RULES=E501,F405,F403
67

78
build:
89
docker build -t $(RSF_IMAGE) .
@@ -11,14 +12,10 @@ run:
1112
docker run -it --rm $(RSF_IMAGE)
1213

1314
lint:
14-
flake8 --exclude=__init__.py --ignore=$(FLAKE8_IGNORED_RULES) $(MODULES)
15+
python3 -m flake8 --exclude=$(EXCLUDED) --ignore=$(FLAKE8_IGNORED_RULES) $(DIRECTORY)
1516

1617
tests: clean
17-
ifeq ($(MODULES), routersploit)
18-
python -m unittest discover
19-
else
20-
python -m unittest $(MODULES)
21-
endif
18+
python3 -m pytest -n16 tests
2219

2320
clean:
2421
find . -name '*.pyc' -exec rm -f {} +
@@ -34,8 +31,6 @@ help:
3431
@echo " Run Routersploit in docker container"
3532
@echo " lint"
3633
@echo " Check style with flake8."
37-
@echo " lint-modules"
38-
@echo " Check modules style with flake8."
3934
@echo " test"
4035
@echo " Run test suite"
4136
@echo " clean"

requirements-dev.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,5 @@ pycrypto==2.6.1
66
pytest==3.5.1
77
pytest-forked==0.2
88
pytest-xdist==1.22.2
9+
flake8==3.5.0
910
git+git://github.com/threat9/threat9-test-bed

0 commit comments

Comments
 (0)