blob: 7b82614b15609649e6883027f5404fdfaab5547f [file] [log] [blame]
Illyoung Choi5d59ab62019-06-24 16:15:27 -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
Illyoung Choi5d59ab62019-06-24 16:15:27 -070021# Targets
22all: test
23
24# Create a virtualenv and install all the libraries
Illyoung Choife121d02019-07-16 10:47:41 -070025venv-cordworkflowairflow:
Illyoung Choi5d59ab62019-06-24 16:15:27 -070026 virtualenv $@;\
27 source ./$@/bin/activate ; set -u ;\
28 pip install -r requirements.txt nose2 ;\
Illyoung Choife121d02019-07-16 10:47:41 -070029 pip install -e ./
Illyoung Choi5d59ab62019-06-24 16:15:27 -070030
31# tests
Illyoung Choife121d02019-07-16 10:47:41 -070032test: unit-test
Illyoung Choi5d59ab62019-06-24 16:15:27 -070033
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 \
Illyoung Choife121d02019-07-16 10:47:41 -070044 venv-cordworkflowairflow \
45 .tox \
46 build \
47 dist \
48 *.egg-info \
49 *results.xml