From 500e5d9b31ec66afd6f31d8f804554f10fe26285 Mon Sep 17 00:00:00 2001 From: Tom Stellard Date: May 29 2019 21:54:28 +0000 Subject: Add test runner for abi-test-suite --- diff --git a/abi-test-suite/runtest.sh b/abi-test-suite/runtest.sh new file mode 100755 index 0000000..09ba722 --- /dev/null +++ b/abi-test-suite/runtest.sh @@ -0,0 +1,42 @@ +#!/bin/bash + +usage() { + echo "usage `basename $0` [OPTIONS]" + echo " --threads NUM The number of threads to use for running tests." + echo " --testsuite-dir DIR Directory containing the test-suite source." + echo " --compiler [gcc|clang] The compiler to test." +} + +threads="1" +testsuite_dir="/usr/share/llvm-test-suite/" + +while [ $# -gt 0 ]; do + case $1 in + --threads) + shift + threads="$1" + ;; + --testsuite-dir) + shift + testsuire_dir="$1" + ;; + --compiler) + shift + compiler="$1" + ;; + * ) + echo "unknown option: $1" + echo "" + usage + exit 1 + ;; + esac + shift +done + +set -xe + +cd $(mktemp -d) +cp -r $testsuite_dir/ABI-Testsuite . +cd ABI-Testsuite +python3 linux-x86.py $compiler test -v -j $threads