Blame SOURCES/run-lit-tests

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