Merge "Add CLI option for running Selenium tests headless"

This commit is contained in:
Jenkins 2014-07-01 12:23:14 +00:00 committed by Gerrit Code Review
commit eebd19a919
2 changed files with 9 additions and 1 deletions

View File

@ -6,7 +6,7 @@ set -o errexit
# Increment me any time the environment should be rebuilt. # Increment me any time the environment should be rebuilt.
# This includes dependency changes, directory renames, etc. # This includes dependency changes, directory renames, etc.
# Simple integer sequence: 1, 2, 3... # Simple integer sequence: 1, 2, 3...
environment_version=41 environment_version=42
#--------------------------------------------------------# #--------------------------------------------------------#
function usage { function usage {
@ -32,6 +32,7 @@ function usage {
echo " Implies -V if -N is not set." echo " Implies -V if -N is not set."
echo " --only-selenium Run only the Selenium unit tests" echo " --only-selenium Run only the Selenium unit tests"
echo " --with-selenium Run unit tests including Selenium tests" echo " --with-selenium Run unit tests including Selenium tests"
echo " --selenium-headless Run Selenium tests headless"
echo " --runserver Run the Django development server for" echo " --runserver Run the Django development server for"
echo " openstack_dashboard in the virtual" echo " openstack_dashboard in the virtual"
echo " environment." echo " environment."
@ -71,6 +72,7 @@ restore_env=0
runserver=0 runserver=0
only_selenium=0 only_selenium=0
with_selenium=0 with_selenium=0
selenium_headless=0
testopts="" testopts=""
testargs="" testargs=""
with_coverage=0 with_coverage=0
@ -106,6 +108,7 @@ function process_option {
--compilemessages) compilemessages=1;; --compilemessages) compilemessages=1;;
--only-selenium) only_selenium=1;; --only-selenium) only_selenium=1;;
--with-selenium) with_selenium=1;; --with-selenium) with_selenium=1;;
--selenium-headless) selenium_headless=1;;
--docs) just_docs=1;; --docs) just_docs=1;;
--runserver) runserver=1;; --runserver) runserver=1;;
--backup-environment) backup_env=1;; --backup-environment) backup_env=1;;
@ -290,6 +293,10 @@ function run_tests {
export SKIP_UNITTESTS=1 export SKIP_UNITTESTS=1
fi fi
if [ $selenium_headless -eq 1 ]; then
export SELENIUM_HEADLESS=1
fi
if [ -z "$testargs" ]; then if [ -z "$testargs" ]; then
run_tests_all run_tests_all
else else

View File

@ -12,6 +12,7 @@ nosexcover
openstack.nose_plugin>=0.7 openstack.nose_plugin>=0.7
nosehtmloutput>=0.0.3 nosehtmloutput>=0.0.3
selenium selenium
xvfbwrapper
# Docs Requirements # Docs Requirements
sphinx>=1.1.2,<1.2 sphinx>=1.1.2,<1.2
# for bug 1091333, remove after sphinx >1.1.3 is released. # for bug 1091333, remove after sphinx >1.1.3 is released.