Blame SOURCES/run-lit-tests

70fe70
#!/usr/bin/bash
70fe70
70fe70
set -e
70fe70
70fe70
usage() {
70fe70
    echo "usage: `basename $0` [OPTIONS]"
70fe70
    echo "  --threads NUM       The number of threads to use for running tests."
70fe70
}
70fe70
70fe70
70fe70
threads_arg=''
70fe70
70fe70
while [ $# -gt 0 ]; do
70fe70
    case $1 in
70fe70
        --threads)
70fe70
            shift
70fe70
            threads_arg="--threads $1"
70fe70
            ;;
70fe70
        --multilib-arch)
70fe70
            shift
70fe70
            ARCH=$1
70fe70
            ;;
70fe70
        * )
70fe70
            echo "unknown option: $1"
70fe70
            echo ""
70fe70
            usage
70fe70
            exit 1
70fe70
            ;;
70fe70
    esac
70fe70
    shift
70fe70
done
70fe70
70fe70
70fe70
set -xe
70fe70
70fe70
if [ -z "$ARCH" ]; then
70fe70
    ARCH=`rpm --eval '%_arch'`
70fe70
fi
70fe70
70fe70
case $ARCH in
70fe70
    arm)
70fe70
        ;&
70fe70
    i686)
70fe70
        LIB_DIR="/usr/lib/"
70fe70
        ;;
70fe70
    *)
70fe70
        LIB_DIR="/usr/lib64/"
70fe70
        ;;
70fe70
esac
70fe70
70fe70
BIN_DIR="/usr/bin/"
70fe70
INCLUDE_DIR="/usr/include/"
70fe70
70fe70
lit $threads_arg -v \
70fe70
    --config-prefix $ARCH \
70fe70
    -Dlibomp_compiler=clang \
70fe70
    -Dbindir=$BIN_DIR \
70fe70
    -Dlibdir=$LIB_DIR \
70fe70
    -Dincludedir=$INCLUDE_DIR \
70fe70
    -Dlibomp_test_root=/usr/share/libomp/src/runtime/test \
70fe70
    /usr/share/libomp/src/runtime/test
70fe70
70fe70
exit 0