On 10/5/18 11:24 AM, Philippe Mathieu-Daudé wrote:
Hi Cleber,

On 04/10/2018 17:14, Cleber Rosa wrote:
One of the Avocado features relevant to virtualization testing is the
ability to reuse tests in different scenarios, known as variants.
This adds a JSON based variants file, that can be used to run most
tests in a number of different architectures.  It can be run with:

    $ avocado run \
      --json-variants-load=tests/acceptance/variants/arch.json \
      --filter-by-tags='-x86_64' -- tests/acceptance/

+++ b/tests/acceptance/variants/arch.json
@@ -0,0 +1 @@
+[{"paths":["/run/*"],"variant":[["/run/aarch64",[["/run/aarch64", "arch", "aarch64"]]]],"variant_id": "aarch64"},{"paths":["/run/*"],"variant":[["/run/ppc",[["/run/ppc", "arch", "ppc"]]]],"variant_id": "ppc"},{"paths":["/run/*"],"variant":[["/run/ppc64",[["/run/ppc64", "arch", 
"ppc64"]]]],"variant_id": "ppc64"},{"paths":["/run/*"],"variant":[["/run/s390x",[["/run/s390x", "arch", "s390x"]]]],"variant_id": "s390x"},{"paths":["/run/*"],"variant":[["/run/x86_64",[["/run/x86_64", "arch", "x86_64"]]]],"variant_id": "x86_64"}]


Is this generated? (thinking about the other archs supported).

You should use some linter ;)

Also, that's a long line, which will probably get longer as more support is added. Beyond 990 bytes, it starts risking problems with corruption over email. It's also hard to view what changes incrementally if the single line changes. Is there a way to pretty-print things across multiple lines, for shorter lines and easier reading of future diffs?

--
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3266
Virtualization:  qemu.org | libvirt.org

Reply via email to