From 28fa8cbc6c635758db1a885fd5ae2ff8719569c3 Mon Sep 17 00:00:00 2001 From: Aloys Augustin Date: Fri, 21 Jun 2019 17:04:29 +0200 Subject: 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 --- test/requirements.txt | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'test/requirements.txt') diff --git a/test/requirements.txt b/test/requirements.txt index 705ad45b0ef..1dab4fc260b 100644 --- a/test/requirements.txt +++ b/test/requirements.txt @@ -1,3 +1,5 @@ +pip-tools==3.8.0 # BSD Keep this in sync with Makefile's PIP_TOOLS_VERSION + aenum>= 2.1.2; python_version < '3.6' # BSD cffi # MIT cryptography!=2.0 # BSD/Apache-2.0 @@ -13,3 +15,5 @@ scapy==2.4.0; python_version >= '2.7' or python_version >= '3.4' # GPL2 http six # MIT subprocess32 # PSF syslog_rfc5424_parser>=0.3.1 # ISC +objgraph # MIT +pympler # Apache-2.0 -- cgit 1.2.3-korg