From 2b654e3e685c2143347d7a2ad69af7f7443b2842 Mon Sep 17 00:00:00 2001 From: zhangxiaoyu Date: Thu, 16 Feb 2023 11:50:19 +0800 Subject: [PATCH] add check Signed-off-by: zhangxiaoyu (cherry picked from commit d180d88313d9cd5b67b0aaf0ec96eb20bc77c572) --- iSulad.spec | 27 ++++++++++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) diff --git a/iSulad.spec b/iSulad.spec index fd6aa64..ebb3ce7 100644 --- a/iSulad.spec +++ b/iSulad.spec @@ -1,5 +1,5 @@ %global _version 2.0.18 -%global _release 1 +%global _release 2 %global is_systemd 1 %global enable_shimv2 1 %global is_embedded 1 @@ -36,6 +36,10 @@ BuildRequires: sqlite-devel Requires: sqlite %endif +%if %{defined openeuler} +BuildRequires: gtest-devel gmock-devel +%endif + %define lcrver_lower 2.0.9-0 %define lcrver_upper 2.0.10-0 %define clibcniver_lower 2.0.7-0 @@ -76,12 +80,27 @@ Runtime Daemon, written by C. mkdir -p build cd build %if 0%{?enable_shimv2} +%if %{defined openeuler} +%cmake -DDEBUG=ON -DCMAKE_SKIP_RPATH=TRUE -DLIB_INSTALL_DIR=%{_libdir} -DCMAKE_INSTALL_PREFIX=/usr -DENABLE_SHIM_V2=ON -DENABLE_UT=ON ../ +%else %cmake -DDEBUG=ON -DCMAKE_SKIP_RPATH=TRUE -DLIB_INSTALL_DIR=%{_libdir} -DCMAKE_INSTALL_PREFIX=/usr -DENABLE_SHIM_V2=ON ../ +%endif +%else +%if %{defined openeuler} +%cmake -DDEBUG=ON -DCMAKE_SKIP_RPATH=TRUE -DLIB_INSTALL_DIR=%{_libdir} -DCMAKE_INSTALL_PREFIX=/usr -DENABLE_UT=ON ../ %else %cmake -DDEBUG=ON -DCMAKE_SKIP_RPATH=TRUE -DLIB_INSTALL_DIR=%{_libdir} -DCMAKE_INSTALL_PREFIX=/usr ../ %endif +%endif %make_build +%check +%if %{defined openeuler} +cd build +# registry_images_ut and volume_ut must run with root user +ctest -E "registry_images_ut|volume_ut" +%endif + %install rm -rf %{buildroot} cd build @@ -237,6 +256,12 @@ fi %endif %changelog +* Thu Feb 16 2023 zhangxiaoyu - 2.0.18-2 +- Type: bugfix +- ID: NA +- SUG: NA +- DESC: add check + * Tue Jan 03 2023 zhangxiaoyu - 2.0.18-1 - Type: update - ID: NA