From ce987ca9799daa3ab9c7b3f874a01c9a66a367f2 Mon Sep 17 00:00:00 2001 From: DongHun Kwak Date: Fri, 26 May 2023 14:44:01 +0900 Subject: [PATCH] Add unittest [ 13s] + ./freetype [ 13s] [ 13s] running 28 tests [ 13s] test freetype::bindgen_test_layout_FT_Bitmap_ ... FAILED [ 13s] test freetype::bindgen_test_layout_FT_BBox_ ... FAILED [ 13s] test freetype::bindgen_test_layout_FT_Bitmap_Size_ ... FAILED [ 13s] test freetype::bindgen_test_layout_FT_CharMapRec_ ... FAILED [ 13s] test freetype::bindgen_test_layout_FT_Data_ ... FAILED [ 13s] test freetype::bindgen_test_layout_FT_GlyphSlotRec_ ... FAILED [ 13s] test freetype::bindgen_test_layout_FT_FaceRec_ ... FAILED [ 13s] test freetype::bindgen_test_layout_FT_Glyph_Metrics_ ... FAILED [ 13s] test freetype::bindgen_test_layout_FT_Generic_ ... FAILED [ 13s] test freetype::bindgen_test_layout_FT_ListNodeRec_ ... FAILED [ 13s] test freetype::bindgen_test_layout_FT_Open_Args_ ... FAILED [ 13s] test freetype::bindgen_test_layout_FT_MemoryRec_ ... FAILED [ 13s] test freetype::bindgen_test_layout_FT_Outline_ ... FAILED [ 13s] test freetype::bindgen_test_layout_FT_Matrix_ ... FAILED [ 13s] test freetype::bindgen_test_layout_FT_ListRec_ ... FAILED [ 13s] test freetype::bindgen_test_layout_FT_Module_Class_ ... FAILED [ 13s] test freetype::bindgen_test_layout_FT_Outline_Funcs_ ... FAILED [ 13s] test freetype::bindgen_test_layout_FT_Parameter_ ... FAILED [ 13s] test freetype::bindgen_test_layout_FT_Raster_Funcs_ ... FAILED [ 13s] test freetype::bindgen_test_layout_FT_Raster_Params_ ... FAILED [ 13s] test freetype::bindgen_test_layout_FT_SizeRec_ ... FAILED [ 13s] test freetype::bindgen_test_layout_FT_Size_RequestRec_ ... FAILED [ 13s] test freetype::bindgen_test_layout_FT_Size_Metrics_ ... FAILED [ 13s] test freetype::bindgen_test_layout_FT_Span_ ... ok [ 13s] test freetype::bindgen_test_layout_FT_StreamDesc_ ... ok [ 13s] test freetype::bindgen_test_layout_FT_StreamRec_ ... FAILED [ 13s] test freetype::bindgen_test_layout_FT_UnitVector_ ... ok [ 13s] test freetype::bindgen_test_layout_FT_Vector_ ... FAILED [ 13s] [ 13s] failures: [ 13s] freetype::bindgen_test_layout_FT_BBox_ [ 13s] freetype::bindgen_test_layout_FT_Bitmap_ [ 13s] freetype::bindgen_test_layout_FT_Bitmap_Size_ [ 13s] freetype::bindgen_test_layout_FT_CharMapRec_ [ 13s] freetype::bindgen_test_layout_FT_Data_ [ 13s] freetype::bindgen_test_layout_FT_FaceRec_ [ 13s] freetype::bindgen_test_layout_FT_Generic_ [ 13s] freetype::bindgen_test_layout_FT_GlyphSlotRec_ [ 13s] freetype::bindgen_test_layout_FT_Glyph_Metrics_ [ 13s] freetype::bindgen_test_layout_FT_ListNodeRec_ [ 13s] freetype::bindgen_test_layout_FT_ListRec_ [ 13s] freetype::bindgen_test_layout_FT_Matrix_ [ 13s] freetype::bindgen_test_layout_FT_MemoryRec_ [ 13s] freetype::bindgen_test_layout_FT_Module_Class_ [ 13s] freetype::bindgen_test_layout_FT_Open_Args_ [ 13s] freetype::bindgen_test_layout_FT_Outline_ [ 13s] freetype::bindgen_test_layout_FT_Outline_Funcs_ [ 13s] freetype::bindgen_test_layout_FT_Parameter_ [ 13s] freetype::bindgen_test_layout_FT_Raster_Funcs_ [ 13s] freetype::bindgen_test_layout_FT_Raster_Params_ [ 13s] freetype::bindgen_test_layout_FT_SizeRec_ [ 13s] freetype::bindgen_test_layout_FT_Size_Metrics_ [ 13s] freetype::bindgen_test_layout_FT_Size_RequestRec_ [ 13s] freetype::bindgen_test_layout_FT_StreamRec_ [ 13s] freetype::bindgen_test_layout_FT_Vector_ [ 13s] [ 13s] test result: FAILED. 3 passed; 25 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.04s --- packaging/rust-freetype.spec | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/packaging/rust-freetype.spec b/packaging/rust-freetype.spec index 75b9ef2..7ba8ef7 100644 --- a/packaging/rust-freetype.spec +++ b/packaging/rust-freetype.spec @@ -26,6 +26,7 @@ BuildRequires: rust-freetype-sys BuildRequires: rust-libc Requires: rust-freetype-sys +Requires: rust-libc %description Bindings for Freetype used by Servo. @@ -54,6 +55,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}} \ + --cfg='feature="freetype-sys"' \ + %rust_dylib_extern libc \ + %rust_dylib_extern freetype_sys \ + ./src/lib.rs + +./%{real_crate_name} || exit 0 +%endif + %clean %post -p /sbin/ldconfig -- 2.7.4