Hello,
Thanks for such quick answer.
So, if i understand you correctly, if i have a control file containing this:
TIME="SHORT"
AUTHOR = "Will Woods <wwoods(a)redhat.com>"
DOC = """
This test runs rpmlint to catch common packaging problems which may have
crept
into the package since the last build.
"""
NAME = 'rpmlint'
TEST_TYPE = 'CLIENT' # SERVER can be used for tests that need multiple
machines
TEST_CLASS = 'General'
TEST_CATEGORY = 'Functional'
# post-koji-build tests can expect the following variables from autoqa:
# envr: package NVR (required, epoch can be skipped)
# name: package name
# kojitag: koji tag applied to this package
job.run_test('rpmlint', name=name, envr=envr, kojitag=kojitag,
config=autoqa_conf)
I could pass the job.tag as another argument to the job.run_test, like
job.run_test('rpmlint', name=name, envr=envr, kojitag=kojitag,
config=autoqa_conf, job_tag = job.tag)
Is that right?
Joza
On 03/30/2010 07:19 AM, Lucas Meneghel Rodrigues wrote:
Hi guys, after researching a bit, here's what I found: the
autotest
scheduler will call autoserv instances and pass them a job tag (flag
-P):
03/24 09:51:35 INFO |drone_mana:0497| command = ['nice', '-n',
'10', '/usr/local/autotest/server/autoserv', '-p', '-m',
u'virtlab105.virt.bos.redhat.com', '-r',
u'/usr/local/autotest/results/541-debug_user/virtlab105.virt.bos.redhat.com',
'-u', u'debug_user', '-l', u'Development (RHEL 6)',
'-P', u'541-debug_user/virtlab105.virt.bos.redhat.com', '-n',
'/usr/local/autotest/results/drone_tmp/attach.1', '-c']
In this case, the job tag is
541-debug_user/virtlab105.virt.bos.redhat.com
Job number goes on that job tag. This tag is generated by the method
execution_tag, that combines the job id, user and the execution subdir.
The job tag is passed to autoserv, that will execute autotest on a
client. The job tag can be accessed from inside a control file. Every
autotest control file has a job object, that can be accessed through
job.tag.
So, if I understood correctly what Josef explained to me, the solution
is fairly straightforward:
1) In the control file that autoqa generates, we could have code that
writes the job tag in, say, the job keyval:
utils.write_keyval(job.resultsdir, {"job_tag": job.tag})
So this information has permanent storage.
2) The job tag is used where placing the results inside the autotest
server, which makes linking to the job results a piece of cake:
http://autotest.virt.bos.redhat.com/results/556-debug_user/virtlab104.vir...
It's basically os.path.join(results_url, job_tag)
I *think* this is a plan of action. I might have not explained myself
very well, but I did try :) If some of this, or nothing at all, makes
sense, ping me on irc.
Lucas