aboutsummaryrefslogtreecommitdiff
path: root/test-suite/setup.sh
diff options
context:
space:
mode:
Diffstat (limited to 'test-suite/setup.sh')
-rwxr-xr-xtest-suite/setup.sh37
1 files changed, 37 insertions, 0 deletions
diff --git a/test-suite/setup.sh b/test-suite/setup.sh
new file mode 100755
index 0000000..1d5eeea
--- /dev/null
+++ b/test-suite/setup.sh
@@ -0,0 +1,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)"