mirror of
https://src.fedoraproject.org/rpms/llvm.git
synced 2024-11-28 18:36:50 +00:00
4573a69a87
Try to simply lit config file generation by adding standalone fedora specific config file. In the future, when we need to customize the lit config for the llvm-test package, we can just update lit.fedora.cfg.py rather than trying to patch the default config from the spec file. This patch also makes the run-lit-tests script identical on all arches, so it will no longer cause multi-lib conflicts.
58 lines
1.1 KiB
Bash
Executable file
58 lines
1.1 KiB
Bash
Executable file
#!/bin/bash
|
|
|
|
usage() {
|
|
echo "usage: `basename $0` [OPTIONS]"
|
|
echo " --threads NUM The number of threads to use for running tests."
|
|
echo " --multilib-arch ARCH Use this option to test 32-bit libs/binaries on"
|
|
echo " 64-bit hosts."
|
|
}
|
|
|
|
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
|
|
|
|
cd $(mktemp -d)
|
|
ln -s /usr/include include
|
|
tar -xzf /usr/share/llvm/src/test.tar.gz
|
|
ln -s $ARCH.site.cfg.py test/lit.site.cfg.py
|
|
ln -s $ARCH.site.cfg.py test/Unit/lit.site.cfg.py
|
|
lit -v -s $threads_arg test \
|
|
-Dllvm_obj_root=`pwd` \
|
|
-Dllvm_test_root=`pwd`/test \
|
|
-Dllvm_unittest_bindir=$LIB_DIR/llvm \
|
|
-Dllvm_shlib_dir=$LIB_DIR
|