From 6e779bdcdc1b25fe6ac0d72985762bcd40b30818 Mon Sep 17 00:00:00 2001 From: Jesus Checa Hidalgo Date: Fri, 14 Jun 2024 11:48:24 +0200 Subject: [PATCH] Remove outdated cargo-test test --- cargo-test/runtest.sh | 34 ---------------------------------- 1 file changed, 34 deletions(-) delete mode 100755 cargo-test/runtest.sh diff --git a/cargo-test/runtest.sh b/cargo-test/runtest.sh deleted file mode 100755 index 49c0726..0000000 --- a/cargo-test/runtest.sh +++ /dev/null @@ -1,34 +0,0 @@ -#!/bin/bash -euf - -dnf -y --best install \ - /usr/bin/xargs \ - rust-packaging \ - "$pkg+default-devel" - -provides=$(rpm -qP "$pkg-devel") - -while read -r prv; do - if [[ "$prv" =~ ^crate\(([^/]+)\)\ \=\ ([0-9]+\.[0-9]+\.[0-9]+) ]]; then - crate="${BASH_REMATCH[1]}" - version="${BASH_REMATCH[2]}" - fi -done <<< "$provides" - -echo "$crate ($version)" - -cargo_registry=$(rpm --eval "%{cargo_registry}") -crate_dir="$cargo_registry/$crate-$version" -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 -r 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" | \ - sed -r -e "s/%if (.+)/if [ \1 ]; then/;s/%endif/fi/" -e "s/<< EOF/<< 'EOF'/" > prep.sh -# XXX: We can't run eval directly, so source it -source prep.sh - -exec $(rpm --eval "%cargo_test") --manifest-path "$crate_toml" "$@"