From 02ae3e10a57bb5006127b3ae781ee11bbf411039 Mon Sep 17 00:00:00 2001 From: Igor Gnatenko Date: Fri, 20 Dec 2019 08:30:51 +0100 Subject: [PATCH] Add tests Signed-off-by: Igor Gnatenko --- rust-findshlibs.spec | 10 +++------- tests/.fmf/version | 1 + tests/provision.fmf | 5 +++++ tests/tests.yml | 13 +++++++++++++ 4 files changed, 22 insertions(+), 7 deletions(-) create mode 100644 tests/.fmf/version create mode 100644 tests/provision.fmf create mode 100644 tests/tests.yml diff --git a/rust-findshlibs.spec b/rust-findshlibs.spec index a989dee..34bb8df 100644 --- a/rust-findshlibs.spec +++ b/rust-findshlibs.spec @@ -1,4 +1,4 @@ -# Generated by rust2rpm 10 +# Generated by rust2rpm 12 %bcond_without check %global debug_package %{nil} @@ -42,7 +42,7 @@ which use "%{crate}" crate. %files devel %license LICENSE-APACHE LICENSE-MIT %doc ./README.md -%{cargo_registry}/%{crate}-%{version}/ +%{cargo_registry}/%{crate}-%{version_no_tilde}/ %package -n %{name}+default-devel Summary: %{summary} @@ -54,7 +54,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 %package -n %{name}+nightly-devel Summary: %{summary} @@ -72,10 +72,6 @@ which use "nightly" feature of "%{crate}" crate. %autosetup -n %{crate}-%{version_no_tilde} -p1 %cargo_prep -# Sometimes Rust sources start with #![...] attributes, and "smart" editors think -# it's a shebang and make them executable. Then brp-mangle-shebangs gets upset... -find -name '*.rs' -type f -perm /111 -exec chmod -v -x '{}' '+' - %generate_buildrequires %cargo_generate_buildrequires 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..f6e8ecc --- /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-findshlibs