commit: 87d093398b37fadad0b3c2c5b62c8a7a7a0033cb
Author: Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
AuthorDate: Tue Dec 11 13:44:24 2018 +0000
Commit: Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
CommitDate: Tue Dec 11 13:44:40 2018 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=87d09339
media-gfx/imagemagick: check version in test phase
Package-Manager: Portage-2.3.52, Repoman-2.3.12
Signed-off-by: Thomas Deutschmann <whissi <AT> gentoo.org>
media-gfx/imagemagick/imagemagick-7.0.8.16.ebuild | 14 ++++++++++----
media-gfx/imagemagick/imagemagick-9999.ebuild | 14 ++++++++++----
2 files changed, 20 insertions(+), 8 deletions(-)
diff --git a/media-gfx/imagemagick/imagemagick-7.0.8.16.ebuild
b/media-gfx/imagemagick/imagemagick-7.0.8.16.ebuild
index adf47c49a56..91e101eeefc 100644
--- a/media-gfx/imagemagick/imagemagick-7.0.8.16.ebuild
+++ b/media-gfx/imagemagick/imagemagick-7.0.8.16.ebuild
@@ -10,7 +10,8 @@ if [[ ${PV} == "9999" ]] ; then
inherit git-r3
MY_P="imagemagick-9999"
else
- MY_P=ImageMagick-$(ver_rs 3 '-')
+ MY_PV="$(ver_rs 3 '-')"
+ MY_P="ImageMagick-${MY_PV}"
SRC_URI="mirror://${PN}/${MY_P}.tar.xz"
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390
~sh ~sparc ~x86 ~ppc-aix ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux
~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~x64-solaris ~x86-solaris"
fi
@@ -177,13 +178,18 @@ src_test() {
die "Failed to install default blank policy.xml in
'${_im_local_config_home}'"
local im_command= IM_COMMANDS=()
- IM_COMMANDS+=( "magick -version" ) # Verify that we are using version
we just built
+ if [[ ${PV} == "9999" ]] ; then
+ IM_COMMANDS+=( "magick -version" ) # Show version we are using
-- cannot verify because of live ebuild
+ else
+ IM_COMMANDS+=( "magick -version | grep -q -- \"${MY_PV}\"" ) #
Verify that we are using version we just built
+ fi
IM_COMMANDS+=( "magick -list policy" ) # Verify that policy.xml is used
IM_COMMANDS+=( "emake check" ) # Run tests
for im_command in "${IM_COMMANDS[@]}"; do
- "${S}"/magick.sh \
- ${im_command} || die
+ eval "${S}"/magick.sh \
+ ${im_command} || \
+ die "Failed to run \"${im_command}\""
done
}
diff --git a/media-gfx/imagemagick/imagemagick-9999.ebuild
b/media-gfx/imagemagick/imagemagick-9999.ebuild
index adf47c49a56..91e101eeefc 100644
--- a/media-gfx/imagemagick/imagemagick-9999.ebuild
+++ b/media-gfx/imagemagick/imagemagick-9999.ebuild
@@ -10,7 +10,8 @@ if [[ ${PV} == "9999" ]] ; then
inherit git-r3
MY_P="imagemagick-9999"
else
- MY_P=ImageMagick-$(ver_rs 3 '-')
+ MY_PV="$(ver_rs 3 '-')"
+ MY_P="ImageMagick-${MY_PV}"
SRC_URI="mirror://${PN}/${MY_P}.tar.xz"
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390
~sh ~sparc ~x86 ~ppc-aix ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux
~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~x64-solaris ~x86-solaris"
fi
@@ -177,13 +178,18 @@ src_test() {
die "Failed to install default blank policy.xml in
'${_im_local_config_home}'"
local im_command= IM_COMMANDS=()
- IM_COMMANDS+=( "magick -version" ) # Verify that we are using version
we just built
+ if [[ ${PV} == "9999" ]] ; then
+ IM_COMMANDS+=( "magick -version" ) # Show version we are using
-- cannot verify because of live ebuild
+ else
+ IM_COMMANDS+=( "magick -version | grep -q -- \"${MY_PV}\"" ) #
Verify that we are using version we just built
+ fi
IM_COMMANDS+=( "magick -list policy" ) # Verify that policy.xml is used
IM_COMMANDS+=( "emake check" ) # Run tests
for im_command in "${IM_COMMANDS[@]}"; do
- "${S}"/magick.sh \
- ${im_command} || die
+ eval "${S}"/magick.sh \
+ ${im_command} || \
+ die "Failed to run \"${im_command}\""
done
}