2021-07-15 07:55:00 +00:00
|
|
|
#!/bin/sh -eux
|
2021-05-03 14:12:03 +00:00
|
|
|
|
|
|
|
usage() {
|
|
|
|
echo "usage `basename $0` [OPTIONS]"
|
|
|
|
echo " --threads NUM The number of threads to use for running tests."
|
|
|
|
}
|
|
|
|
|
2021-07-15 07:55:00 +00:00
|
|
|
threads=0
|
2021-05-03 14:12:03 +00:00
|
|
|
thread_args=""
|
|
|
|
repo_url=https://github.com/opencollab/llvm-toolchain-integration-test-suite
|
|
|
|
|
|
|
|
while [ $# -gt 0 ]; do
|
|
|
|
case $1 in
|
|
|
|
--threads)
|
|
|
|
shift
|
|
|
|
threads="$1"
|
|
|
|
;;
|
|
|
|
* )
|
|
|
|
echo "unknown option: $1"
|
|
|
|
echo ""
|
|
|
|
usage
|
|
|
|
exit 1
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
shift
|
|
|
|
done
|
|
|
|
|
2021-07-15 07:55:00 +00:00
|
|
|
if [ "$threads" -ge 1 ]; then
|
2021-05-03 14:12:03 +00:00
|
|
|
thread_args="-j$threads"
|
|
|
|
fi
|
|
|
|
|
|
|
|
cd $(mktemp -d -p /var/tmp)
|
|
|
|
git clone $repo_url
|
|
|
|
cd llvm-toolchain-integration-test-suite
|
|
|
|
mkdir _build && cd _build
|
2021-11-25 13:56:57 +00:00
|
|
|
cmake .. -GNinja ${CMAKE_CXXLIB:-}
|
2022-02-15 14:01:33 +00:00
|
|
|
cmake --build . $thread_args --target check
|