diff options
author | 김명운/Tizen Platform Lab(SR)/삼성전자 <myoungwoon.kim@samsung.com> | 2023-05-11 15:50:26 +0900 |
---|---|---|
committer | GitHub Enterprise <noreply-CODE@samsung.com> | 2023-05-11 15:50:26 +0900 |
commit | 1aad3750fa0915c193cedc86af71fcd51727c515 (patch) | |
tree | 859a74c8dacaff94a2b2f2ba2ad04c19cb202857 | |
parent | 1290c6216bf69212405c56fe0949be1daa3363e6 (diff) | |
parent | 3724eee8b646d426d29e9fc3f4899a20b60b5568 (diff) | |
download | rust-slog-accepted/tizen_rust.tar.gz rust-slog-accepted/tizen_rust.tar.bz2 rust-slog-accepted/tizen_rust.zip |
Merge pull request #1 from myoungwoon-kim/devaccepted/tizen/rust/20231016.021936tizenaccepted/tizen_rust
Add unittest
-rw-r--r-- | packaging/rust-slog.spec | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/packaging/rust-slog.spec b/packaging/rust-slog.spec index c749a3e..bac1dc8 100644 --- a/packaging/rust-slog.spec +++ b/packaging/rust-slog.spec @@ -50,6 +50,20 @@ cp %{SOURCE1} . install -d -m 0755 %{buildroot}%{_rust_dylibdir} install -m 0644 lib%{real_crate_name}.so %{buildroot}/%{_rust_dylibdir}/lib%{real_crate_name}.so +%check +%if 0%{?run_tests} + +export CARGO_PKG_VERSION=1.67.1 + +%{rustc_std_build} --test --crate-type=dylib \ + --crate-name=%{real_crate_name} \ + %{?rustc_edition:--edition=%{rustc_edition}} \ + --cfg='feature="std"' \ + ./src/lib.rs + +./%{real_crate_name} +%endif + %clean %post -p /sbin/ldconfig |