[Avocado-devel] Dependencies in avocado-vt cartesian configuration
Lukáš Doktor
ldoktor at redhat.com
Mon May 2 06:59:20 UTC 2016
Dne 28.4.2016 v 03:29 Alan Evangelista napsal(a):
> Hi. I have not found a users mailing list, so I'll assume this devel
> mailing list
> is for both users and developers. If I am wrong and there is a users
> mailing list,
> pls point me to it.
>
> I have not understood what is the purpose of the dependencies feature in
> cartesian configuration, documented in
> http://avocado-vt.readthedocs.io/en/latest/CartesianConfig.html.
> My understanding when reading doc is that its purpose is to order variant
> sets combinations order, however I have tried running the dependencies
> cartesian config example with and without dependencies by the cartesian
> config parser available in the avocado-vt git repository and the output is
> identical. (dict 1: one, dict 2: two, dict 3: three).
>
> Could someone explain better the purpose of this feature and present some
> examples?
>
> Thanks in advance.
>
>
> Regards,
> Alan Evangelista
>
>
> _______________________________________________
> Avocado-devel mailing list
> Avocado-devel at redhat.com
> https://www.redhat.com/mailman/listinfo/avocado-devel
>
Hello Alan,
CC: Lucas, maybe he remembers the story of test deps
I haven't seen that part for ages and I forgot most of what I had known,
but IIRC dependencies were suppose to track if dependent tests of this
test passed (if they were executed) and skip the test if not.
Anyway I don't think it does anything now. I briefly checked the sources
and the functions handling the deps are not used from anywhere.
Avocado-vt always keeps the order as it is in the file, including
multiple variants definition, for example:
```
variants:
- first:
- second:
variants:
- a:
- b:
variants:
- alpha:
- beta:
```
first puts the first, then [ab] variants of alpha and the [ab] variants
of beta:
```
dict 1: first
dict 2: second.alpha.a
dict 3: second.alpha.b
dict 4: second.beta.a
dict 5: second.beta.b
```
If you need to keep the original file and you still want to create
custom cartesian config which reorders the items, you can do it by adding:
```
include original.cfg
# or just copy&paste the first example
variants:
- myfirst:
only second
- mysecond:
only first
```
which puts the `first` as `second` and `second` as `first`, while
preserving the `second`'s subvariants order.
```
dict 1: myfirst.second.alpha.a
dict 2: myfirst.second.alpha.b
dict 3: myfirst.second.beta.a
dict 4: myfirst.second.beta.b
dict 5: mysecond.first
```
Alternatively, as suggested by Wei, you can specify the order ad-hock on
the cmdline `avocado run first second` vs. `avocado run second first`.
(note you can use `--dry-run` to see the test suite before actually
executing it)
Hopefully this helped a bit.
Regards,
Lukáš
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 473 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/avocado-devel/attachments/20160502/5a4db74a/attachment.sig>
More information about the Avocado-devel
mailing list