forked from w3c/csswg-test
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build-css-testsuites.sh
executable file
·49 lines (39 loc) · 1.08 KB
/
build-css-testsuites.sh
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
38
39
40
41
42
43
44
45
46
47
48
49
#!/usr/bin/env sh
set -ex
cd "`dirname $0`"
if [ -z $VENV ]; then
VENV=tools/_virtualenv
fi
# Create the virtualenv
if [ ! -d $VENV ]; then
if [ -z $PYTHON ]; then
command -v python
if [ $? -eq 0 ]; then
if [ `python -c 'import sys; print(sys.version[0:3])'` == "2.7" ]; then
PYTHON=python
fi
fi
fi
if [ -z $PYTHON ]; then
command -v python2
if [ $? -eq 0 ]; then
PYTHON=python2
fi
fi
if [ -z $PYTHON ]; then
echo "Please ensure Python 2.7 is installed"
exit 1
fi
$PYTHON -m virtualenv $VENV || { echo "Please ensure virtualenv is installed"; exit 2; }
fi
# Install dependencies
$VENV/bin/pip install -r requirements.txt
# Fetch hg submodules if they're not there
if [ ! -d tools/apiclient ]; then
$VENV/bin/hg clone https://hg.csswg.org/dev/apiclient tools/apiclient
fi
if [ ! -d tools/w3ctestlib ]; then
$VENV/bin/hg clone https://hg.csswg.org/dev/w3ctestlib tools/w3ctestlib
fi
# Run the build script
$VENV/bin/python tools/build.py "$@"