On Wed, Mar 11, 2020 at 12:59:44PM -0300, Willian Rampazzo wrote:
> > That certainly sounds like an improvement.  I still don't love the
> > idea that the test results will vary based on something outside of the
> > tested code, even if a cancel is definitely better than a fail.
> 
> During the development of Avocado release 76.0, we have discussed how
> to implement a new resolver that gathers requirements listed for a
> test and fulfills them before the test starts. The discussion resulted
> in blueprint BP002 [1]. We are in the last development week of release
> 77.0, so the development of this new feature should start during the
> next release cycle.
> 
> >
> > > +Willian can explain how it works, and if found to be suitable, and work
> > > on a patch.
> >
> > Ok.  That would be good to know - will there be some command to run in
> > advance to attempt to download all the necessary images?  Would that
> > run without a timeout - or at least a much longer timeout than the
> > testcase itself has.
> 
> In the current release development (77.0), we are adding a feature
> that makes it possible to cancel a test if an asset is not available
> in the cache. It should be as simple as setting two parameters during
> the fetch call, like:
> 
> bios_path = self.fetch_asset(bios_url, asset_hash=bios_hash,
> find_only=True, cancel_on_missing=True)
> 
> Release 77.0 of Avocado is scheduled for the beginning of next week.
> As soon as it is available, I can send a patch to bump the Avocado
> version for qemu tests and a patch to this test enabling this new
> feature.
> 
> Since avocado 73.0, it is possible to fetch the assets from a test
> without actually running the test. It is a feature that parses the
> test code looking for the fetch_asset call and its parameters defined
> as variables, at a limited depth. I have tested it on ppc_prep_40p.py,
> and it works as expected. This command does not have a timeout for
> fetching the assets and is as follows:
> 
> avocado assets fetch ppc_prep_40p.py
> 
> The upcoming feature to cancel the test when an asset is not available
> used in conjunction with the command line fetch should give some
> flexibility to people running this test while the resolver is under
> development.

I saw how this worked when I did my last batch of pre-pull tests.  It
was way better than how it used to work (when I had at least a half
dozen that failed or skipped unpredictably depending on how long the
download took).

Great work, thanks!

-- 
David Gibson                    | I'll have my music baroque, and my code
david AT gibson.dropbear.id.au  | minimalist, thank you.  NOT _the_ _other_
                                | _way_ _around_!
http://www.ozlabs.org/~dgibson

Attachment: signature.asc
Description: PGP signature

Reply via email to