[Avocado-devel] Arguments with remote target

Lukáš Doktor ldoktor at redhat.com
Wed Nov 21 14:13:36 UTC 2018


Dear Fran,

I'm sorry for a late response, but with the release we were a bit busier. You are right, the `mux-inject` is not currently passed to remote execution as a long time ago we decided to go the safe way and to use whitelist of arguments passed to remote process. You can find the arguments in `optional_plugins/runner_remote/avocado_runner_remote/__init__.py` in `run_test` around line `429` but basically it's: --mux-yaml, --dry-run, --filter-by-tags-include-empty and --filter-by-tags.

We discussed several times the possibility of changing the approach to blacklist, but never actually did that. Maybe it's another time we should consider that, what do you think, guys?

Regards,
Lukáš


Dne 21. 11. 18 v 10:53 Fran Sanchez napsal(a):
> After looking into the code, apparently there isn't support for
> variants/multiplexation in the remote runner:
> 
>     def run_suite(self, test_suite, variants, timeout=0, replay_map=None,
>                   suite_order="variants-per-test"):
>         """
>         Run one or more tests and report with test result.
> 
>         :param params_list: a list of param dicts.
>         :param variants: A varianter iterator (unused here)
> 
> On Mon, 19 Nov 2018 at 14:37, Fran Sanchez <fran.sanchez at five.ai> wrote:
> 
>> Hello,
>>
>> first of all I would like to introduce myself to you. My name is Fran and
>> I am working for FiveAI as a test engineer. While I was looking for a test
>> framework that I could use for automation and standardized testing across
>> multiple teams I came across avocado and since them I have been reading
>> docs, code and trying to better understand its capabilities.
>>
>> One of the feature that I would like to use is the remote Docker plugin,
>> but I cannot get the params API working correctly. I have tried the next,
>> which works correctly:
>> $avocado run --ignore-missing-references=on --mux-inject
>> /run:sleep_length:2.0 -- sleeptest.py
>> $cat
>> /home/francisco/avocado/job-results/latest/jobdata/cmdline
>>>> ['/home/francisco/.virtualenvs/avocado27/bin/avocado', 'run',
>> '--ignore-missing-references=on', '--mux-inject', '/run:sleep_length:2.0',
>> '--', 'sleeptest.py']
>> In the log:
>> 2018-11-19 14:31:11,069 parameters       L0146 DEBUG| PARAMS
>> (key=sleep_length, path=*, default=1) => '2.0'
>>
>> But when I try:
>> avocado run --ignore-missing-references=on --mux-inject
>> /run:sleep_length:2.0 --docker alpine-avocado -- sleeptest.py
>> $cat
>> /home/francisco/avocado/job-results/latest/jobdata/cmdline
>>>> ['/usr/local/bin/avocado', 'run', '--force-job-id',
>> 'fc8bd8d0ee0bfa9d737501f9f6a21af5854b48ca', '--json', '-', '--archive',
>> 'sleeptest.py'](
>> In the log:
>> 2018-11-19 14:32:50,304 parameters       L0146 DEBUG| PARAMS (key=timeout,
>> path=*, default=None) => None
>>
>> So, it seems that when using the remote Docker plugin the parameters are
>> not being sent, at least using the --mux-inject argument. Any suggestions?
>> What would be the best way to be able to send arguments to the remote
>> Docker?
>>
>> Thank you,
>> Fran
>>
> 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/avocado-devel/attachments/20181121/f2371e4d/attachment.sig>


More information about the Avocado-devel mailing list