diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index dc0e7654439..66527f9771e 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -73,9 +73,17 @@ Packetbeat: Some of the Beats might have extra development requirements, in which case a CONTRIBUTING.md file is find in the Beat directory. +## Testing + You can run the whole testsuite with the following command: - # make testsuite + $ make testsuite + +Running the testsuite has the following requirements: + +* Python >=2.7.9 +* Docker >=1.10.0 +* Docker-compose >= 1.7.0 ## Dependencies diff --git a/libbeat/Dockerfile b/libbeat/Dockerfile index 3f51a1d983a..e9c6d281178 100644 --- a/libbeat/Dockerfile +++ b/libbeat/Dockerfile @@ -20,6 +20,9 @@ ENV PYTHON_ENV=/tmp/python-env RUN test -d ${PYTHON_ENV} || virtualenv ${PYTHON_ENV} COPY ./tests/system/requirements.txt /tmp/requirements.txt + +# Upgrade pip to make sure to have the most recent version +RUN . ${PYTHON_ENV}/bin/activate && pip install -U pip RUN . ${PYTHON_ENV}/bin/activate && pip install -Ur /tmp/requirements.txt # Libbeat specific diff --git a/libbeat/scripts/Makefile b/libbeat/scripts/Makefile index 9ef45505011..2d7ad5cbdb9 100755 --- a/libbeat/scripts/Makefile +++ b/libbeat/scripts/Makefile @@ -155,6 +155,7 @@ benchmark-tests: .PHONY: python-env python-env: ${ES_BEATS}/libbeat/tests/system/requirements.txt test -d ${PYTHON_ENV} || virtualenv ${PYTHON_ENV} + . ${PYTHON_ENV}/bin/activate && pip install --upgrade pip ; \ if [ -a ./tests/system/requirements.txt ] && [ ! ${ES_BEATS}/libbeat/tests/system/requirements.txt -ef ./tests/system/requirements.txt ] ; then \ . ${PYTHON_ENV}/bin/activate && pip install -Ur ${ES_BEATS}/libbeat/tests/system/requirements.txt -Ur ./tests/system/requirements.txt ; \ else \ diff --git a/libbeat/tests/system/requirements.txt b/libbeat/tests/system/requirements.txt index 9d04b844d3d..b0a7595205f 100644 --- a/libbeat/tests/system/requirements.txt +++ b/libbeat/tests/system/requirements.txt @@ -1,6 +1,5 @@ +pip nose jinja2 PyYAML nose-timer -pip -