So while I was looking at needle cleanup yesterday I talked to the
openQA folks about the ENV-foo needle tags. I understand them a bit
These really don't have any special magic function: they're *used*
like any other tag. This means that we don't need to keep sprinkling
them around everywhere and, indeed, probably shouldn't.
They still have special significance in openQA in two fairly small
ways. The interactive needle editor in the webUI will automatically
create ENV-foo tags for several openQA variables - i.e. if the
variable FLAVOR is set for a test, the needle editor will add a ENV-
FLAVOR-(value) tag by default. However, there really isn't a good
reason to *keep* these tags unless we actually want them, according to
The other thing is that os-autoinst still has code allowing the value
of those variables to be specified via OS environment variables. This
is apparently basically a hangover from an earlier openQA design, when
*all* the configuration stuff that's now handled with the openQA
variables was handled with OS environment variables. As far as I can
tell, it's something we should pretty much pretend does not exist.
So, I'd suggest we strip most of the ENV- tags from our existing
needles, and stop including them in new needles unless we actually
want them. That is, we should only apply ENV-DESKTOP to screenshots
which are specific to a particular desktop and which we don't want to
match for any other desktop, ENV-DISTRI we should probably never use
as we don't have two 'distributions' and likely wouldn't ever mix RHEL
tests with Fedora tests(?), ENV-FLAVOR we should only use for needles
we actually want to match only for a specific flavor, etc. When
creating new needles we should strip the ENV- tags unless they're
actually desired: upstream say that's what openSUSE needle creators
are meant to do (though sometimes they forget).
I will propose a further cleanup PR today.
This does leave us with an awkward case: ENV-INSTLANG. I wasn't aware
of this stuff when I changed it to 'ENV-LANGUAGE' in the non-English
language test PR. As the ENV values are still somewhat 'special' in
the code, I don't like the ENV-LANGUAGE name any more (it *looks* like
one of these 'special' tags but in practice it isn't, as the openQA
code does nothing with it like it does for all the other ENV tags), so
I'll change that.
However there's a bit of a snag to just using ENV-INSTLANG: os-
autoinst actually has 'en_US' set as a hardcoded default value for it.
Upstream says that really should move to the openSUSE main.pm, but for
now it's in os-autoinst. So we'll either have to use a tag called,
say, just LANGUAGE, and keep stripping ENV-INSTLANG tags whenever they
show up (through someone using the needle editor and not removing it,
or whatever), or we'll have to use ENV-INSTLANG but try and override
the en_US default somehow (I haven't looked at the exact code flow
here to see if that's viable). anyway, I'll come up with something.
Fedora QA Community Monkey
IRC: adamw | Twitter: AdamW_Fedora | XMPP: adamw AT happyassassin . net