blob: aeaa95fa12d74d92f14ccde6d2a4d9c056a056d8 [file] [log] [blame]
Illyoung Choia9d2c2c2019-07-12 13:29:42 -07001# Copyright 2019-present Open Networking Foundation
2#
3# Licensed under the Apache License, Version 2.0 (the "License");
4# you may not use this file except in compliance with the License.
5# You may obtain a copy of the License at
6#
7# http://www.apache.org/licenses/LICENSE-2.0
8#
9# Unless required by applicable law or agreed to in writing, software
10# distributed under the License is distributed on an "AS IS" BASIS,
11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12# See the License for the specific language governing permissions and
13# limitations under the License.
14
15# set default shell
16SHELL = bash -e -o pipefail
17
18# Variables
19VERSION ?= $(shell cat ./VERSION)
20
21# Targets
22all: test
23
24# Create a virtualenv and install all the libraries
25venv-cordworkflowcontrollerclient:
26 virtualenv $@;\
27 source ./$@/bin/activate ; set -u ;\
28 pip install -r requirements.txt nose2 ;\
29 pip install -e ./
30
31# tests
32test: unit-test
33
34unit-test:
35 tox
36
37clean:
38 find . -name '*.pyc' | xargs rm -f
39 find . -name '__pycache__' | xargs rm -rf
40 rm -rf \
41 .coverage \
42 coverage.xml \
43 nose2-results.xml \
44 venv-cordworkflowcontrollerclient \
45 .tox \
46 build \
47 dist \
48 *.egg-info \
49 *results.xml