Compare commits

...

5 Commits
rawhide ... f28

Author SHA1 Message Date
Tom Stellard 310bc988f6 Add -threads option to runtest.sh
And fixup the test defintion so that the tests get run.
2018-07-09 19:37:04 +00:00
Tom Stellard 144c51c879 6.0.1 Release 2018-07-09 19:36:57 +00:00
Tom Stellard 17f96f1542 6.0.1-rc1 Release 2018-07-09 19:36:47 +00:00
Tom Stellard 1ea30b63c7 Add test package 2018-07-09 19:36:40 +00:00
Tom Stellard c7870d08b0 Enable libomptarget plugins 2018-04-02 13:31:18 +00:00
5 changed files with 130 additions and 3 deletions

2
.gitignore vendored
View File

@ -3,3 +3,5 @@
/openmp-6.0.0rc1.src.tar.xz
/openmp-6.0.0rc2.src.tar.xz
/openmp-6.0.0.src.tar.xz
/openmp-6.0.1rc1.src.tar.xz
/openmp-6.0.1.src.tar.xz

View File

@ -1,11 +1,18 @@
%ifarch ppc64le
%global libomp_arch ppc64
%else
%global libomp_arch %{_arch}
%endif
Name: libomp
Version: 6.0.0
Release: 1%{?dist}
Version: 6.0.1
Release: 2%{?dist}
Summary: OpenMP runtime for clang
License: NCSA
URL: http://openmp.llvm.org
Source0: http://llvm.org/releases/%{version}/openmp-%{version}%{?rc_ver:rc%{rc_ver}}.src.tar.xz
Source1: runtest.sh
Patch0: 0001-CMake-Make-LIBOMP_HEADERS_INSTALL_PATH-a-cache-varia.patch
@ -14,6 +21,7 @@ BuildRequires: elfutils-libelf-devel
BuildRequires: perl
BuildRequires: perl-Data-Dumper
BuildRequires: perl-Encode
BuildRequires: libffi-devel
Requires: elfutils-libelf%{?isa}
@ -30,6 +38,19 @@ Requires: clang-devel%{?isa} = %{version}
%description devel
OpenMP header files.
%package test
Summary: OpenMP regression tests
Requires: %{name}%{?isa} = %{version}
Requires: %{name}-devel%{?isa} = %{version}
Requires: clang
Requires: llvm
Requires: gcc
Requires: gcc-c++
Requires: python3-lit
%description test
OpenMP regression tests
%prep
%autosetup -n openmp-%{version}%{?rc_ver:rc%{rc_ver}}.src -p1
@ -52,10 +73,52 @@ cd _build
%install
%make_install -C _build
# Test package setup
%global libomp_srcdir %{_datadir}/libomp/src/
%global libomp_testdir %{libomp_srcdir}/runtime/test/
%global gcc_lit_cfg %{buildroot}%{libomp_testdir}/gcc.site.cfg
%global clang_lit_cfg %{buildroot}%{libomp_testdir}/clang.site.cfg
install -d %{buildroot}%{libomp_srcdir}/runtime
cp -R runtime/test %{buildroot}%{libomp_srcdir}/runtime
cp -R runtime/src %{buildroot}%{libomp_srcdir}/runtime
# Add symlinks to the libomp headers/library so gcc can find them.
ln -s %{_libdir}/clang/%{version}/include/omp.h %{buildroot}%{libomp_testdir}/omp.h
ln -s %{_libdir}/clang/%{version}/include/ompt.h %{buildroot}%{libomp_testdir}/ompt.h
ln -s %{_libdir}/libomp.so %{buildroot}%{libomp_testdir}/libgomp.so
# Generic test config
echo "import tempfile" > %{gcc_lit_cfg}
cat _build/runtime/test/lit.site.cfg >> %{gcc_lit_cfg}
sed -i 's~\(config.test_filecheck = \)""~\1"%{_libdir}/llvm/FileCheck"~' %{gcc_lit_cfg}
sed -i 's~\(config.omp_header_directory = \)"[^"]\+"~\1"%{_includedir}"~' %{gcc_lit_cfg}
sed -i 's~\(config.libomp_obj_root = \)"[^"]\+"~\1tempfile.mkdtemp()[1]~' %{gcc_lit_cfg}
sed -i 's~\(lit_config.load_config(config, \)"[^"]\+"~\1"%{libomp_testdir}/lit.cfg"~' %{gcc_lit_cfg}
# GCC config
# test_compiler_features was already populated with gcc information if gcc was used
# to compile libomp.
sed -i 's~\(config.test_c_compiler = \)"[^"]\+"~\1"%{_bindir}/gcc"~' %{gcc_lit_cfg}
sed -i 's~\(config.test_cxx_compiler = \)"[^"]\+"~\1"%{_bindir}/g++"~' %{gcc_lit_cfg}
sed -i 's~\(config.library_dir = \)"[^"]\+"~\1"%{libomp_testdir}"~' %{gcc_lit_cfg}
# Clang config
cp %{gcc_lit_cfg} %{clang_lit_cfg}
sed -i 's~\(config.test_compiler_features = \)\[[^\[]\+]~\1["clang"]~' %{clang_lit_cfg}
sed -i 's~\(config.test_c_compiler = \)"[^"]\+"~\1"%{_bindir}/clang"~' %{clang_lit_cfg}
sed -i 's~\(config.test_cxx_compiler = \)"[^"]\+"~\1"%{_bindir}/clang++"~' %{clang_lit_cfg}
sed -i 's~\(config.library_dir = \)"[^"]\+"~\1"%{_libdir}"~' %{clang_lit_cfg}
install -m 0755 %{SOURCE1} %{buildroot}%{_datadir}/libomp
%files
%{_libdir}/libomp.so
%{_libdir}/libomptarget.so
%ifnarch %{arm} %{ix86}
%{_libdir}/libomptarget.rtl.%{libomp_arch}.so
%endif
%files devel
%{_libdir}/clang/%{version}/include/omp.h
@ -63,7 +126,25 @@ cd _build
%{_libdir}/clang/%{version}/include/ompt.h
%endif
%files test
%{_datadir}/libomp
%changelog
* Mon Jul 02 2018 Tom Stellard <tstellar@redhat.com> - 6.0.1-2
- Add -threads option to runtest.sh
* Thu Jun 28 2018 Tom Stellard <tstellar@redhat.com> - 6.0.1-1
- 6.0.1 Release
* Fri May 11 2018 Tom Stellard <tstellar@redhat.com> - 6.0.0-0.1.rc1
- 6.0.1-rc1 Release
* Wed Mar 28 2018 Tom Stellard <tstellar@redhat.com> - 6.0.0-3
- Add test package
* Wed Mar 28 2018 Tom Stellard <tstellar@redhat.com> - 6.0.0-2
- Enable libomptarget plugins
* Fri Mar 09 2018 Tom Stellard <tstellar@redhat.com> - 6.0.0-1
- 6.0.0 Release

33
runtest.sh Normal file
View File

@ -0,0 +1,33 @@
#!/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 -x
lit $threads_arg -v --config-prefix clang /usr/share/libomp/src/runtime/test
fail=$?
lit $threads_arg -v --config-prefix gcc /usr/share/libomp/src/runtime/test
exit $fail || $?

View File

@ -1 +1 @@
SHA512 (openmp-6.0.0.src.tar.xz) = 9dfb070a3fae883985e3c8cd357c21a2144b433824139e288d4d3c774dd9cf3f7949978976012b08c644cd4a04be8c65a810c2f33d66eee05d3d980e61413a06
SHA512 (openmp-6.0.1.src.tar.xz) = abb956583e5d11d0c6f6d97183c081d658616a74933be884a591eaa3d8c4bb04f08f02016d2c86d7384c7ff1aa44fb949b0d967fc0ff50e3132aaba412e9add8

11
tests/tests.yml Normal file
View File

@ -0,0 +1,11 @@
- hosts: localhost
roles:
- role: standard-test-basic
tags:
- classic
required_packages:
- libomp-test
tests:
- libomp-regression-tests:
dir: ./
run: /usr/share/libomp/runtest.sh --threads 8