aboutsummaryrefslogtreecommitdiff
path: root/test-suite/setup.sh
blob: 1d5eeeafe8c8f9c7776f04e5a24ad9d09e992c85 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
#!/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)"