Dne 09. 05. 19 v 18:11 Cleber Rosa napsal(a): > On Wed, May 08, 2019 at 11:24:53AM -0400, Brian J. Murrell wrote: >> Hi. >> >> Having to sift through dozens of directories of the format: >> >> job-results/job-YYYY-MM-DDTHH.MM-<unique_hash> >> >> trying to find the results for a given test is frustrating. >>
I'm not sure whether I understand properly, what are you trying to achieve. From time to time I need to find particular result that executed certain tests. I do that simply by: ls *DATE*/test-results/*test_name* >> While I realize that I can get the name of the dir to look into from >> the avocado stdout, that stdout is not where I am looking when I look >> at my test results when the results are in junit format. Having to go >> from junit results then to avocado stdout to discover the directory is >> equally frustrating. >> >> If I can come up with my own unique job-results/<name> structure, am I >> able to tell avocado to use my own name instead of it's conjured "job- >> YYYY-MM-DDTHH.MM-<unique_hash>" name? >> > > Hi Brian, > > Do you mean you'd like to set the final job results directory? I mean, > you can already do: > > $ avocado run --job-results-dir=~/avocado/job-results/name/ -- /path/to/test > For CI this is what I'm using. I create a tmpdir for each execution and the "tmpdir/latest" points to the result. This nicely integrates with Jenkins as I can easily browse archived artifacts between builds as all of them share the same base (latest). Regards, Lukáš > But then, you'd get: > > ~/avocado/job-results/name/job-YYYY-MM-DDTHH.MM-<unique_hash> > > There are a number of positive aspects the (very likely unique) job > directory name, so, my first approach would be to come up with a post > job plugin that would create a link, or rename/move your job results > to a destination of your choosing. > > Say, you'd run a job with: > > $ avocado run --job-nickname=name -- /path/to/test > > And the plugin would simply do something like: > > $ ln -s $CURRENT_JOB ~/avocado/job-results/nicknames/name > > Of course a "mv" could also be done. > >> Ideally I can use a hierarchy, but even if not, being able to name that >> dir under job-results/ would be immensely helpful. >> >> Cheers, >> b. >> > > Let me know how that sounds... it should be a few lines of Python code. > > Cheers, > - Cleber. >
signature.asc
Description: OpenPGP digital signature