Blame abi-test-suite/runtest.sh

500e5d9
#!/bin/bash
500e5d9
500e5d9
usage() {
500e5d9
    echo "usage `basename $0` [OPTIONS]"
500e5d9
    echo "  --threads NUM       The number of threads to use for running tests."
500e5d9
    echo "  --testsuite-dir DIR Directory containing the test-suite source."
500e5d9
    echo "  --compiler [gcc|clang] The compiler to test."
500e5d9
}
500e5d9
500e5d9
testsuite_dir="/usr/share/llvm-test-suite/"
6bf25de
compiler="clang"
66d216d
thread_args=""
500e5d9
500e5d9
while [ $# -gt 0 ]; do
500e5d9
    case $1 in
500e5d9
        --threads)
500e5d9
            shift
500e5d9
            threads="$1"
500e5d9
            ;;
500e5d9
        --testsuite-dir)
500e5d9
            shift
500e5d9
            testsuire_dir="$1"
500e5d9
            ;;
500e5d9
        --compiler)
500e5d9
            shift
500e5d9
            compiler="$1"
500e5d9
            ;;
500e5d9
        * )
500e5d9
            echo "unknown option: $1"
500e5d9
            echo ""
500e5d9
            usage
500e5d9
            exit 1
500e5d9
            ;;
500e5d9
    esac
500e5d9
    shift
500e5d9
done
500e5d9
66d216d
if [ -n "$threads" ]; then
66d216d
  thread_args="-j$threads"
66d216d
fi
66d216d
500e5d9
set -xe
500e5d9
500e5d9
cd $(mktemp -d)
f38bd9c
#using hard links is easier on the fs
f38bd9c
cp -al $testsuite_dir/ABI-Testsuite .
500e5d9
cd ABI-Testsuite
66d216d
python3 linux-x86.py $compiler test -v $thread_args