summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWoohyun Jung <wh0705.jung@samsung.com>2023-05-12 09:26:26 +0900
committerWoohyun Jung <wh0705.jung@samsung.com>2023-05-12 09:26:26 +0900
commit042a4b3b39e7d103d863e8894d2dad1d07fe10bd (patch)
treeb9fa221bed1c079be82e5be2e7c240db77c3221c
parentbfbd07f11bda4a17cca4ccc1d53484739e4a3018 (diff)
downloadrust-rustc_version-tizen.tar.gz
rust-rustc_version-tizen.tar.bz2
rust-rustc_version-tizen.zip
[ 16s] + ./rustc_version [ 16s] [ 16s] running 28 tests [ 16s] test parse_1_0_0 ... ok [ 16s] test parse_1_16_0_nightly ... ok [ 16s] test parse_1_47_0_stable ... ok [ 16s] test parse_debian_buster ... ok [ 16s] test parse_llvm_micro ... ok [ 16s] test parse_llvm_version_11 ... ok [ 16s] test parse_llvm_version_11_0 ... ok [ 16s] test parse_llvm_version_3 ... ok [ 16s] test parse_llvm_version_3_0 ... ok [ 16s] test parse_llvm_version_3_9 ... ok [ 16s] test parse_llvm_version_4_0 ... ok [ 16s] test parse_llvm_version_4_components ... ok [ 16s] test parse_llvm_version_5 ... ok [ 16s] test parse_llvm_version_5_0 ... ok [ 16s] test parse_llvm_version_component_sign_minus ... ok [ 16s] test parse_llvm_version_component_sign_plus ... ok [ 16s] test parse_llvm_version_empty ... ok [ 16s] test parse_llvm_version_invalid_char ... ok [ 16s] test parse_llvm_version_leading_zero_on_nonzero ... ok [ 16s] test parse_llvm_version_leading_zero_on_zero ... ok [ 16s] test parse_llvm_version_overflow ... ok [ 16s] test parse_nightly ... ok [ 16s] test parse_termux ... ok [ 16s] test parse_stable ... ok [ 16s] test parse_unknown ... ok [ 16s] test test_llvm_version_comparison ... ok [ 16s] test rustc_error ... ok [ 17s] test smoketest ... ok [ 17s] [ 17s] test result: ok. 28 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.39s
-rw-r--r--packaging/rust-rustc_version.spec21
1 files changed, 21 insertions, 0 deletions
diff --git a/packaging/rust-rustc_version.spec b/packaging/rust-rustc_version.spec
index 464c180..ddfe03e 100644
--- a/packaging/rust-rustc_version.spec
+++ b/packaging/rust-rustc_version.spec
@@ -25,6 +25,15 @@ Source2: extern.patch
BuildRequires: rust
BuildRequires: rust-semver
+
+# ==========================================================
+# dev-dependencies
+# ==========================================================
+%if 0%{?run_tests}
+BuildRequires: rust-doc-comment
+BuildRequires: rust-rustc_version
+%endif
+
%description
Library for querying the version of a installed rustc compiler.
@@ -44,6 +53,18 @@ cp %{SOURCE1} .
-lsemver \
./src/lib.rs
+%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 doc_comment \
+ %rust_dylib_extern rustc_version \
+ -lsemver \
+ ./tests/all.rs
+
+./%{real_crate_name}
+%endif
# ==========================================================
# install section
# ==========================================================