-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmakefile
82 lines (66 loc) · 2.95 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
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
76
77
78
79
80
81
82
# default target
html:
# distribution targets
dist:
python3 setup.py sdist bdist_wheel
# XXX seem to need to distclean before doing pip install .
distclean: clean
$(RM) -rf build dist $(wildcard *.egg-info)
# docker targets
DOCKER-ORG = broadbandforum
DOCKER-NAME = obbaa-vomci
DOCKER-TAG = latest
DOCKER-IMAGE = $(DOCKER-ORG)/$(DOCKER-NAME):$(DOCKER-TAG)
DOCKER-CMD = bash
DOCKER-BUILDOPTS =
ifneq "$(FROM)" ""
DOCKER-BUILDOPTS += --build-arg FROM=$(FROM)
endif
ifneq "$(NOCACHE)" ""
DOCKER-BUILDOPTS += --no-cache
endif
# https://superuser.com/questions/1301499/
# running-wireshark-inside-a-centos-docker-container
DOCKER-RUNOPTS = -p 12345:12345/udp \
--cap-add=NET_RAW --cap-add=NET_ADMIN
docker-build:
docker image build $(DOCKER-BUILDOPTS) --tag=$(DOCKER-NAME) .
docker image build -f proxy/Dockerfile $(DOCKER-BUILDOPTS) --tag=obbaa-vproxy:latest .
docker image build -f kafka-gpb-tester/Dockerfile $(DOCKER-BUILDOPTS) --tag=kafka-gpb-tester:latest .
bamboo-docker-build:
docker image build $(DOCKER-BUILDOPTS) --tag=$(DOCKER-NAME) .
docker image build -f proxy/Dockerfile $(DOCKER-BUILDOPTS) --tag=obbaa-vproxy:latest .
docker-push: docker-build
docker image push $(DOCKER-IMAGE)
docker-pull:
docker image pull $(DOCKER-IMAGE)
docker-run:
docker container run -it --name $(DOCKER-NAME) --rm $(DOCKER-RUNOPTS) $(DOCKER-IMAGE) $(DOCKER-CMD)
docker-exec:
docker container exec -it $(DOCKER-NAME) $(DOCKER-CMD)
test-kafka-end:
docker-compose -f test/docker-compose-proxy.yml down
docker-compose -f test/docker-compose.yml down
test-kafka:
docker image build -f test/Dockerfile $(DOCKER-BUILDOPTS) --tag=$(DOCKER-NAME) .
docker image build -f test/test_voltmf/Dockerfile $(DOCKER-BUILDOPTS) --tag=test-voltmf:latest .
docker image build -f test/test_voltmf_proxy/Dockerfile $(DOCKER-BUILDOPTS) --tag=test-voltmf-proxy:latest .
docker image build -f proxy/Dockerfile $(DOCKER-BUILDOPTS) --tag=obbaa-vproxy:latest .
docker image build -f test/test_olt/Dockerfile $(DOCKER-BUILDOPTS) --tag=test-olt:latest .
docker-compose -f test/docker-compose-proxy.yml up -d
docker-compose -f test/docker-compose.yml up
unit-test:
python3.10 -m unittest database/telemetry_subscription.py
test-features:
# ========== Starting Tests =============================================
python3.10 -m unittest testing_framework/test_cases/add_onu.py || exit 1
python3.10 -m unittest testing_framework/test_cases/get_data.py || exit 1
python3.10 -m unittest testing_framework/test_cases/uni_config.py || exit 1
python3.10 -m unittest testing_framework/test_cases/telemetry.py || exit 1
python3.10 -m unittest testing_framework/test_cases/restart.py || exit 1
# ========== Stoping Containers ========================================
docker-compose -f ./testing_framework/data/compose_data/docker-compose.yaml down
# ========== Success =====================================================
# sphinx-build handles remaining targets; make help to get a list
%:
@sphinx-build -M $@ . docs -T