From: garciadeblas Date: Thu, 9 Mar 2017 15:21:24 +0000 (+0100) Subject: Makefile to automate tasks: env preparation, build, test, package creation X-Git-Tag: v2.0.0~22^2~12 X-Git-Url: https://osm.etsi.org/gitweb/?a=commitdiff_plain;h=9453a8a01de39baaacf22abf8fc7a62055983b33;p=osm%2FRO.git Makefile to automate tasks: env preparation, build, test, package creation Change-Id: Iaae780a8fbd105902204b630a959aa9e72bf27e7 Signed-off-by: garciadeblas --- diff --git a/Makefile b/Makefile new file mode 100644 index 00000000..122fec0a --- /dev/null +++ b/Makefile @@ -0,0 +1,40 @@ +SHELL := /bin/bash +all: connectors build package + +prepare: + mkdir -p build + cp *.py build/ + #cd build; mv openmanod.py openmanod + cp openmano build/ + cp openmanod.cfg build/ + cp openmano.service build/ + cp -r vnfs build/ + cp -r scenarios build/ + cp -r instance-scenarios build/ + cp -r scripts build/ + cd build/scripts; mv service-openmano.sh service-openmano; mv openmano-report.sh openmano-report + cp -r database_utils build/ + +connectors: + rm -f build/openmanolinkervimconn.py + cd build; for i in `ls vimconn_*.py |sed "s/\.py//"` ; do echo "import $$i" >> openmanolinkervimconn.py; done + python build/openmanolinkervimconn.py + rm -f build/openmanolinkervimconn.py + +build: prepare connectors + python -m py_compile build/*.py + +clean: + rm -rf build + #find build -name '*.pyc' -delete + #find build -name '*.pyo' -delete + +pip: + cd build; ./setup.py sdist + #cp dist/* /root/artifacts/... + #fpm -s python -t deb build/setup.py + +test: + ./test/basictest.sh --force --insert-bashrc --install-openvim --init-openvim + +