From 4ccbf0466c67ba0b46e93b7d3ba7a51af2221eab Mon Sep 17 00:00:00 2001 From: Tom Stellard Date: Oct 01 2018 15:42:48 +0000 Subject: 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 --- diff --git a/llvm.spec b/llvm.spec index fe3ba86..1054566 100644 --- a/llvm.spec +++ b/llvm.spec @@ -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 - 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 - 7.0.0-1 - 7.0.0 Release diff --git a/run-lit-tests b/run-lit-tests index 12fae3e..a0a5d5b 100755 --- a/run-lit-tests +++ b/run-lit-tests @@ -1,17 +1,39 @@ #!/bin/bash -set -xe +usage() { + echo "usage: `basename $0` [OPTIONS]" + echo " --threads NUM The number of threads to use for running tests." +} + +threads_arg='' -#lit -v /usr/share/llvm/src/test +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 -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 diff --git a/tests/.fmf/version b/tests/.fmf/version new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/tests/.fmf/version @@ -0,0 +1 @@ +1 diff --git a/tests/provision.fmf b/tests/provision.fmf new file mode 100644 index 0000000..62a6eba --- /dev/null +++ b/tests/provision.fmf @@ -0,0 +1,5 @@ +--- + +standard-inventory-qcow2: + qemu: + m: 2G diff --git a/tests/tests.yml b/tests/tests.yml index 6cc4703..dbfde2e 100644 --- a/tests/tests.yml +++ b/tests/tests.yml @@ -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