media-gfx/imagemagick: use magick.sh wrapper in src_test
authorThomas Deutschmann <whissi@gentoo.org>
Wed, 31 Oct 2018 13:40:07 +0000 (14:40 +0100)
committerThomas Deutschmann <whissi@gentoo.org>
Wed, 31 Oct 2018 13:45:00 +0000 (14:45 +0100)
Package-Manager: Portage-2.3.51, Repoman-2.3.11
Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
media-gfx/imagemagick/imagemagick-6.9.10.14.ebuild
media-gfx/imagemagick/imagemagick-7.0.8.14.ebuild
media-gfx/imagemagick/imagemagick-9999.ebuild

index e20331f737f59d7978005ce29b1ecf39db22821a..59b9a3439321171e1dfb9b4308f5b52d27aa57f7 100644 (file)
@@ -172,12 +172,15 @@ src_test() {
        cp "${FILESDIR}"/policy.test.xml "${_im_local_config_home}/policy.xml" || \
                die "Failed to install default blank policy.xml in '${_im_local_config_home}'"
 
-       # Check that your policy.xml file is taken into account
-       LD_LIBRARY_PATH="${S}/coders/.libs:${S}/filters/.libs:${S}/Magick++/lib/.libs:${S}/magick/.libs:${S}/wand/.libs" \
-       "${S}"/utilities/.libs/identify -list policy || die
-
-       LD_LIBRARY_PATH="${S}/coders/.libs:${S}/filters/.libs:${S}/Magick++/lib/.libs:${S}/magick/.libs:${S}/wand/.libs" \
-       emake check
+       local im_command= IM_COMMANDS=()
+       IM_COMMANDS+=( "magick -version" ) # Verify that we are using version we just built
+       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
+       done
 }
 
 src_install() {
index 73a88b3b9d7b87c5b670ee66b4a2bdd1015da15d..adf47c49a56243afb5234396d4ec3d0e04c5fcdc 100644 (file)
@@ -176,12 +176,15 @@ src_test() {
        cp "${FILESDIR}"/policy.test.xml "${_im_local_config_home}/policy.xml" || \
                die "Failed to install default blank policy.xml in '${_im_local_config_home}'"
 
-       # Check that your policy.xml file is taken into account
-       LD_LIBRARY_PATH="${S}/coders/.libs:${S}/filters/.libs:${S}/Magick++/lib/.libs:${S}/magick/.libs:${S}/wand/.libs" \
-       "${S}"/utilities/.libs/magick -list policy || die
-
-       LD_LIBRARY_PATH="${S}/coders/.libs:${S}/filters/.libs:${S}/Magick++/lib/.libs:${S}/magick/.libs:${S}/wand/.libs" \
-       emake check
+       local im_command= IM_COMMANDS=()
+       IM_COMMANDS+=( "magick -version" ) # Verify that we are using version we just built
+       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
+       done
 }
 
 src_install() {
index 73a88b3b9d7b87c5b670ee66b4a2bdd1015da15d..adf47c49a56243afb5234396d4ec3d0e04c5fcdc 100644 (file)
@@ -176,12 +176,15 @@ src_test() {
        cp "${FILESDIR}"/policy.test.xml "${_im_local_config_home}/policy.xml" || \
                die "Failed to install default blank policy.xml in '${_im_local_config_home}'"
 
-       # Check that your policy.xml file is taken into account
-       LD_LIBRARY_PATH="${S}/coders/.libs:${S}/filters/.libs:${S}/Magick++/lib/.libs:${S}/magick/.libs:${S}/wand/.libs" \
-       "${S}"/utilities/.libs/magick -list policy || die
-
-       LD_LIBRARY_PATH="${S}/coders/.libs:${S}/filters/.libs:${S}/Magick++/lib/.libs:${S}/magick/.libs:${S}/wand/.libs" \
-       emake check
+       local im_command= IM_COMMANDS=()
+       IM_COMMANDS+=( "magick -version" ) # Verify that we are using version we just built
+       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
+       done
 }
 
 src_install() {