diff options
author | DongHun Kwak <dh0128.kwak@samsung.com> | 2023-05-19 13:45:55 +0900 |
---|---|---|
committer | DongHun Kwak <dh0128.kwak@samsung.com> | 2023-05-19 13:45:55 +0900 |
commit | 9ac2b5590891ca363ea903413dc649d50ca48541 (patch) | |
tree | dc93d83f8c771f6af15f70cd1b61dde38d3496e4 | |
parent | bfef8951f2a73850804890601e5ff8144ee83ce9 (diff) | |
download | rust-assert_matches-accepted/tizen_rust.tar.gz rust-assert_matches-accepted/tizen_rust.tar.bz2 rust-assert_matches-accepted/tizen_rust.zip |
[ 6s] + ./selective_import1
[ 6s]
[ 6s] running 1 test
[ 6s] test test_assert_succeed ... ok
[ 6s]
[ 6s] test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.01s
[ 6s]
[ 6s] + for unit_test in '${unit_test_list}'
[ 6s] + ./selective_import2
[ 6s]
[ 6s] running 1 test
[ 6s] test test_assert_succeed ... ok
[ 6s]
[ 6s] test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.01s
-rw-r--r-- | packaging/rust-assert_matches.spec | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/packaging/rust-assert_matches.spec b/packaging/rust-assert_matches.spec index 3427430..219a024 100644 --- a/packaging/rust-assert_matches.spec +++ b/packaging/rust-assert_matches.spec @@ -51,6 +51,25 @@ 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 unit_test_list="selective_import1 selective_import2" +for unit_test in ${unit_test_list} +do +%{rustc_std_build} --test --crate-type=dylib \ + --crate-name=${unit_test} \ + %{?rustc_edition:--edition=%{rustc_edition}} \ + --extern %{real_crate_name}=./lib%{real_crate_name}.so \ + ./tests/${unit_test}.rs +done + +for unit_test in ${unit_test_list} +do +./${unit_test} +done + +%endif + %clean %post -p /sbin/ldconfig |