@@ -740,7 +740,9 @@ A test may, for instance, use the same value when selecting the
architecture of a kernel or disk image to boot a VM with.
The ``arch`` attribute will be set to the test parameter of the same
-name, and if one is not given explicitly, it will be set to ``None``.
+name. If one is not given explicitly, it will either be set to
+``None``, or, if the test is tagged with one (and only one)
+``:avocado: tags=arch:VALUE`` tag, it will be set to ``VALUE``.
qemu_bin
~~~~~~~~
@@ -53,7 +53,12 @@ def pick_default_qemu_bin(arch=None):
class Test(avocado.Test):
def setUp(self):
self._vms = {}
- self.arch = self.params.get('arch')
+ arches = self.tags.get('arch', [])
+ if len(arches) == 1:
+ arch = arches.pop()
+ else:
+ arch = None
+ self.arch = self.params.get('arch', default=arch)
default_qemu_bin = pick_default_qemu_bin(arch=self.arch)
self.qemu_bin = self.params.get('qemu_bin',
default=default_qemu_bin)