ensure virtualenv installed and WORKSPACE defined
authorChristophe Bliard <christophe.bliard@smartesting.com>
Fri, 4 Oct 2013 13:38:13 +0000 (15:38 +0200)
committerChristophe Bliard <christophe.bliard@smartesting.com>
Fri, 4 Oct 2013 13:38:13 +0000 (15:38 +0200)
jenkins_build.sh

index c099183..5ceb646 100644 (file)
@@ -1,4 +1,8 @@
 #! /bin/bash
+if ! command -v virtualenv >/dev/null 2>&1; then
+    echo "You should install virtualenv, check http://www.virtualenv.org/"
+    exit 1
+fi
 virtualenv .
 source bin/activate
 python setup.py develop
@@ -6,4 +10,5 @@ easy_install nose
 easy_install mock
 easy_install requests
 easy_install coverage
-nosetests jenkinsapi_tests --with-xunit --with-coverage --cover-html --cover-html-dir=$WORKSPACE/coverage_report --cover-package=jenkinsapi --verbose
+test -z "$WORKSPACE" && WORKSPACE="`pwd`"
+nosetests jenkinsapi_tests --with-xunit --with-coverage --cover-html --cover-html-dir="$WORKSPACE/coverage_report" --cover-package=jenkinsapi --verbose