Blame SOURCES/run-lit-tests

ef93f8
#!/bin/bash
ef93f8
ef93f8
usage() {
ef93f8
    echo "usage: `basename $0` [OPTIONS]"
ef93f8
    echo "  --threads NUM       The number of threads to use for running tests."
ef93f8
}
ef93f8
ef93f8
threads_arg=''
ef93f8
ef93f8
while [ $# -gt 0 ]; do
ef93f8
    case $1 in
ef93f8
        --threads)
ef93f8
            shift
ef93f8
            threads_arg="--threads $1"
ef93f8
            ;;
ef93f8
        * )
ef93f8
            echo "unknown option: $1"
ef93f8
            echo ""
ef93f8
            usage
ef93f8
            exit 1
ef93f8
            ;;
ef93f8
    esac
ef93f8
    shift
ef93f8
done
ef93f8
ef93f8
set -xe
ef93f8
ef93f8
TOOLS_DIR=@TOOLS_DIR@
ef93f8
cd $(mktemp -d)
ef93f8
ln -s /usr/include include
ef93f8
tar -xzf /usr/share/llvm/src/test.tar.gz
ef93f8
PATH=$PATH:$TOOLS_DIR lit -v -s $threads_arg test \
ef93f8
	-DFileCheck=$TOOLS_DIR/FileCheck \
ef93f8
	-Dcount=$TOOLS_DIR/count \
ef93f8
	-Dnot=$TOOLS_DIR/not \
ef93f8
	-Dlli-child-target=$TOOLS_DIR/lli-child-target \
ef93f8
	-Dllvm-isel-fuzzer=$TOOLS_DIR/llvm-isel-fuzzer \
ef93f8
	-Dllvm-opt-fuzzer=$TOOLS_DIR/llvm-opt-fuzzer \
ef93f8
	-Dyaml-bench=$TOOLS_DIR/yaml-bench