<div dir="ltr">Interesting thread. A parallel/complementary approach might be to write an Autotest plugin + auto test runner? it isn't as clean as porting existing tests which would allow reviewing and cleaning things up but it does allow folks to run their non-contributed autotest tests through Avocado in a generic manner.<div><br></div><div>-</div><div>Vincent</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Jan 11, 2016 at 10:07 AM, Cleber Rosa <span dir="ltr"><<a href="mailto:crosa@redhat.com" target="_blank">crosa@redhat.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class=""><br>
<br>
----- Original Message -----<br>
> From: "Amador Pahim" <<a href="mailto:apahim@redhat.com">apahim@redhat.com</a>><br>
> To: <a href="mailto:avocado-devel@redhat.com">avocado-devel@redhat.com</a><br>
> Sent: Monday, January 11, 2016 3:12:00 PM<br>
> Subject: [Avocado-devel] Port autotest client tests to avocado: next steps?<br>
><br>
> Hello,<br>
><br>
> In a first interaction trying to port autotest client tests to avocado,<br>
> I could verify the port was quite simple for the tests I worked on<br>
> (stress, compilebench, aiostress and bonnie). These 4 tests are already<br>
> present in examples/tests/ directory.<br>
><br>
<br>
</span>Very good indeed!<br>
<span class=""><br>
> There are currently 105 tests in avocado-client-tests and we should now<br>
> discuss if/when(priority?) are we going to port them all and, if yes,<br>
> some extra points should be discussed:<br>
><br>
<br>
</span>I believe this is actually a task in itself: discard the tests that are<br>
not useful in any way shape or form. Then, the remaining tests will be<br>
part of a list of test that we *want* to have ported. Not necessarily<br>
one person will do all that, and this is indeed a perfect example of first<br>
time contributions to Avocado. Trello cards with "low hanging fruit" for<br>
those could attract those first time contributors.<br>
<span class=""><br>
> - Many tests are just a matter of extract/configure/make a tarball and<br>
> run the binary with proper arguments. Instead of writing one test per<br>
> tarball, we could create a base test and vary only the yaml file<br>
> containing the url to on-demand download the tarball and the arguments<br>
> to be used with the resulting binary.<br>
><br>
<br>
</span>I see the following tasks here:<br>
<br>
1) Prototype a "TarballBuildAndRunTest" base class<br>
2) Port a few tests that adhere to this initial base class implementation<br>
<br>
The tests that were already ported are probably good candidates to be<br>
"ported" yet again to this base class.<br>
<span class=""><br>
> - Either downloading the tarball during the test or keeping the tarball<br>
> in the repository, should we create a separate repository to keep all<br>
> those tests/tarballs?<br>
<br>
</span>3) Create a separate "avocado-tests" repo.<br>
4) Implement the concept of "lazy download of resource files". A tarball<br>
should be considered just that, a binary resource. If a resource URL is local,<br>
assume it's in the test data dir. If the URL is remote (say http) then<br>
check if it's already downloaded (checking a hash), if not downloaded download<br>
it during test.<br>
5) Define a naming convention for a YAML tree/keys that describe resource<br>
files which may be used during tests.<br>
6) Write a script (contrib or official) that goes over the YAML files and<br>
checks/downloads the resource files.<br>
<br>
Note that #3 doesn't depend on anything, but it only makes sense if we<br>
decide to expand the set of ported tests (which I think we should).<br>
Also, if Tasks 4, 5 and 6 are implemented, the idea of a separate repo<br>
(#3) may loose a bit of its value, since the ported tests should be a<br>
pretty small amount of Python code.<br>
<div class="HOEnZb"><div class="h5"><br>
><br>
> The hope is we can discuss/define the next steps regarding this matter.<br>
> Could you share your thoughts?<br>
><br>
> Best,<br>
> --<br>
> apahim<br>
><br>
> _______________________________________________<br>
> Avocado-devel mailing list<br>
> <a href="mailto:Avocado-devel@redhat.com">Avocado-devel@redhat.com</a><br>
> <a href="https://www.redhat.com/mailman/listinfo/avocado-devel" rel="noreferrer" target="_blank">https://www.redhat.com/mailman/listinfo/avocado-devel</a><br>
><br>
<br>
_______________________________________________<br>
Avocado-devel mailing list<br>
<a href="mailto:Avocado-devel@redhat.com">Avocado-devel@redhat.com</a><br>
<a href="https://www.redhat.com/mailman/listinfo/avocado-devel" rel="noreferrer" target="_blank">https://www.redhat.com/mailman/listinfo/avocado-devel</a><br>
</div></div></blockquote></div><br></div>