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