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