Gentoo Archives: gentoo-portage-dev

From: Christopher Chan <cchan@×××××××××××.com>
To: gentoo-portage-dev@l.g.o
Subject: [gentoo-portage-dev] package.test
Date: Fri, 01 Sep 2006 00:07:05
Message-Id: 44F7796B.4040709@spikesource.com
1 Hi all,
2
3 I have a need to selectively run src_test() for some packages, but do
4 not want to run it for all like FEATURES=test. Has anyone discussed or
5 thought about this?
6
7 If not, here is my proposal. Have a /etc/portage/package.test file that
8 contains packages that will run src_test().
9
10 Example for packages.test
11 dev-java/hibernate
12
13 It should support the norm >=dev-java/hibernate-3.0 etc.. type notation.
14
15 Here's my simple attempt at this by modifying ebuild.sh (note, I
16 currently do not take care of ranges and versions, just the package
17 name). I welcome anyone's thoughts, feedback, and other ideas. Thanks.
18
19 Index: ebuild.sh
20 ===================================================================
21 --- ebuild.sh (revision 59367)
22 +++ ebuild.sh (working copy)
23 @@ -1143,7 +1143,15 @@
24 ewarn "Skipping make test/check due to ebuild restriction."
25 echo ">>> Test phase [explicitly disabled]:
26 ${CATEGORY}/${PF}"
27 elif ! hasq test $FEATURES; then
28 - echo ">>> Test phase [not enabled]: ${CATEGORY}/${PF}"
29 + ## check package.test
30 + if [ -f ${EPREFIX}/etc/portage/package.test ]; then
31 + if [ -n "$(grep ${CATEGORY}/${PN}
32 /etc/portage/package.test)" ]; then
33 + echo "Running test for ${CATEGORY}/${PF}"
34 + src_test
35 + fi
36 + else
37 + echo ">>> Test phase [not enabled]:
38 ${CATEGORY}/${PF}"
39 + fi
40 else
41
42 --
43 gentoo-portage-dev@g.o mailing list

Replies

Subject Author
Re: [gentoo-portage-dev] package.test Mike Frysinger <vapier@g.o>