Fix regression-tests CI tests

This commit is contained in:
Tom Stellard 2020-08-19 14:39:12 +00:00
parent 764a78bf46
commit afed217ebc
4 changed files with 30 additions and 7 deletions

View file

@ -11,7 +11,7 @@
%global llvm_libdir %{_libdir}/%{name}
%global build_llvm_libdir %{buildroot}%{llvm_libdir}
%global rc_ver 1
%global baserelease 0.3
%global baserelease 0.4
%global llvm_srcdir llvm-%{version}%{?rc_ver:rc%{rc_ver}}.src
%global maj_ver 11
%global min_ver 0
@ -322,10 +322,14 @@ cp -R utils/unittest %{install_srcdir}/utils/
cp utils/update_cc_test_checks.py %{install_srcdir}/utils/
cp -R utils/UpdateTestChecks %{install_srcdir}/utils/
# Generate lit config files. Strip off the last line that initiates the
# One of the lit tests references this file
install -d %{install_srcdir}/docs/CommandGuide/
install -m 0644 docs/CommandGuide/dsymutil.rst %{install_srcdir}/docs/CommandGuide/
# Generate lit config files. Strip off the last lines that initiates the
# test run, so we can customize the configuration.
head -n -1 %{_vpath_builddir}/test/lit.site.cfg.py >> %{lit_cfg}
head -n -1 %{_vpath_builddir}/test/Unit/lit.site.cfg.py >> %{lit_unit_cfg}
head -n -2 %{_vpath_builddir}/test/lit.site.cfg.py >> %{lit_cfg}
head -n -2 %{_vpath_builddir}/test/Unit/lit.site.cfg.py >> %{lit_unit_cfg}
# Install custom fedora config file
cp %{SOURCE2} %{buildroot}%{lit_fedora_cfg}
@ -518,6 +522,7 @@ fi
%{_datadir}/llvm/src/%{_arch}.site.cfg.py
%{_datadir}/llvm/src/%{_arch}.Unit.site.cfg.py
%{_datadir}/llvm/lit.fedora.cfg.py
%{_datadir}/llvm/src/docs/CommandGuide/dsymutil.rst
%{_bindir}/not
%{_bindir}/count
%{_bindir}/yaml-bench
@ -535,6 +540,9 @@ fi
%endif
%changelog
* Wed Aug 19 2020 Tom Stellard <tstellar@redhat.com> - 11.0.0-0.4.rc1
- Fix regression-tests CI tests
* Tue Aug 18 2020 Tom Stellard <tstellar@redhat.com> - 11.0.0-0.3.rc1
- Fix rust crash on ppc64le compiling firefox
- rhbz#1862012

View file

@ -48,6 +48,7 @@ esac
cd $(mktemp -d)
ln -s /usr/include include
ln -s /usr/share/llvm/src/docs docs
tar -xzf /usr/share/llvm/src/test.tar.gz
ln -s /usr/share/llvm/src/$ARCH.site.cfg.py test/lit.site.cfg.py
ln -s /usr/share/llvm/src/$ARCH.Unit.site.cfg.py test/Unit/lit.site.cfg.py

View file

@ -0,0 +1,16 @@
#!/bin/bash
set -ex
cmd='/usr/libexec/tests/llvm/run-lit-tests --threads 1'
if [ `id -u` -eq 0 ]; then
# lit tests can't be run as root, so we need to run as a different user
user='llvm-regression-tests'
if ! id -u $user; then
useradd $user
fi
su $user -c "$cmd"
cmd="su $user -c $cmd"
else
exec $cmd
fi

View file

@ -13,9 +13,7 @@
- repo: "https://src.fedoraproject.org/tests/llvm.git"
dest: "llvm"
tests:
- regression-tests:
dir: ./
run: /usr/libexec/tests/llvm/run-lit-tests --threads 1
- regression-tests
- rust-sanity:
dir: ./
run: cargo new hello && cd hello && cargo run