From 065aaa468edb086e50420b72c50b4dca6ec94261 Mon Sep 17 00:00:00 2001 From: yezengruan Date: Tue, 20 Sep 2022 15:07:26 +0800 Subject: [PATCH] add cargo test and Requires edk2 --- stratovirt.spec | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/stratovirt.spec b/stratovirt.spec index 724f219..98f7313 100644 --- a/stratovirt.spec +++ b/stratovirt.spec @@ -6,7 +6,7 @@ Name: stratovirt Version: 2.2.0 -Release: 7 +Release: 8 Summary: StratoVirt is an opensource VMM(Virtual Machine Manager) which aims to perform next generation virtualization. License: Mulan PSL v2 @@ -19,8 +19,13 @@ ExclusiveArch: x86_64 aarch64 Requires: pixman Requires: pixman-devel +%ifarch x86_64 +Requires: edk2-ovmf +%endif + %ifarch aarch64 Requires: dtc +Requires: edk2-aarch64 BuildRequires: dtc-devel %endif @@ -70,8 +75,10 @@ sed -i 's/rustflags = \[/&"-Clink-arg=-lgcc", /' ./.cargo/config cargo build --release --target=%{rust_musl_target} --all-features sed -i 's/rustflags = \[/&"-Clink-arg=-lpixman-1", /' ./.cargo/config -cargo build --release --target=%{rust_gnu_target} --all-features --bin stratovirt +cargo build --release --target=%{rust_gnu_target} --all-features +%check +RUST_BACKTRACE=1 cargo test --all -- --nocapture --test-threads=1 %install rm -rf %{buildroot} @@ -83,6 +90,9 @@ install -d %{buildroot}%{_libdir}/stratovirt/static install -D -m555 ./target/%{rust_musl_target}/release/stratovirt %{buildroot}%{_libdir}/stratovirt/static %changelog +* Tue Sep 20 2022 yezengruan - 2.2.0-8 +- add cargo test and Requires edk2 + * Fri Sep 16 2022 yezengruan - 2.2.0-7 - Update to StratoVirt 2.2.0-rc5 -- Gitee