Skip to content

Commit

Permalink
Rationalise installation of pip packages as much as possible
Browse files Browse the repository at this point in the history
Ensure that unit tests use virtualenv when not in RPM build.

Signed-off-by: Mark Syms <mark.syms@citrix.com>
Reviewed-by: Chandrika Srinivasan <chandrika.srinivasan@citrix.com>
  • Loading branch information
MarkSymsCtx committed Mar 19, 2018
1 parent 65b5262 commit 8112be2
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 11 deletions.
6 changes: 6 additions & 0 deletions base_requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
mock
xenapi
coverage
astroid==1.4.9
pylint==1.5
bitarray
2 changes: 2 additions & 0 deletions dev_requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
nose
-r base_requirements.txt
7 changes: 1 addition & 6 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,2 @@
mock
xenapi
-r base_requirements.txt
coveralls
coverage
astroid==1.4.9
pylint==1.5
bitarray
2 changes: 1 addition & 1 deletion tests/run_python_unittests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ set -eu

SMROOT=$(cd $(dirname $0) && cd .. && pwd)

if [ ! -x "$(command -v nosetests)" ] || [ ! -x "$(command -v coverage)" ]; then
if [ ! -v RPM_BUILD_ROOT ]; then
echo "Activating virtual env"

ENVDIR="$SMROOT/.env"
Expand Down
7 changes: 3 additions & 4 deletions tests/setup_env_for_python_unittests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ pip install six
pip install packaging
pip install appdirs
pip install --upgrade setuptools
pip install nose
pip install coverage
pip install mock==1.0.1
pip install bitarray
pip install -r $SMROOT/dev_requirements.txt


0 comments on commit 8112be2

Please sign in to comment.