Conditional IUSE_TESTS does not work. |
||
Issue description
Now we have conditional IUSE_TESTS.
E.g. autotest-tests has:
X86_IUSE_TESTS="
+tests_security_SMMLocked
+tests_xfsFilesystemTestSuite
"
CLIENT_IUSE_TESTS="
x86? ( ${X86_IUSE_TESTS} )
amd64? ( ${X86_IUSE_TESTS} )
...
"
...
IUSE_TESTS="${IUSE_TESTS}
${CLIENT_IUSE_TESTS}
"
IUSE="${IUSE} ${IUSE_TESTS}"
Then, querying use shows:
equery-$BOARD u autotest-tests
[ Legend : U - final flag setting for installation]
[ : I - package is installed with flag ]
[ Colors : set, unset ]
* Found these USE flags for chromeos-base/autotest-tests-0.0.4-r8562:
U I
- - !chromeless_tests? : <unknown>
- - !chromeless_tty? : <unknown>
- - ( : <unknown>
- - ) : <unknown>
- - amd64? : <unknown>
- - arc-camera3 : <unknown>
- - arc-camera3? : <unknown>
+ - autotest : <unknown>
...
Looks like it does not work as expected.
Assuming there's unconditional tests in IUSE_TESTS, the problematic use in autotest.eclass should be copying files,
https://chromium.git.corp.google.com/chromiumos/overlays/chromiumos-overlay/+/fb968d3353baf835ecf6e71ed110b03fbf9bc4a5/eclass/autotest.eclass#201
and IUSE containing mysterious variables, like '(' etc.
I couldn't figure out how huge the real impact of this bug is, TBH.
At the moment, if the only problematic thing is copying unnecessary files, then, it _looks_ not very much serious, assuming we don't use mysterious USE flags.
If you know other, please speak up :-).
,
Feb 16 2018
generally speaking, we know it's not correct, but that hasn't been the point of this logic. the conditional IUSE is respected by autotest.eclass:get_test_list which has been "good enough" for the monster that autotest is now.
,
Feb 16 2018
Re #2: get_test_list also returns unexpected result, IIUC, right? If it is "good enough", how about just listing +test_... directly without any conditions?
,
Feb 16 2018
get_test_list returns the expected result. look at how it's using portageq to do the USE expansion as one expects (even if the PM/portage isn't parsing IUSE as ebuilds normally expect). if we listed +test_xxx all the time, it would break the conditional nesting we have now that is working.
,
Feb 16 2018
|
||
►
Sign in to add a comment |
||
Comment 1 by hidehiko@chromium.org
, Feb 16 2018