-
-
Save jlward/490916 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Located at: http://gist.github.com/359405 | |
source $WORKSPACE/../../../virtualenvs/$JOB_NAME/bin/activate | |
./scripts/clean.sh; | |
# Delete the database so Django doesn't prompt us yes/no to continue | |
echo "CREATE DATABASE IF NOT EXISTS $JOB_NAME DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci;" | mysql -u root; | |
echo "DROP DATABASE IF EXISTS test_$JOB_NAME;" | mysql -u root; | |
# Kill any hung nose live servers | |
fuser -n tcp 8001 -k; | |
# Kill any hung XVFB displays | |
ps aux | grep "Xvfb :" | awk '{print $2}' | xargs kill -s 9 | |
# Clear out the old failure screenshots and add a blank png so hudson doesn't freak out | |
rm -r -f $WORKSPACE/failure_ss | |
mkdir $WORKSPACE/failure_ss | |
touch $WORKSPACE/failure_ss/calm_hudson.png | |
# Deleted the previous noestests results file so that this build fails if tests aren't created | |
rm $WORKSPACE/pstat/nosetests.xml | |
export DISPLAY=:99 | |
Xvfb :99 -ac -screen 0 1024x768x24 | |
python scripts/run_selenium_tests.py | |
ps aux | grep "Xvfb :" | awk '{print $2}' | xargs kill -s 9 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment