Extract the prepared testsuite to the standalone subpackage so it can be run outside of the buildroot
This commit is contained in:
parent
239038b1a4
commit
8671500d5f
@ -3,7 +3,7 @@
|
||||
|
||||
Name: mariadb-connector-c
|
||||
Version: 3.1.3
|
||||
Release: 1%{?with_debug:.debug}%{?dist}
|
||||
Release: 2%{?with_debug:.debug}%{?dist}
|
||||
Summary: The MariaDB Native Client library (C driver)
|
||||
License: LGPLv2+
|
||||
Source: https://downloads.mariadb.org/interstitial/connector-c-%{version}/mariadb-connector-c-%{version}-src.tar.gz
|
||||
@ -12,6 +12,8 @@ Source3: client.cnf
|
||||
Url: http://mariadb.org/
|
||||
# More information: https://mariadb.com/kb/en/mariadb/building-connectorc-from-source/
|
||||
|
||||
Patch1: testsuite.patch
|
||||
|
||||
Requires: %{_sysconfdir}/my.cnf
|
||||
BuildRequires: zlib-devel cmake openssl-devel gcc-c++
|
||||
# Remote-IO plugin
|
||||
@ -37,6 +39,19 @@ Contains everything needed to build against libmariadb.so >=3 client library.
|
||||
|
||||
|
||||
|
||||
%package test
|
||||
Summary: Testsuite files for mariadb-connector-c
|
||||
Requires: %{name} = %{version}-%{release}
|
||||
Requires: cmake
|
||||
Recommends: mariadb-server
|
||||
|
||||
%description test
|
||||
Testsuite files for mariadb-connector-c.
|
||||
Contains binaries and a prepared CMake ctest file.
|
||||
Requires running MariaDB / MySQL server with create database "test".
|
||||
|
||||
|
||||
|
||||
%package config
|
||||
Summary: Configuration files for packages that use /etc/my.cnf as a configuration file
|
||||
BuildArch: noarch
|
||||
@ -52,6 +67,7 @@ and require this package, so the /etc/my.cnf file is present.
|
||||
|
||||
%prep
|
||||
%setup -q -n %{name}-%{version}-src
|
||||
%patch1 -p1
|
||||
|
||||
# Remove unsused parts
|
||||
rm -r win zlib win-iconv examples
|
||||
@ -176,6 +192,13 @@ popd
|
||||
|
||||
|
||||
|
||||
%files test
|
||||
%dir %{_datadir}/%{name}
|
||||
%{_datadir}/%{name}/*
|
||||
%{_libdir}/libcctap.so
|
||||
|
||||
|
||||
|
||||
# Opened issues on the upstream tracker:
|
||||
# https://jira.mariadb.org/browse/CONC-293
|
||||
# DESCRIPTION: add mysql_config and mariadb_config man page
|
||||
@ -203,6 +226,9 @@ popd
|
||||
# Currently, one of the tests - 'ps_bugs' - is failing
|
||||
|
||||
%changelog
|
||||
* Mon Aug 19 2019 Michal Schorm <mschorm@redhat.com> - 3.1.3-2
|
||||
- Extract the prepared testsuite to the standalone subpackage so it can be run outside of the buildroot
|
||||
|
||||
* Fri Aug 02 2019 Michal Schorm <mschorm@redhat.com> - 3.1.3-1
|
||||
- Rebase to 3.1.3 version
|
||||
- Patch upstreamed
|
||||
|
10
testsuite.patch
Normal file
10
testsuite.patch
Normal file
@ -0,0 +1,10 @@
|
||||
--- mariadb-connector-c-3.1.3-src/unittest/libmariadb/CMakeLists.txt 2019-07-25 10:03:48.000000000 -0400
|
||||
+++ mariadb-connector-c-3.1.3-src/unittest/libmariadb/CMakeLists.txt_patched 2019-08-19 17:02:26.317247605 -0400
|
||||
@@ -71,3 +71,7 @@ FOREACH(API_TEST ${MANUAL_TESTS})
|
||||
ADD_EXECUTABLE(${API_TEST} ${API_TEST}.c)
|
||||
TARGET_LINK_LIBRARIES(${API_TEST} cctap ma_getopt mariadbclient)
|
||||
ENDFOREACH()
|
||||
+
|
||||
+INSTALL(TARGETS ${API_TESTS} DESTINATION ${SHAREDIR}/mariadb-connector-c/tests COMPONENT Tests)
|
||||
+INSTALL(FILES ${CC_SOURCE_DIR}/unittest/mytap/libcctap.so PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE DESTINATION ${INSTALL_LIBDIR} COMPONENT Tests)
|
||||
+INSTALL(FILES ${CC_SOURCE_DIR}/unittest/libmariadb/CTestTestfile.cmake DESTINATION ${SHAREDIR}/mariadb-connector-c/tests COMPONENT Tests)
|
Loading…
Reference in New Issue
Block a user