blob: 1d5eeeafe8c8f9c7776f04e5a24ad9d09e992c85 [file] [log] [blame]
Renato Golin94cc1042016-04-26 11:02:23 +01001#!/usr/bin/env bash
2
3# This script sets up the LNT test-suite environment
4# Use *only* on an empty dir, as it will destroy any data
5
6set -e
7
8echo "Checking for python 2.7..."
9python=`which python2.7`
10
11rm -rf sandbox
12
13gitupdate() {
14 repo=$1
15 git -C $repo checkout master
16 git -C $repo fetch
17 git -C $repo pull
18}
19
20echo "Checking out LNT/test-suite repositories..."
21if [ ! -e lnt ]; then
22 git clone http://llvm.org/git/lnt.git
23fi
24gitupdate lnt
25if [ ! -e test-suite ]; then
26 git clone http://llvm.org/git/test-suite.git
27fi
28gitupdate test-suite
29
30echo "Installing Python deps..."
31sudo pip install virtualenv
32
33echo "Setting up the sandbox..."
34virtualenv --python=$python sandbox
35./sandbox/bin/python ./lnt/setup.py develop
36
37echo "All done. Use run.sh to run your test(s)"