public inbox for gentoo-dev@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-dev] QA obscurity: "hasq test $FEATURES" != "use test"
@ 2009-07-22 20:45 Robin H. Johnson
  2009-07-22 20:50 ` Ciaran McCreesh
  2009-07-22 21:38 ` Zac Medico
  0 siblings, 2 replies; 3+ messages in thread
From: Robin H. Johnson @ 2009-07-22 20:45 UTC (permalink / raw
  To: gentoo-dev

[-- Attachment #1: Type: text/plain, Size: 1061 bytes --]

So I saw the recent set of bugs filed for QA, complaining about misuse
of FEATURES, specifically that we should not be using the FEATURES
variable, and instead should be using "use test" to check for tests
being enabled.

USE=test means: "build with support for tests"
FEATURES=test means: "actually run the tests"

So consider:
FEATURES=-test USE=test emerge ...
This would build the testsuite, and depending on the package, install
the tests the system, but NOT run them in src_test.

In the packages, I'd like to know:
1. From any phase, is src_test scheduled to be run? (FEATURES=test).
2. Has src_test run yet?

For iasl, upstream requests that if the tests are run at build time,
that they are installed to the system, which is what we do. If
FEATURES=-test USE=test is used however, using 'use test' is bogus,
because I cannot detect that the tests are going to/have run.

-- 
Robin Hugh Johnson
Gentoo Linux Developer & Infra Guy
E-Mail     : robbat2@gentoo.org
GnuPG FP   : 11AC BA4F 4778 E3F6 E4ED  F38E B27B 944E 3488 4E85

[-- Attachment #2: Type: application/pgp-signature, Size: 330 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [gentoo-dev] QA obscurity: "hasq test $FEATURES" != "use test"
  2009-07-22 20:45 [gentoo-dev] QA obscurity: "hasq test $FEATURES" != "use test" Robin H. Johnson
@ 2009-07-22 20:50 ` Ciaran McCreesh
  2009-07-22 21:38 ` Zac Medico
  1 sibling, 0 replies; 3+ messages in thread
From: Ciaran McCreesh @ 2009-07-22 20:50 UTC (permalink / raw
  To: gentoo-dev

[-- Attachment #1: Type: text/plain, Size: 534 bytes --]

On Wed, 22 Jul 2009 13:45:38 -0700
"Robin H. Johnson" <robbat2@gentoo.org> wrote:
> USE=test means: "build with support for tests"

USE=test is a special USE flag set by Portage if FEATURES=test, and the
two are supposed to be equivalent (the USE flag existing because
FEATURES isn't suitable for anything that's metadata invariant).

Unfortunately, Portage doesn't magically treat the flag as forced /
masked, so it's possible for users who ignore the use description to
set one without the other.

-- 
Ciaran McCreesh

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 198 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [gentoo-dev] QA obscurity: "hasq test $FEATURES" != "use test"
  2009-07-22 20:45 [gentoo-dev] QA obscurity: "hasq test $FEATURES" != "use test" Robin H. Johnson
  2009-07-22 20:50 ` Ciaran McCreesh
@ 2009-07-22 21:38 ` Zac Medico
  1 sibling, 0 replies; 3+ messages in thread
From: Zac Medico @ 2009-07-22 21:38 UTC (permalink / raw
  To: gentoo-dev

Robin H. Johnson wrote:
> For iasl, upstream requests that if the tests are run at build time,
> that they are installed to the system, which is what we do. If
> FEATURES=-test USE=test is used however, using 'use test' is bogus,
> because I cannot detect that the tests are going to/have run.

Currently, there's not much you can do about the "going to run" part
except check FEATURES. However, for the "have run" part, you can do
something like this inside src_test:

touch "$WORKDIR"/yes_the_tests_did_run

-- 
Thanks,
Zac



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2009-07-22 21:39 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-07-22 20:45 [gentoo-dev] QA obscurity: "hasq test $FEATURES" != "use test" Robin H. Johnson
2009-07-22 20:50 ` Ciaran McCreesh
2009-07-22 21:38 ` Zac Medico

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox