https://github.com/web-platform-tests/wpt
Raw File
Tip revision: 9b6e516d529b526e06447d171dc2937f646bbe89 authored by Bear Travis on 11 July 2014, 21:52:43 UTC
Adding basic tests for the CSS.supports API as part of the CSS Conditional Rules Module L3.
Tip revision: 9b6e516
build-css-testsuites.sh
#!/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

    virtualenv -p $PYTHON $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 "$@"
back to top