aboutsummaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorAloys Augustin <aloaugus@cisco.com>2019-06-21 17:04:29 +0200
committerAndrew Yourtchenko <ayourtch@gmail.com>2019-06-27 21:22:26 +0000
commit28fa8cbc6c635758db1a885fd5ae2ff8719569c3 (patch)
tree1d088c23b25b9897d620a6134f272ffc51131f2a /Makefile
parente971bc9bab2d1be9e129caa585448bb81dc6541f (diff)
tests: pin python dependencies
This commit ensures that the tests always run with the exact same version for all the Python dependencies. It uses pip-tools to achieve that. Our top-level dependencies are specified in the requirements.txt file. From this file, pip-tools generates the requirements-{2,3}.txt file, which pins all the versions of all the recursive dependencies, and is used to install the packages in the test virtualenv. To change or add a top-level dependency, update requirements.txt and run make test as usual with python2 and python3. The requirements-{2,3}.txt file will be updated and you can verify that nothing breaks. Then add all requirements* files in your commit. To refresh the python packages (i.e. get new versions of the recursive dependencies, or of the dependencies that are not pinned in requirements.txt), just run: PYTHON=python2.7 make test-refresh-deps PYTHON=python3.6 make test-refresh-deps and this will update the requirements-{2,3}.txt files. Ideally we should run this after each release. Type: make Change-Id: Ic533de3d06ec4019ff38f5231208da6f1025bfc7 Signed-off-by: Aloys Augustin <aloaugus@cisco.com>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile4
1 files changed, 4 insertions, 0 deletions
diff --git a/Makefile b/Makefile
index 31fd8816c7a..976cb19050e 100644
--- a/Makefile
+++ b/Makefile
@@ -226,6 +226,7 @@ help:
@echo " test-cov - generate code coverage report for test framework"
@echo " test-wipe-cov - wipe code coverage report for test framework"
@echo " test-checkstyle - check PEP8 compliance for test framework"
+ @echo " test-refresh-deps - refresh the Python dependencies for the tests"
@echo ""
@echo "Make Arguments:"
@echo " V=[0|1] - set build verbosity level"
@@ -455,6 +456,9 @@ test-wipe-cov:
test-checkstyle:
@make -C test checkstyle
+test-refresh-deps:
+ @make -C test refresh-deps
+
retest:
$(call test,vpp,vpp,retest)