-
Notifications
You must be signed in to change notification settings - Fork 5
/
Makefile
35 lines (28 loc) · 1.37 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
all: unittest build check_convention
clean:
sudo rm -fr build
UNITTESTS=$(shell find rackattack -name 'test_*.py' | sed 's@/@.@g' | sed 's/\(.*\)\.py/\1/' | sort)
COVERED_FILES=rackattack/physical/alloc/priority.py
unittest:
UPSETO_JOIN_PYTHON_NAMESPACES=Yes PYTHONPATH=. coverage run -m unittest $(UNITTESTS)
coverage report --show-missing --rcfile=coverage.config --fail-under=100 --include=$(COVERED_FILES)
check_convention:
pep8 rackattack --max-line-length=109
.PHONY: build
build: build/rackattack.physical.egg
build/rackattack.physical.egg: rackattack/physical/main.py
-mkdir $(@D)
python -m upseto.packegg --entryPoint=$< --output=$@ [email protected] --compile_pyc --joinPythonNamespaces
-include build/rackattack.physical.egg.dep
install: build/rackattack.physical.egg
-sudo systemctl stop rackattack-physical.service
-sudo mkdir /usr/share/rackattack.physical
sudo cp build/rackattack.physical.egg /usr/share/rackattack.physical
sudo cp rackattack-physical.service /usr/lib/systemd/system/rackattack-physical.service
sudo systemctl enable rackattack-physical.service
if ["$(DONT_START_SERVICE)" == ""]; then sudo systemctl start rackattack-physical; fi
uninstall:
-sudo systemctl stop rackattack-physical
-sudo systemctl disable rackattack-physical.service
-sudo rm -fr /usr/lib/systemd/system/rackattack-physical.service
sudo rm -fr /usr/share/rackattack.physical