1 |
On Tuesday 25 September 2007 12:47:35 Marijn Schouten (hkBst) wrote: |
2 |
> > > # "make test" does something weird so default src_test() in /usr/lib/portage/bin/ebuild.sh fails the following test |
3 |
> > > # elif emake -j1 test -n &> /dev/null; then |
4 |
> > > # so copy straight from default src_test() all the stuff which depends on that test passing |
5 |
> > > src_test() { |
6 |
> > > vecho ">>> Test phase [test]: ${CATEGORY}/${PF}" |
7 |
> > > if ! emake -j1 test; then |
8 |
> > > hasq test $FEATURES && die "Make test failed. See above for details." |
9 |
> > > hasq test $FEATURES || eerror "Make test failed. See above for details." |
10 |
> > > fi |
11 |
> > > } |
12 |
> > |
13 |
> > I'm a bit confused about what's going on here. Isn't src_test() only |
14 |
> > supposed to run when 'test' is in FEATURES? |
15 |
> |
16 |
> I'm not sure, but as the comment says, I copied this straight from |
17 |
> /usr/lib/portage/bin/ebuild.sh and it goes: |
18 |
[SNIP] |
19 |
|
20 |
Some of that code is unreachable since src_test is never called when test is |
21 |
not in FEATURES. Also there is some dispute as to whether testing the FEATURES |
22 |
variable at all is permitted in ebuilds (bug #174335). In either case it's not |
23 |
needed here. if `emake -j1 test -n` really fails for some reason even though |
24 |
`emake -j1 test` generally works your src_test should just be: |
25 |
|
26 |
src_test() { |
27 |
emake -j1 test || die "Make test failed" |
28 |
} |
29 |
|
30 |
-- |
31 |
Bo Andresen |