Accepting request 313816 from home:scarabeus_iv:branches:server:database

Now enable testsuite

OBS-URL: https://build.opensuse.org/request/show/313816
OBS-URL: https://build.opensuse.org/package/show/server:database/mariadb?expand=0&rev=175
This commit is contained in:
Martin Pluskal 2015-06-26 10:21:30 +00:00 committed by Git OBS Bridge
parent f837494b39
commit 7a8ce5e51e
4 changed files with 84 additions and 6 deletions

View File

@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1 version https://git-lfs.github.com/spec/v1
oid sha256:5dd090b9dde89d15eebedd789d3a8a50d6f95a2f1d752b5aa80d505ff25a6833 oid sha256:465061d4ebda67a81115efee655eea8fa0d6755677015bfc469d69282707ea89
size 318 size 307

View File

@ -1,3 +1,8 @@
-------------------------------------------------------------------
Fri Jun 26 07:41:39 UTC 2015 - tchvatal@suse.com
- Enable testsuite
------------------------------------------------------------------- -------------------------------------------------------------------
Thu Jun 25 13:50:12 UTC 2015 - tchvatal@suse.com Thu Jun 25 13:50:12 UTC 2015 - tchvatal@suse.com

View File

@ -27,6 +27,8 @@
%define builtin_plugins partition,csv,heap,aria,pbxt,myisam,myisammrg,xtradb %define builtin_plugins partition,csv,heap,aria,pbxt,myisam,myisammrg,xtradb
%define extra_provides mariadb_100 %define extra_provides mariadb_100
%define with_mandatory_boost 0 %define with_mandatory_boost 0
# _tmpfilesdir is not defined in systemd macros up to openSUSE 13.2
%{!?_tmpfilesdir: %global _tmpfilesdir %{_libexecdir}/tmpfiles.d }
# Remove when 13.1 is out of support scope # Remove when 13.1 is out of support scope
%if ! %{defined _rundir} %if ! %{defined _rundir}
%define _rundir %{_localstatedir}/run %define _rundir %{_localstatedir}/run
@ -86,6 +88,21 @@ BuildRequires: sqlite
BuildRequires: tcpd-devel BuildRequires: tcpd-devel
BuildRequires: zlib-devel BuildRequires: zlib-devel
BuildRequires: pkgconfig(systemd) BuildRequires: pkgconfig(systemd)
# Tests requires time and ps and some perl modules
# Keep in sync with Requires of mysql-testsuite
BuildRequires: procps
BuildRequires: time
BuildRequires: perl(Env)
BuildRequires: perl(Exporter)
BuildRequires: perl(Fcntl)
BuildRequires: perl(File::Temp)
BuildRequires: perl(Data::Dumper)
BuildRequires: perl(Getopt::Long)
BuildRequires: perl(IPC::Open3)
BuildRequires: perl(Socket)
BuildRequires: perl(Sys::Hostname)
BuildRequires: perl(Test::More)
BuildRequires: perl(Time::HiRes)
# required by rcmysql # required by rcmysql
Requires: %{name}-client Requires: %{name}-client
Requires: %{name}-errormessages = %{version} Requires: %{name}-errormessages = %{version}
@ -244,6 +261,20 @@ Requires: %{name} = %{version}
Requires: %{name}-bench = %{version} Requires: %{name}-bench = %{version}
Requires: %{name}-client = %{version} Requires: %{name}-client = %{version}
Requires: %{name}-tools = %{version} Requires: %{name}-tools = %{version}
# Tests requires time and ps and some perl modules
Requires: procps
Requires: time
Requires: perl(Env)
Requires: perl(Exporter)
Requires: perl(Fcntl)
Requires: perl(File::Temp)
Requires: perl(Data::Dumper)
Requires: perl(Getopt::Long)
Requires: perl(IPC::Open3)
Requires: perl(Socket)
Requires: perl(Sys::Hostname)
Requires: perl(Test::More)
Requires: perl(Time::HiRes)
Requires: perl-DBD-mysql Requires: perl-DBD-mysql
Conflicts: otherproviders(mysql-test) Conflicts: otherproviders(mysql-test)
Provides: mysql-test = %{version} Provides: mysql-test = %{version}
@ -493,6 +524,14 @@ install -D -m 644 %{_sourcedir}/mysql.target '%{buildroot}'%{_libexecdir}/system
ln -s mysql@.service '%{buildroot}'%{_libexecdir}/systemd/system/mysql@default.service ln -s mysql@.service '%{buildroot}'%{_libexecdir}/systemd/system/mysql@default.service
rm -rf '%{buildroot}'%{_sysconfdir}/init.d rm -rf '%{buildroot}'%{_sysconfdir}/init.d
# Tmpfiles file to exclude mysql tempfiles that are auto-cleaned up
# bnc#852451
mkdir -p %{buildroot}%{_tmpfilesdir}
cat > %{buildroot}%{_tmpfilesdir}/mysql.conf <<EOF
x /var/tmp/mysql.*
X /var/tmp/mysql.*
EOF
# SuSEfirewall service description # SuSEfirewall service description
install -D -m 644 %{_sourcedir}/mysql.SuSEfirewall2 %{buildroot}%{_sysconfdir}/sysconfig/SuSEfirewall2.d/services/mysql install -D -m 644 %{_sourcedir}/mysql.SuSEfirewall2 %{buildroot}%{_sysconfdir}/sysconfig/SuSEfirewall2.d/services/mysql
@ -509,6 +548,15 @@ for i in `grep -Rl '\r' '%{buildroot}'%{_datadir}/sql-bench`; do
dos2unix "$i" dos2unix "$i"
done done
# Fix libmysqlclient_r.so.18 symlinking to be done against plain .so file
# and thus broken later on. Fixes bnc#906147
pushd "%{buildroot}%{_libdir}"
rm -f lib%{libname}_r.so*
ln -sf lib%{libname}%{soname}.so.%{soname}.0.0 lib%{libname}_r.so
ln -sf lib%{libname}%{soname}.so.%{soname}.0.0 lib%{libname}_r.so.%{soname}
ln -sf lib%{libname}%{soname}.so.%{soname}.0.0 lib%{libname}_r.so.%{soname}.0.0
popd
# If not preffered simply reduce main develpackage to NULL # If not preffered simply reduce main develpackage to NULL
%if ! 0%{preferred} > 0 %if ! 0%{preferred} > 0
cat libmysqlclient-devel.files | sed 's|%%doc\ ||' | while read tmp; do cat libmysqlclient-devel.files | sed 's|%%doc\ ||' | while read tmp; do
@ -538,6 +586,27 @@ rm -f '%{buildroot}'%{_datadir}/doc/* 2> /dev/null || true
# Unwanted packaged stuff # Unwanted packaged stuff
rm -rf '%{buildroot}'%{_datadir}/mysql/{solaris,SELinux} rm -rf '%{buildroot}'%{_datadir}/mysql/{solaris,SELinux}
%check
cd build
# First run simple ctest unittests
LD_LIBRARY_PATH=$(pwd)/unittest/mytap make test %{?_smp_mflags}
# And then run discustingly HUGE testsuite that might fail here and there
# Basically we run it to have overview to check how it goes
cd mysql-test
./mysql-test-run.pl \
--parallel=%{?jobs:%{jobs}} \
--force \
--retry=0 \
--ssl \
--suite-timeout=720 \
--testcase-timeout=30 \
--mysqld=--binlog-format=mixed \
--force-restart \
--shutdown-timeout=60 \
--max-test-fail=0 || :
# client does not require server and needs the user too # client does not require server and needs the user too
%pre client %pre client
getent group mysql >/dev/null || groupadd -r mysql getent group mysql >/dev/null || groupadd -r mysql
@ -556,6 +625,8 @@ usermod -g mysql -s /bin/false mysql
%post %post
%service_add_post mysql.service mysql@.service mysql.target mysql@default.service %service_add_post mysql.service mysql@.service mysql.target mysql@default.service
# Use %tmpfiles_create when 13.2 is oldest in support scope
/usr/bin/systemd-tmpfiles --create %{_tmpfilesdir}/mysql.conf || :
# SLE11 Migration support # SLE11 Migration support
for in in protected tmp; do for in in protected tmp; do
@ -645,6 +716,7 @@ exit 0
%{_libexecdir}/systemd/system/mysql@.service %{_libexecdir}/systemd/system/mysql@.service
%{_libexecdir}/systemd/system/mysql@default.service %{_libexecdir}/systemd/system/mysql@default.service
%{_libexecdir}/systemd/system/mysql.target %{_libexecdir}/systemd/system/mysql.target
%{_tmpfilesdir}/mysql.conf
%{_sbindir}/rcmysql %{_sbindir}/rcmysql
%dir %{_datadir}/%{name} %dir %{_datadir}/%{name}
%dir %{_datadir}/mysql %dir %{_datadir}/mysql
@ -669,7 +741,6 @@ exit 0
%defattr(-, root, root) %defattr(-, root, root)
%{_includedir}/mysql %{_includedir}/mysql
%{_libdir}/libmysqlclient.so %{_libdir}/libmysqlclient.so
%{_libdir}/libmysqlclient_r.so
%dir %{_datadir}/aclocal %dir %{_datadir}/aclocal
%{_datadir}/aclocal/mysql.m4 %{_datadir}/aclocal/mysql.m4
@ -689,7 +760,9 @@ exit 0
%files -n lib%{libname}_r%{soname} %files -n lib%{libname}_r%{soname}
%defattr(-, root, root) %defattr(-, root, root)
%{_libdir}/lib%{libname}_r.so.* # We need .so file here as few apps still rely on it to be present.
# Currently known are Mysql workbench and Libreoffice
%{_libdir}/lib%{libname}_r.so*
%files bench -f mysql-bench.files %files bench -f mysql-bench.files
%defattr(-, root, root) %defattr(-, root, root)

View File

@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1 version https://git-lfs.github.com/spec/v1
oid sha256:6f2c9f60cb22caabaa021816b0359a38e0914779e7d2d405218972ce42dc9f50 oid sha256:a1fa926d7345c0d215687eb46b55d1ba3998e3eaf2db3e4cf55aa0bec88882e5
size 16496 size 16535