Adding PYTHON_ENABLE option 41/33841/3
authorRyota MIBU <r-mibu@cq.jp.nec.com>
Wed, 26 Apr 2017 11:31:03 +0000 (11:31 +0000)
committerCarlos Goncalves <carlos.goncalves@neclab.eu>
Tue, 30 May 2017 10:28:29 +0000 (12:28 +0200)
This option will be removed, once we confirmed tox/python testing code
works fine and functest trigger has changed from 'run.sh' to 'tox'.

Signed-off-by: Ryota MIBU <r-mibu@cq.jp.nec.com>
Signed-off-by: Carlos Goncalves <carlos.goncalves@neclab.eu>
Change-Id: Ia4421f6e39a415bd7b6212af612249deb482e7af

tests/run.sh

index d97a5c9..7f95a8a 100755 (executable)
@@ -31,6 +31,7 @@ DOCTOR_PROJECT=doctor
 #TODO: change back to `_member_` when JIRA DOCTOR-55 is done
 DOCTOR_ROLE=admin
 PROFILER_TYPE=${PROFILER_TYPE:-none}
+PYTHON_ENABLE=${PYTHON_ENABLE:-false}
 
 TOP_DIR=$(cd $(dirname "$0") && pwd)
 
@@ -457,6 +458,13 @@ cleanup() {
 
 # Main process
 
+if $PYTHON_ENABLE; then
+    cd $TOP_DIR
+    echo "executing tox..."
+    tox
+    exit $?
+fi
+
 echo "Note: doctor/tests/run.sh has been executed."
 git log --oneline -1 || true   # ignore even you don't have git installed