Added Jenkins script to run acceptance tests
Fixed a typo in the original jenkins/test.sh script
This commit is contained in:
@@ -54,7 +54,7 @@ rake test_lms[false] || TESTS_FAILED=1
|
||||
rake test_common/lib/capa || TESTS_FAILED=1
|
||||
rake test_common/lib/xmodule || TESTS_FAILED=1
|
||||
|
||||
# Run the jaavascript unit tests
|
||||
# Run the javascript unit tests
|
||||
rake phantomjs_jasmine_lms || TESTS_FAILED=1
|
||||
rake phantomjs_jasmine_cms || TESTS_FAILED=1
|
||||
rake phantomjs_jasmine_common/lib/xmodule || TESTS_FAILED=1
|
||||
|
||||
44
jenkins/test_acceptance.sh
Normal file
44
jenkins/test_acceptance.sh
Normal file
@@ -0,0 +1,44 @@
|
||||
#! /bin/bash
|
||||
|
||||
set -e
|
||||
set -x
|
||||
|
||||
git remote prune origin
|
||||
|
||||
# Reset the submodule, in case it changed
|
||||
git submodule foreach 'git reset --hard HEAD'
|
||||
|
||||
# Set the IO encoding to UTF-8 so that askbot will start
|
||||
export PYTHONIOENCODING=UTF-8
|
||||
|
||||
if [ ! -d /mnt/virtualenvs/"$JOB_NAME" ]; then
|
||||
mkdir -p /mnt/virtualenvs/"$JOB_NAME"
|
||||
virtualenv /mnt/virtualenvs/"$JOB_NAME"
|
||||
fi
|
||||
|
||||
export PIP_DOWNLOAD_CACHE=/mnt/pip-cache
|
||||
|
||||
source /mnt/virtualenvs/"$JOB_NAME"/bin/activate
|
||||
pip install -q -r pre-requirements.txt
|
||||
yes w | pip install -q -r requirements.txt
|
||||
|
||||
bundle install
|
||||
|
||||
npm install
|
||||
|
||||
rake clobber
|
||||
|
||||
TESTS_FAILED=0
|
||||
|
||||
# Assumes that Xvfb has been started by upstart
|
||||
# and is capturing display :1
|
||||
# The command for this is:
|
||||
# /usr/bin/Xvfb :1 -screen 0 1024x268x24
|
||||
# This allows us to run Chrome without a display
|
||||
export DISPLAY=:1
|
||||
|
||||
# Run the lms and cms acceptance tests
|
||||
rake test_acceptance_lms || TESTS_FAILED=1
|
||||
rake test_acceptance_cms || TESTS_FAILED=1
|
||||
|
||||
[ $TESTS_FAILED == '0' ]
|
||||
Reference in New Issue
Block a user