abi-test-suite: Add improvements
1. Ensure the required packages are listed. 2. Ignore running this test on RHEL/CentOS because the llvm-test-suite package is not available there. 3. Ignore running this test for compat packages. 4. Remove treatment of parameters from the script because this will always be called from tmt without parameters. 5. Remove temporary directory.
This commit is contained in:
parent
a7f0d01a63
commit
d342d3c08b
2 changed files with 20 additions and 38 deletions
|
|
@ -2,6 +2,21 @@ summary: Run ABI tests from llvm-test-suite package
|
|||
duration: 1h
|
||||
|
||||
adjust+:
|
||||
- because: "llvm-test-suite is available for Fedora, not RHEL/CentOS"
|
||||
when: >-
|
||||
distro == rhel
|
||||
or distro == centos
|
||||
enabled: false
|
||||
|
||||
- because: ABI testsuite only supported in x86*
|
||||
enabled: false
|
||||
when: arch != x86_64
|
||||
|
||||
- because: "llvm test suite not built for compat packages"
|
||||
enabled: false
|
||||
when: compat is defined
|
||||
|
||||
require+:
|
||||
- clang
|
||||
- llvm-test-suite
|
||||
- python3
|
||||
|
|
|
|||
|
|
@ -1,47 +1,14 @@
|
|||
#!/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."
|
||||
}
|
||||
|
||||
testsuite_dir="/usr/share/llvm-test-suite/"
|
||||
compiler="clang"
|
||||
thread_args=""
|
||||
|
||||
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
|
||||
|
||||
if [ -n "$threads" ]; then
|
||||
thread_args="-j$threads"
|
||||
fi
|
||||
|
||||
set -xe
|
||||
|
||||
cd $(mktemp -d -p /var/tmp)
|
||||
tmpdir=$(mktemp -d -p /var/tmp)
|
||||
pushd "$tmpdir"
|
||||
cp -r $testsuite_dir/ABI-Testsuite .
|
||||
cd ABI-Testsuite
|
||||
python3 linux-x86.py $compiler test -v $thread_args
|
||||
python3 linux-x86.py $compiler test -v
|
||||
popd
|
||||
rm -rf "$tmpdir"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue