Enable unittest

Signed-off-by: Weifeng Su <suweifeng1@huawei.com>
This commit is contained in:
Weifeng Su 2022-11-05 09:39:29 +08:00
parent 19ee647f2f
commit 5909a0fdf8

View File

@ -3,7 +3,7 @@
Name: spdk Name: spdk
Version: 21.01.1 Version: 21.01.1
Release: 5 Release: 6
Summary: Set of libraries and utilities for high performance user-mode storage Summary: Set of libraries and utilities for high performance user-mode storage
License: BSD and MIT License: BSD and MIT
URL: http://spdk.io URL: http://spdk.io
@ -44,6 +44,7 @@ BuildRequires: gcc gcc-c++ make
BuildRequires: dpdk-devel, numactl-devel, ncurses-devel BuildRequires: dpdk-devel, numactl-devel, ncurses-devel
BuildRequires: libiscsi-devel, libaio-devel, openssl-devel, libuuid-devel BuildRequires: libiscsi-devel, libaio-devel, openssl-devel, libuuid-devel
BuildRequires: libibverbs-devel, librdmacm-devel BuildRequires: libibverbs-devel, librdmacm-devel
BuildRequires: CUnit, CUnit-devel
%if %{with doc} %if %{with doc}
BuildRequires: doxygen mscgen graphviz BuildRequires: doxygen mscgen graphviz
%endif %endif
@ -102,7 +103,6 @@ BuildArch: noarch
%build %build
./configure --prefix=%{_usr} \ ./configure --prefix=%{_usr} \
--disable-tests \ --disable-tests \
--disable-unit-tests \
--without-crypto \ --without-crypto \
--without-isal \ --without-isal \
--with-dpdk=/usr/lib64/dpdk/pmds-22.0 \ --with-dpdk=/usr/lib64/dpdk/pmds-22.0 \
@ -121,6 +121,11 @@ make -j`nproc` all
make -C doc make -C doc
%endif %endif
%check
sed -i "s/sudo//g" test/common/autotest_common.sh
sed -i '/target_space=/aexport SPDK_TEST_STORAGE=$target_dir;return 0' test/common/autotest_common.sh
test/unit/unittest.sh
%install %install
%make_install -j`nproc` prefix=%{_usr} libdir=%{_libdir} datadir=%{_datadir} %make_install -j`nproc` prefix=%{_usr} libdir=%{_libdir} datadir=%{_datadir}
install -d $RPM_BUILD_ROOT/opt/spdk/scripts install -d $RPM_BUILD_ROOT/opt/spdk/scripts
@ -189,6 +194,9 @@ mv doc/output/html/ %{install_docdir}
%changelog %changelog
* Sat Nov 5 2022 Weifeng Su <suweifeng1@huawei.com> - 21.01.1-6
- Enable unittest
* Mon Oct 24 2022 Hongtao Zhang <zhanghongtao22@huawei.com> - 21.01.1-5 * Mon Oct 24 2022 Hongtao Zhang <zhanghongtao22@huawei.com> - 21.01.1-5
- Add the setup.sh script during installation - Add the setup.sh script during installation