!2 sentencepiece add testcases

From: @xiefangqi
Reviewed-by: @ouwenchang
Signed-off-by: @ouwenchang
This commit is contained in:
openeuler-ci-bot 2021-09-29 07:29:09 +00:00 committed by Gitee
commit 95279e8ba7

View File

@ -1,13 +1,13 @@
Name: sentencepiece Name: sentencepiece
Version: 0.1.92 Version: 0.1.92
Release: 1 Release: 2
Summary: An unsupervised text tokenizer and detokenizer Summary: An unsupervised text tokenizer and detokenizer
License: Apache-2.0 License: Apache-2.0
URL: https://github.com/google/sentencepiece URL: https://github.com/google/sentencepiece
Source0: https://github.com/google/sentencepiece/archive/v%{version}.tar.gz Source0: https://github.com/google/sentencepiece/archive/v%{version}.tar.gz
BuildRequires: gcc-c++ gcc autoconf pkgconfig protobuf-compiler protobuf protobuf-devel BuildRequires: gcc-c++ gcc autoconf pkgconfig protobuf-compiler protobuf
BuildRequires: cmake >= 3.14.0 BuildRequires: cmake >= 3.14.0
Requires: protobuf-devel protobuf protobuf-compiler Requires: protobuf protobuf-compiler
%description %description
SentencePiece is an unsupervised text tokenizer and detokenizer mainly for Neural Network-based text generation SentencePiece is an unsupervised text tokenizer and detokenizer mainly for Neural Network-based text generation
@ -26,11 +26,13 @@ cmake ../../ -DCMAKE_CXX_FLAGS="-D_FORTIFY_SOURCE=2 -O2 -Wno-unused-result -Wno-
-DCMAKE_BUILD_TYPE=Release\ -DCMAKE_BUILD_TYPE=Release\
-DSPM_USE_BUILTIN_PROTOBUF=ON\ -DSPM_USE_BUILTIN_PROTOBUF=ON\
-DSPM_ENABLE_SHARED=OFF\ -DSPM_ENABLE_SHARED=OFF\
-DSPM_BUILD_TEST=ON\
-DCMAKE_INSTALL_LIBDIR=%{buildroot}%{_libdir}\ -DCMAKE_INSTALL_LIBDIR=%{buildroot}%{_libdir}\
-DCMAKE_INSTALL_BINDIR=%{buildroot}%{_bindir}\ -DCMAKE_INSTALL_BINDIR=%{buildroot}%{_bindir}\
-DCMAKE_INSTALL_INCDIR=%{buildroot}%{_includedir} -DCMAKE_INSTALL_INCDIR=%{buildroot}%{_includedir}
make -j24 V=1 make -j24 V=1
make CTEST_OUTPUT_ON_FAILURE=1 test
cd ../../ cd ../../
%install %install
@ -45,5 +47,7 @@ make install
%{_includedir}/sentencepiece_*.h %{_includedir}/sentencepiece_*.h
%changelog %changelog
* Wed Sep 29 2021 xiefangqi <xiefangqi2@huawei.com> - 0.1.92-2
- add test cases
* Wed Sep 23 2021 xiefangqi <xiefangqi2@huawei.com> - 0.1.92-1 * Wed Sep 23 2021 xiefangqi <xiefangqi2@huawei.com> - 0.1.92-1
- package init - package init