[Avocado-devel] Parallel (clustered) testing.

Lukáš Doktor ldoktor at redhat.com
Thu Mar 24 16:14:03 UTC 2016


Hello Julio,

this is something easily configurable in Jenkins including making sure 2 
projects are not using the same guest at the same time...

If you don't need to run the tests in parallel, you can use:

avocado run --external-runner "/usr/bin/avocado run $tests ... 
--remote-hostname" 192.168.1.100 192.168.1.101 ... ...

This would run:

  1) avocado run $tests --remote-hostname 192.168.1.100
  2) avocado run $tests --remote-hostname 192.168.1.101

and reports the results localy (which means PASS/FAIL per each machine 
in the UI, per-test results in the job results together with path to the 
detailed results of the "inner" avocado executions stored locally.

The only problem is it runs one instance at one time. We do plan (and 
IIRC it's higher in the priority list) to add support to run several 
tests in parallel. So when we add that, you'd be able to run this even 
in parallel (feel free to send patches).


If you look for a temporary solution, you can use bash:

```
#!/bin/sh
MACHINES="192.168.1.100 192.168.1.101"
PIDS=""
for MACHINE in $MACHINES; do
     avocado run $script &
     PIDS+=" $!"
done
for PID in $PIDS; do
     wait $PID || ERR+="$PID, "
done
[ "$ERR" ] && { echo PIDs ${ERR::-2} FAILED; exit -1; }
echo ALL PASSED
exit 0

```

Or even do some fancier things. Maybe we can add a generic contrib 
script for this... I'll think about it.

Regards,
Lukáš


Dne 23.3.2016 v 21:15 Julio Faracco napsal(a):
> Hi Cleber!
>
> You can consider me as a stakeholder of this feature. :-D
> As I said, we have many machines here running different OS.
> So this feature will reduce the time that we spent running the same
> test in each machine.
> And we can join the results of the tests in one single shot.
>
> Very nice, I was aware about parallel testing but not multiplexer.
> Really, I'm very interested to get this feature working.
>
> So, lets start ;-)
>
> Julio Cesar Faracco
> Membro da Organização da 15ª Semana da Computação - ICMC-USP
> Laboratório de Instrumentação Virtual e Microprocessadores (LIVMP) - EESC-USP
>
>
>
> 2016-03-22 15:12 GMT-03:00 Cleber Rosa <crosa at redhat.com>:
>> ----- Original Message -----
>>> From: "Julio Faracco" <jcfaracco at gmail.com>
>>> To: avocado-devel at redhat.com
>>> Sent: Friday, March 18, 2016 2:10:37 PM
>>> Subject: [Avocado-devel] Parallel (clustered) testing.
>>>
>>> Hi guys.
>>>
>>> Two questions:
>>> 1. Is there a way to run the same test in multiple hosts?
>>> Why? Here we usually test the same application in different systems
>>> such as RHEL 6.6, RHEL 6.7, RHEL 7.0, RHEL 7.1 and RHEL 7.2 (All of
>>> them are Virtual Machines setup for testing). Instead of executing 5
>>> single tests, I would like to run just one command and start all tests
>>> and get only one result.
>>>
>>> 2. Can I configure it using the avocado config (.ini) file? Because I
>>> could define each host as a section. Btw, just thought...
>>>
>>
>> Hi Julio,
>>
>> This is something we are planning to do:
>>
>> https://trello.com/c/x5Nlkdjo/360-multiplexed-test-runners
>>
>> But it's not part of the current sprint. Maybe if you push it forward
>> we can work together on it.
>>
>> Thanks,
>> Cleber Rosa.
>>
>>> Thanks! :-)
>>>
>>> Julio Cesar Faracco
>>>
>>> _______________________________________________
>>> Avocado-devel mailing list
>>> Avocado-devel at redhat.com
>>> https://www.redhat.com/mailman/listinfo/avocado-devel
>>>
>
> _______________________________________________
> Avocado-devel mailing list
> Avocado-devel at redhat.com
> https://www.redhat.com/mailman/listinfo/avocado-devel
>




More information about the Avocado-devel mailing list