On 2013-03-13 09:40, Pavel Raiskup wrote:
Hello reviewers!
I am trying to write some autotools related checker and I found that there
is a problem with checkers dependencies.
The problem I was facing was that I need in my check the 'buildsrc' to be
initialized. This shouldn't be a problem as each check is automatically
dependant on 'CheckBuildCompleted', am I right?
But when I tried to run something like this:
$ ./try-fedora-review --name tar -s \
CheckAutotoolsObsoleteMarcos
.. the try-fedora-review script was unable to prepare the check-system
(mock, review directories, etc.) properly. The problem IMO is that you
have there something like this (in src/FedoraReview/check_base.py):
138 return None
139
140 is_run = property(lambda self: hasattr(self, 'result'))
The main problem here is IMO that the 'result' attribute is (almost?)
always set to some default value. Even if the test has not been run yet.
Possible solution (that fixes the bad behavior for me) is in attachment
but I'm not very familiar with internals of FedoraReview code. The only
thing I am aware that it is pretty annoying :) - it will always fail on
workdir_setup() call which does workdir lazy initialization but its
requirements are not met yet (due to not-ran checks).
I would also rename the is_run to something like 'finished' or some past
tense form.. if you are interested - I'm able to generate patch.
Pavel
Well, that patch fails in first test so....
That said, your usecase is actually interesting, I've considered
something similar. Could you maybe share a little more about what you
are trying to do?
--alec