Hi all,

I have a need to selectively run src_test() for some packages, but do not want to run it for all like FEATURES=test. Has anyone discussed or thought about this?

If not, here is my proposal. Have a /etc/portage/package.test file that contains packages that will run src_test().

Example for packages.test
dev-java/hibernate

It should support the norm >=dev-java/hibernate-3.0 etc.. type notation.

Here's my simple attempt at this by modifying ebuild.sh (note, I currently do not take care of ranges and versions, just the package name). I welcome anyone's thoughts, feedback, and other ideas. Thanks.

Index: ebuild.sh
===================================================================
--- ebuild.sh   (revision 59367)
+++ ebuild.sh   (working copy)
@@ -1143,7 +1143,15 @@
               ewarn "Skipping make test/check due to ebuild restriction."
echo ">>> Test phase [explicitly disabled]: ${CATEGORY}/${PF}"
       elif ! hasq test $FEATURES; then
-               echo ">>> Test phase [not enabled]: ${CATEGORY}/${PF}"
+               ## check package.test
+               if [ -f ${EPREFIX}/etc/portage/package.test ]; then
+ if [ -n "$(grep ${CATEGORY}/${PN} /etc/portage/package.test)" ]; then
+                               echo "Running test for ${CATEGORY}/${PF}"
+                               src_test
+                       fi
+               else
+ echo ">>> Test phase [not enabled]: ${CATEGORY}/${PF}"
+               fi
       else

--
gentoo-portage-dev@gentoo.org mailing list

Reply via email to