| #!/usr/bin/env bash |
| |
| # This script sets up the LNT test-suite environment |
| # Use *only* on an empty dir, as it will destroy any data |
| |
| set -e |
| |
| echo "Checking for python 2.7..." |
| python=`which python2.7` |
| |
| rm -rf sandbox |
| |
| gitupdate() { |
| repo=$1 |
| git -C $repo checkout master |
| git -C $repo fetch |
| git -C $repo pull |
| } |
| |
| echo "Checking out LNT/test-suite repositories..." |
| if [ ! -e lnt ]; then |
| git clone http://llvm.org/git/lnt.git |
| fi |
| gitupdate lnt |
| if [ ! -e test-suite ]; then |
| git clone http://llvm.org/git/test-suite.git |
| fi |
| gitupdate test-suite |
| |
| echo "Installing Python deps..." |
| sudo pip install virtualenv |
| |
| echo "Setting up the sandbox..." |
| virtualenv --python=$python sandbox |
| ./sandbox/bin/python ./lnt/setup.py develop |
| |
| echo "All done. Use run.sh to run your test(s)" |