fune/testing/web-platform/tests/css/build-css-testsuites.sh
moz-wptsync-bot 7e120afe76 Bug 1462701 [wpt PR 11072] - Merge w3ctestlib into web-platform-tests, a=testonly
Automatic update from web-platform-testsMerge pull request #11072 from gsnedders/merge-w3ctestlib

Merge w3ctestlib and apiclient into web-platform-tests as subtrees
--

wpt-commits: 1c7d7b815b29f08856205ab6e426c0e496ca0ef0
wpt-pr: 11072
2018-06-10 09:31:03 +01:00

48 lines
1 KiB
Bash
Executable file

#!/usr/bin/env sh
set -ex
SCRIPT_DIR=$(dirname $(readlink -f "$0"))
WPT_ROOT=$(readlink -f $SCRIPT_DIR/..)
cd $WPT_ROOT
main() {
cd $WPT_ROOT/css
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
virtualenv -p $PYTHON $VENV || { echo "Please ensure virtualenv is installed"; exit 2; }
fi
# Install dependencies
$VENV/bin/pip install -r requirements.txt
# Run the build script
$VENV/bin/python tools/build.py "$@"
}
main "$@"