Add CLI option for running Selenium tests headless

- Add requirement for xfvbwrapper
- Add CLI option for running tests headless

Based on horizon patch https://review.openstack.org/79764

Change-Id: I519621ad9cfde749a41b1f3a2a44432a2086d996
This commit is contained in:
Peter Belanyi 2014-04-15 14:12:30 +02:00
parent 36a0bc621b
commit 3ad391c0eb
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.
# This includes dependency changes, directory renames, etc.
# Simple integer sequence: 1, 2, 3...
environment_version=41
environment_version=42
#--------------------------------------------------------#
function usage {
@ -31,6 +31,7 @@ function usage {
echo " Implies -V if -N is not set."
echo " --only-selenium Run only the Selenium unit 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 " openstack_dashboard in the virtual"
echo " environment."
@ -69,6 +70,7 @@ restore_env=0
runserver=0
only_selenium=0
with_selenium=0
selenium_headless=0
testopts=""
testargs=""
with_coverage=0
@ -113,6 +115,7 @@ function process_option {
--compilemessages) compilemessages=1;;
--only-selenium) only_selenium=1;;
--with-selenium) with_selenium=1;;
--selenium-headless) selenium_headless=1;;
--docs) just_docs=1;;
--runserver) runserver=1;;
--backup-environment) backup_env=1;;
@ -292,6 +295,10 @@ function run_tests {
export SKIP_UNITTESTS=1
fi
if [ $selenium_headless -eq 1 ]; then
export SELENIUM_HEADLESS=1
fi
if [ -z "$testargs" ]; then
run_tests_all
else

View File

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