llvm/run-lit-tests
Tom Stellard 4ccbf0466c Fixes for llvm-test package
- Add some missing Requires
- Add --threads option to run-lit-tests script
- Set PATH so lit can find tools like count, not, etc.
- Don't hardcode tools directory to /usr/lib64/llvm
- Fix typo in yaml-bench define
- Only print information about failing tests
- Run tests in CI with only 1 thread
2018-10-01 15:42:48 +00:00

40 lines
880 B
Bash
Executable File

#!/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"
;;
* )
echo "unknown option: $1"
echo ""
usage
exit 1
;;
esac
shift
done
set -xe
TOOLS_DIR=@TOOLS_DIR@
cd $(mktemp -d)
ln -s /usr/include include
tar -xzf /usr/share/llvm/src/test.tar.gz
PATH=$PATH:$TOOLS_DIR lit -v -s $threads_arg test \
-DFileCheck=$TOOLS_DIR/FileCheck \
-Dcount=$TOOLS_DIR/count \
-Dnot=$TOOLS_DIR/not \
-Dlli-child-target=$TOOLS_DIR/lli-child-target \
-Dllvm-isel-fuzzer=$TOOLS_DIR/llvm-isel-fuzzer \
-Dllvm-opt-fuzzer=$TOOLS_DIR/llvm-opt-fuzzer \
-Dyaml-bench=$TOOLS_DIR/yaml-bench