Blame integration-test-suite/runtest.sh

3c0fd78
#!/bin/bash
3c0fd78
3c0fd78
usage() {
3c0fd78
    echo "usage `basename $0` [OPTIONS]"
3c0fd78
    echo "  --threads NUM       The number of threads to use for running tests."
3c0fd78
}
3c0fd78
3c0fd78
thread_args=""
3c0fd78
repo_url=https://github.com/opencollab/llvm-toolchain-integration-test-suite
3c0fd78
3c0fd78
while [ $# -gt 0 ]; do
3c0fd78
    case $1 in
3c0fd78
        --threads)
3c0fd78
            shift
3c0fd78
            threads="$1"
3c0fd78
            ;;
3c0fd78
        * )
3c0fd78
            echo "unknown option: $1"
3c0fd78
            echo ""
3c0fd78
            usage
3c0fd78
            exit 1
3c0fd78
            ;;
3c0fd78
    esac
3c0fd78
    shift
3c0fd78
done
3c0fd78
3c0fd78
if [ -n "$threads" ]; then
3c0fd78
  thread_args="-j$threads"
3c0fd78
fi
3c0fd78
3c0fd78
set -xe
3c0fd78
016d29a
cd $(mktemp -d -p /var/tmp)
3c0fd78
git clone $repo_url
3c0fd78
cd llvm-toolchain-integration-test-suite
3c0fd78
mkdir _build && cd _build
d108b49
cmake .. -GNinja
3c0fd78
ninja $thread_args check