cargo-test: do not run dnf install if no dev deps

Signed-off-by: Igor Gnatenko <ignatenkobrain@fedoraproject.org>
This commit is contained in:
ignatenkobrain 2018-07-21 01:02:26 +02:00
commit e22db71d55
No known key found for this signature in database
GPG key ID: 695714BD1BBC5F4C

View file

@ -21,7 +21,7 @@ crate_toml="$crate_dir/Cargo.toml"
# XXX: ideally we should just install -tests subpackage
# which would require all necessary deps
$(rpm --eval "%{__cargo_inspector}") --test-requires "$crate_toml" | \
sed -r -e "s/(.*)/'\1'/" | xargs sudo dnf -y install
sed -r -e "s/(.*)/'\1'/" | xargs -r sudo dnf -y install
# XXX: sed is needed due to https://github.com/rpm-software-management/rpm/issues/472
rpm -D "_with_check 1" --eval "%cargo_prep" | \