-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmakefile
More file actions
75 lines (59 loc) · 1.77 KB
/
makefile
File metadata and controls
75 lines (59 loc) · 1.77 KB
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
MODULE = mnoptical
SRCS = $(MODULE)/*.py $(MODULE)/*/*.py
PKG = pyproject.toml setup.cfg setup.py
PIP = python3 -m pip
APT = apt
# Build python package (wheel/.whl file)
# using pyproject-build (from python 'build' package)
dist wheel: $(SRCS) $(PKG) makefile clean
pyproject-build --wheel
# Install python package
install: dist
sudo $(PIP) install --upgrade --verbose dist/*.whl
sudo $(PIP) install --upgrade --verbose dist/*.whl
# Development/editable installation
# FIXME: This doesn't seem to work properly
develop: $(SRCS) $(PKG)
sudo $(PIP) uninstall mininet-optical
sudo $(PIP) install --editable .
# Install dependencies
# In addition to our package dependencies, we install
# build and wheel (for building) and pygraphviz (for examples/)
depend: requirements.txt
sudo $(PIP) install -r requirements.txt
sudo $(PIP) install build wheel
sudo $(APT) install python3-pygraphviz
# Run simulator tests
simtest:
tests/RunTests.sh
# Run emulation tests
emutest: certs
examples/runtests.sh
# Run demo test
demotest:
sudo python3 -m mnoptical.ofcdemo.demo_2021 test
# Run cross validation sanity check
crossvalsanity:
(cd cross-validation-tests && ./cross_validation.sh)
# Run all tests
test: simtest emutest demotest crossvalsanity
# Generate fake certs for netconf client/server
certs: makecerts.sh
./makecerts.sh
# Generate html documentation
doc:
make -C docs html
docclean:
make -C docs clean
# Generate and serve local html documentation
docserve: doc
python3 -m http.server -d docs/build/html
# Clean up non-source files
fileclean:
rm -rf build dist *.egg-info
find . -name '*.pyc' -o -name __pycache__ \
-o -name '*~' -o -name '#*' -o -name '*.png' \
| xargs rm -rf
rm -rf testcerts mnoptical/demo/*txt Monitor_Lightpath.txt
# Clean up everything
clean: fileclean docclean