2018-03-19 16:26:08 +00:00
|
|
|
#!/bin/bash
|
|
|
|
|
2018-09-26 13:23:50 +00:00
|
|
|
usage() {
|
|
|
|
echo "usage: `basename $0` [OPTIONS]"
|
|
|
|
echo " --threads NUM The number of threads to use for running tests."
|
|
|
|
}
|
|
|
|
|
|
|
|
threads_arg=''
|
2018-03-19 16:26:08 +00:00
|
|
|
|
2018-09-26 13:23:50 +00:00
|
|
|
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
|
2018-03-19 16:26:08 +00:00
|
|
|
|
2018-09-26 13:23:50 +00:00
|
|
|
TOOLS_DIR=@TOOLS_DIR@
|
2018-03-19 16:26:08 +00:00
|
|
|
cd $(mktemp -d)
|
2018-09-26 13:23:50 +00:00
|
|
|
ln -s /usr/include include
|
2018-03-19 16:26:08 +00:00
|
|
|
tar -xzf /usr/share/llvm/src/test.tar.gz
|
2018-09-26 13:23:50 +00:00
|
|
|
PATH=$PATH:$TOOLS_DIR lit -v -s $threads_arg test \
|
2018-03-19 16:26:08 +00:00
|
|
|
-DFileCheck=$TOOLS_DIR/FileCheck \
|
2018-09-26 13:23:50 +00:00
|
|
|
-Dcount=$TOOLS_DIR/count \
|
2018-03-19 16:26:08 +00:00
|
|
|
-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 \
|
2018-09-26 13:23:50 +00:00
|
|
|
-Dyaml-bench=$TOOLS_DIR/yaml-bench
|