summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDongHun Kwak <dh0128.kwak@samsung.com>2023-04-19 15:37:55 +0900
committerDongHun Kwak <dh0128.kwak@samsung.com>2023-04-19 15:37:55 +0900
commit9720a93b469f44cbb2b8cacf222622a18d5e4f71 (patch)
tree855a95dba367b663ed2b8e6ae7f1648a7f57ada3
parenta41e9682eb595c90bf063330b474e9c06c950a26 (diff)
downloadrust-avif-serialize-accepted/tizen_rust.tar.gz
rust-avif-serialize-accepted/tizen_rust.tar.bz2
rust-avif-serialize-accepted/tizen_rust.zip
[ 50s] + ./avif_serialize [ 50s] [ 50s] running 5 tests [ 50s] test premultiplied_flag ... ok [ 50s] test test_roundtrip_parse_avif_colr ... ok [ 50s] test test_roundtrip_parse_avif ... ok [ 50s] test test_roundtrip_parse_mp4 ... ok [ 50s] test test_roundtrip_parse_mp4_alpha ... ok [ 50s] [ 50s] test result: ok. 5 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.03s
-rw-r--r--packaging/rust-avif-serialize.spec18
1 files changed, 17 insertions, 1 deletions
diff --git a/packaging/rust-avif-serialize.spec b/packaging/rust-avif-serialize.spec
index 7603d89..42ebc25 100644
--- a/packaging/rust-avif-serialize.spec
+++ b/packaging/rust-avif-serialize.spec
@@ -28,7 +28,10 @@ Requires: rust-arrayvec
# ==========================================================
# dev-dependencies
# ==========================================================
-# BuildRequires: rust-avif-parse
+%if 0%{?run_tests}
+BuildRequires: rust-avif-parse
+BuildRequires: rust-mp4parse
+%endif
%description
@@ -56,6 +59,19 @@ 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}
+%{rustc_std_build} --test --crate-type=dylib \
+ --crate-name=%{real_crate_name} \
+ %{?rustc_edition:--edition=%{rustc_edition}} \
+ %rust_dylib_extern arrayvec \
+ %rust_dylib_extern avif_parse \
+ %rust_dylib_extern mp4parse \
+ ./src/lib.rs
+
+./%{real_crate_name}
+%endif
+
%clean
%post -p /sbin/ldconfig