Skip to content

Commit b9a042a

Browse files
author
Leopoldo
committed
Makefile to allow the execution of the same tests that travis do
1 parent 3c96f56 commit b9a042a

1 file changed

Lines changed: 10 additions & 4 deletions

File tree

Makefile

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,8 @@ help:
4949
@echo "Remote:"
5050
@echo " publish to publish the package to PyPI"
5151
@echo " push_img to push image to docker hub"
52-
@echo " test_ci Used by Travis CI to run tests on django applications"
52+
@echo " test_ci Used by Travis CI to run tests on django applications. The app name must be provided. Ex. ''make test_ci app=networkapi/api_environment'"
53+
@echo " test_ci_travis to localy run the same Travis CI tests"
5354
@echo
5455

5556

@@ -119,11 +120,12 @@ publish: clean
119120
# Containers based target rules
120121
#
121122

122-
start: docker-compose.yml
123-
@docker-compose up -d
123+
start: docker-compose-sdn.yml docker-compose.yml
124+
docker-compose up --force-recreate --remove-orphans -d
125+
docker-compose --file $< up --force-recreate -d
124126

125127

126-
stop: docker-compose.yml
128+
stop: docker-compose-sdn.yml docker-compose.yml
127129
@docker-compose down --remove-orphans
128130

129131

@@ -146,6 +148,10 @@ test_ci:
146148
time docker exec -it netapi_app ./fast_start_test.sh ${app}
147149

148150

151+
test_ci_travis:
152+
@echo "Running the same NetAPI tests enabled on travis"
153+
time docker exec -it netapi_app ./thesame_tests_travis_do.sh
154+
149155
fixture:
150156
ifeq (${model},)
151157
$(error Missing model. Usage: make fixture model=interface.PortChannel)

0 commit comments

Comments
 (0)