mirror of
https://src.fedoraproject.org/rpms/libomp.git
synced 2024-11-24 08:12:42 +00:00
959c070864
+ 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.
59 lines
1 KiB
Bash
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
|