Fixes for llvm-test package

- Add some missing Requires
- Add --threads option to run-lit-tests script
- Set PATH so lit can find tools like count, not, etc.
- Don't hardcode tools directory to /usr/lib64/llvm
- Fix typo in yaml-bench define
- Only print information about failing tests
- Run tests in CI with only 1 thread
This commit is contained in:
Tom Stellard 2018-09-26 13:23:50 +00:00
parent b5bb6c52ae
commit 4ccbf0466c
5 changed files with 56 additions and 11 deletions

View File

@ -50,7 +50,7 @@
Name: %{pkg_name}
Version: %{maj_ver}.%{min_ver}.%{patch_ver}
Release: 1%{?dist}
Release: 2%{?dist}
Summary: The Low Level Virtual Machine
License: NCSA
@ -136,11 +136,17 @@ Static libraries for the LLVM compiler infrastructure.
%package test
Summary: LLVM regression tests.
Requires: %{name}%{?_isa} = %{version}-%{release}
Requires: python3-lit
# The regression tests need gold.
Requires: binutils
# This is for llvm-config
Requires: %{name}-devel%{?_isa} = %{version}-%{release}
# Bugpoint tests require gcc
Requires: gcc
%description test
LLVM regression tests.
Requires: %{name}%{?_isa} = %{version}-%{release}
Requires: python3-lit
%package googletest
Summary: LLVM's modified googletest sources.
@ -157,6 +163,8 @@ pathfix.py -i %{__python3} -pn \
test/BugPoint/compile-custom.ll.py \
tools/opt-viewer/*.py
sed -i 's~@TOOLS_DIR@~%{llvm_bindir}~' %{SOURCE1}
%build
mkdir -p _build
cd _build
@ -417,6 +425,15 @@ fi
%endif
%changelog
* Thu Sep 27 2018 Tom Stellard <tstellar@redhat.com> - 7.0.0-2
- Fixes for llvm-test package:
- Add some missing Requires
- Add --threads option to run-lit-tests script
- Set PATH so lit can find tools like count, not, etc.
- Don't hardcode tools directory to /usr/lib64/llvm
- Fix typo in yaml-bench define
- Only print information about failing tests
* Fri Sep 21 2018 Tom Stellard <tstellar@redhat.com> - 7.0.0-1
- 7.0.0 Release

View File

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

1
tests/.fmf/version Normal file
View File

@ -0,0 +1 @@
1

5
tests/provision.fmf Normal file
View File

@ -0,0 +1,5 @@
---
standard-inventory-qcow2:
qemu:
m: 2G

View File

@ -6,6 +6,6 @@
required_packages:
- llvm-test
tests:
- rhbz#482491:
- regression-tests:
dir: ./
run: /usr/libexec/tests/llvm/run-lit-tests
run: /usr/libexec/tests/llvm/run-lit-tests --threads 1