From e7a375e685231d1e38aeecdbeb3ae805104fa0d2 Mon Sep 17 00:00:00 2001 From: Igor Gnatenko Date: Sat, 21 Dec 2019 08:32:44 +0100 Subject: [PATCH] Add tests Signed-off-by: Igor Gnatenko --- rust-arbitrary.spec | 14 ++++++++------ tests/.fmf/version | 1 + tests/provision.fmf | 5 +++++ tests/tests.yml | 13 +++++++++++++ 4 files changed, 27 insertions(+), 6 deletions(-) create mode 100644 tests/.fmf/version create mode 100644 tests/provision.fmf create mode 100644 tests/tests.yml diff --git a/rust-arbitrary.spec b/rust-arbitrary.spec index 28a13ed..3bae741 100644 --- a/rust-arbitrary.spec +++ b/rust-arbitrary.spec @@ -1,6 +1,8 @@ -# Generated by rust2rpm 10 -# https://github.com/rust-fuzz/rust_arbitrary/issues/10 -%if 0%{?__isa_bits} != 32 +# Generated by rust2rpm 13 +# * https://github.com/rust-fuzz/rust_arbitrary/issues/10 +%if 0%{?__isa_bits} == 32 +%bcond_with check +%else %bcond_without check %endif %global debug_package %{nil} @@ -13,7 +15,7 @@ Release: 1%{?dist} Summary: Arbitrary trait for generating structured data from unstructured data # Upstream license specification: MIT/Apache-2.0 -# https://github.com/rust-fuzz/rust_arbitrary/issues/9 +# * https://github.com/rust-fuzz/rust_arbitrary/issues/9 License: MIT or ASL 2.0 URL: https://crates.io/crates/arbitrary Source: %{crates_source} @@ -41,7 +43,7 @@ which use "%{crate}" crate. %files devel %doc README.md -%{cargo_registry}/%{crate}-%{version}/ +%{cargo_registry}/%{crate}-%{version_no_tilde}/ %package -n %{name}+default-devel Summary: %{summary} @@ -53,7 +55,7 @@ This package contains library source intended for building other packages which use "default" feature of "%{crate}" crate. %files -n %{name}+default-devel -%ghost %{cargo_registry}/%{crate}-%{version}/Cargo.toml +%ghost %{cargo_registry}/%{crate}-%{version_no_tilde}/Cargo.toml %prep %autosetup -n %{crate}-%{version_no_tilde} -p1 diff --git a/tests/.fmf/version b/tests/.fmf/version new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/tests/.fmf/version @@ -0,0 +1 @@ +1 diff --git a/tests/provision.fmf b/tests/provision.fmf new file mode 100644 index 0000000..503a97c --- /dev/null +++ b/tests/provision.fmf @@ -0,0 +1,5 @@ +--- +standard-inventory-qcow2: + qemu: + # `cargo test` usually eats more than 1G. + m: 4G diff --git a/tests/tests.yml b/tests/tests.yml new file mode 100644 index 0000000..984320d --- /dev/null +++ b/tests/tests.yml @@ -0,0 +1,13 @@ +--- +- hosts: localhost + roles: + - role: standard-test-basic + tags: + - classic + repositories: + - repo: "https://src.fedoraproject.org/tests/rust.git" + dest: rust + tests: + - rust/cargo-test + environment: + pkg: rust-arbitrary