Merge "add tox support to python unit tests"
diff --git a/jjb/python-unit.yaml b/jjb/python-unit.yaml
index 4cdad78..1a20728 100644
--- a/jjb/python-unit.yaml
+++ b/jjb/python-unit.yaml
@@ -44,13 +44,20 @@
#!/usr/bin/env bash
set -eux -o pipefail
- if [ -f requirements.txt ]; then
- echo "requirements.txt found, installing locally with pip"
- pip install -r requirements.txt
- fi
+ if [ -f 'tox.ini' ]; then
+ echo "tox.ini found, running tox for Python2/3 unit tests"
+ tox
+ else
+ echo "tox.ini not found, running nose2 unit tests"
- echo "Performing nose2 tests"
- nose2 --verbose --coverage-report xml --coverage-report term --junit-xml
+ if [ -f 'requirements.txt' ]; then
+ echo "requirements.txt found, installing locally with pip"
+ pip install -r requirements.txt
+ fi
+
+ echo "Performing nose2 tests"
+ nose2 --verbose --coverage-report xml --coverage-report term --junit-xml
+ fi
publishers:
- junit:
diff --git a/packer/provision/basebuild.sh b/packer/provision/basebuild.sh
index e18dfee..596c24c 100644
--- a/packer/provision/basebuild.sh
+++ b/packer/provision/basebuild.sh
@@ -142,6 +142,7 @@
robotframework-kafkalibrary \
robotframework-requests \
robotframework-sshlibrary \
+ tox \
virtualenv
# end of pip install list