libomp/run-lit-tests
Tom Stellard 0d79d8ca03 Simplify libomp-test package
+ Rename test script to run-lit-tests and move to libexec to match
  llvm-test.
+ Move most of the configuration out of the spec file and into the
  test script and a custom lit config file.
+ Stop testing libomp with gcc.  Most of the complication in the
  spec file was to enable testing with gcc.  A user would have to
  go way out of their way to make libomp work with gcc, so I don't
  think there is much value in keeping the complexity in order to test
  this.
2019-04-25 22:01:25 +00:00

59 lines
1 KiB
Bash

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