Gentoo Archives: gentoo-dev

From: Alexis Ballier <aballier@g.o>
To: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] FEATURES=-userpriv and testcases that fail as root or a user
Date: Thu, 07 Aug 2008 19:17:06
Message-Id: 20080807211701.7fc84d36@gentoo.org
In Reply to: [gentoo-dev] FEATURES=-userpriv and testcases that fail as root or a user by "Robin H. Johnson"
1 On Thu, 7 Aug 2008 12:00:23 -0700
2 "Robin H. Johnson" <robbat2@g.o> wrote:
3
4 > More than a year ago, I had my first occurrence of a package that
5 > refused to work when run as root: dev-db/mysql. This lead to the
6 > following block of code in the src_test block:
7 >
8 > if [[ $UID -eq 0 ]]; then
9 > die "Testing with FEATURES=-userpriv is no longer supported
10 > by upstream. Tests MUST be run as non-root." fi
11
12 I've used that for flac:
13 if [ $UID != 0 ] ; then
14 emake check || die "tests failed"
15 else
16 ewarn "Tests will fail if ran as root, skipping."
17 fi
18
19
20 ie, don't die and continue. If someone is interested in the tests
21 they can read the ewarn.
22
23
24 Alexis.

Attachments

File name MIME type
signature.asc application/pgp-signature