1 |
Hello, everyone. |
2 |
|
3 |
I've just pushed support PROPERTIES=test_network to git portage. It can |
4 |
now be used in ::gentoo to mark packages that are test-restricted |
5 |
because their tests need to access the Internet, i.e.: |
6 |
|
7 |
# ebuild snippet |
8 |
PROPERTIES="test_network" |
9 |
RESTRICT="test" |
10 |
|
11 |
Normally, this doesn't change anything. But if you use a new enough |
12 |
Portage (3.0.19+ when it's released, or 9999) and set in your make.conf: |
13 |
|
14 |
# make.conf snippet |
15 |
ALLOW_TEST="network" |
16 |
|
17 |
Then Portage is going to unrestrict tests in the packages using the new |
18 |
property, and run the test phase with network-sandbox disabled. This |
19 |
way developers and arch testers can improve test coverage without |
20 |
affecting users that do not wish random Internet access. |
21 |
|
22 |
|
23 |
This was originally proposed to EAPI 8 as RESTRICT="network-test". |
24 |
However, we've decided that by using a combination of PROPERTIES + |
25 |
regular RESTRICT="test" we can add this to all EAPIs and benefit from it |
26 |
immediately. |
27 |
|
28 |
It is quite possible that future versions of Portage will allow |
29 |
additional test_* properties and ALLOW_TEST values, e.g. "test_docker". |
30 |
|
31 |
I'd say that this is an '80%' solution. Generally, if we classified |
32 |
packages on a non-linear scale of 1..5 that: |
33 |
|
34 |
1 - all tests run locally |
35 |
2 - there are some insignificant tests using Internet |
36 |
3 - there are some local tests and some Internet tests and both are |
37 |
needed to meaningfully test the package |
38 |
4 - the vast majority of tests require Internet, the few tests that run |
39 |
locally are insignificant |
40 |
5 - all tests require Internet |
41 |
|
42 |
This solution addresses 4 & 5. 1 is good, for 2 it should be good |
43 |
enough to deselect the few tests. 3 is unsolved right now. |
44 |
|
45 |
-- |
46 |
Best regards, |
47 |
Michał Górny |