3 # GNU MediaGoblin Selenium Automation
4 # Copyright (C) 2013 Emily O'Leary
6 # This program is free software: you can redistribute it and/or modify
7 # it under the terms of the GNU Affero General Public License as published by
8 # the Free Software Foundation, either version 3 of the License, or
9 # (at your option) any later version.
11 # This program is distributed in the hope that it will be useful,
12 # but WITHOUT ANY WARRANTY; without even the implied warranty of
13 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 # GNU Affero General Public License for more details.
16 # You should have received a copy of the GNU Affero General Public License
17 # along with this program. If not, see <http://www.gnu.org/licenses/>.
18 git_uri="git://gitorious.org/mediagoblin/mediagoblin.git"
23 while getopts branch: name
28 ?) echo "Usage: $0: [-branch value]"
33 if ! [ -d $basedir/mediagoblin/.git ]
35 echo "Cloning the MediaGoblin repository"
41 cd $basedir/mediagoblin
43 sanitycheck=${PWD##*/}
44 if [ "$sanitycheck" = "mediagoblin" ]
46 git checkout -q -f $branch
47 echo "Git branch $branch is up-to-date."
49 echo "Error! Working directory not changed."
52 echo "Setting up testing environment"
54 (virtualenv --system-site-packages . || virtualenv .)
55 ./bin/python setup.py develop
60 source $basedir/mediagoblin/bin/activate
61 #Check to see if python selenium is installed & up-to-date
62 ./scripts/seleniumCheck.py
66 echo "Selenium not up-to-date. Updating."
67 pip install --upgrade selenium
69 echo "Selenium is up-to-date"