Thanks guys for your response, but any one want to comment on the CL itself?
I will be OOO and took a long vacation shortly and like to commit it before
I leave.

Thanks a lot.

On Tue, Jan 4, 2011 at 1:44 PM, Gregory P. Smith <[email protected]> wrote:

> The test parameters support was done because we were planning on moving
> away from the ability to upload arbitrary code (ie: a control file) via the
> RPC interface on our servers.  Note the frontend/afe/rpc_interface.py now
> has a create_parameterized_job RPC defined.  It takes a test name and a test
> parameters rather than arbitrary code from a control file.  It is a combo of
> generate_control_file and create_job in one single RPC.  Today's
> generate_control_file() sends code to the client, and the client is
> responsible for sending that back to the server in create_job().  Not really
> a sane design if you want to have some control over what is and isn't
> allowed to run as your autotest user on your autotest server (server side
> job) or as root on the clients (client side job).
>
> That is no longer our plan so we haven't done anything further with the
> implementation of that.  I believe it was working but the CLI and web GUI
> were never updated to use create_parameterized_job().  That is the work that
> remains for someone who wants to use it without making their own RPC calls.
>
> -gps
>
>
> On Tue, Jan 4, 2011 at 11:18 AM, John Admanski <[email protected]>wrote:
>
>> The existing work on test parameterization was all done by James Ren
>> before his departure; I'm not sure what the current plans are regarding
>> completing his work, so I'll add Mikhail, Jean-Marc and Greg to this thread
>> in case they can comment on it.
>>
>> -- John
>>
>>
>> On Thu, Dec 23, 2010 at 10:28 AM, Eric Li(李咏竹) <[email protected]> wrote:
>>
>>> Autotest,
>>>
>>> There are bunch of tables supposed to support parameterized job for
>>> autotest, but seems the development of that feature was halted, not too many
>>> code has been added to support that function.
>>>
>>> The ChromiumOS test project is interested to take some advantage of that.
>>> And following the original design, the first step seems to define and
>>> support parameterized test.
>>>
>>> So I simply introduced an optional control file variables:
>>> TEST_PARAMETERS="para1,para2,para2...:", and it will be parsed by
>>> utils/test_importer and saved into afe_test_parameters table in the db for
>>> future use.
>>>
>>> Please review.
>>> Index: utils/test_importer.py
>>> ===================================================================
>>> --- utils/test_importer.py (revision 5005)
>>> +++ utils/test_importer.py (working copy)
>>> @@ -241,6 +241,12 @@
>>>
>>>          _log_or_execute(repr(new_test), new_test.save)
>>>          add_label_dependencies(new_test)
>>> +
>>> +        # save TestParameter
>>> +        for para_name in data.test_parameters:
>>> +          test_parameter = models.TestParameter.objects.get_or_create(
>>> +              test=new_test, name=para_name)[0]
>>> +          test_parameter.save()
>>>
>>>
>>>  def _set_attributes_clean(test, data):
>>> Index: client/common_lib/control_data.py
>>> ===================================================================
>>> --- client/common_lib/control_data.py (revision 5005)
>>> +++ client/common_lib/control_data.py (working copy)
>>> @@ -19,6 +19,7 @@
>>>          self.experimental = False
>>>          self.run_verify = True
>>>          self.sync_count = 1
>>> +        self.test_parameters = set()
>>>
>>>          diff = REQUIRED_VARS - set(vars)
>>>          if len(diff) > 0:
>>> @@ -135,6 +136,10 @@
>>>          self._set_option('test_type', val, ['client', 'server'])
>>>
>>>
>>> +    def set_test_parameters(self, val):
>>> +        self._set_set('test_parameters', val)
>>> +
>>> +
>>>  def _extract_const(n):
>>>      assert(n.__class__ == compiler.ast.Assign)
>>>      assert(n.expr.__class__ == compiler.ast.Const)
>>>
>>>
>>>
>>>
>>> Merry Christmas
>>>
>>> --
>>> Eric Li
>>> 李咏竹
>>> Google Kirkland
>>>
>>>
>>>
>>
>


-- 
Eric Li
李咏竹
Google Kirkland
_______________________________________________
Autotest mailing list
[email protected]
http://test.kernel.org/cgi-bin/mailman/listinfo/autotest

Reply via email to