diff options
author | Adrian Freihofer <adrian.freihofer@gmail.com> | 2023-12-07 21:52:50 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2023-12-13 11:58:15 +0000 |
commit | 1ec91141e5a06921eafdbdc48b19b1dd17a53ff7 (patch) | |
tree | 36034cca460d982ee38bbf0c78484d5dd6a88edb /meta/lib | |
parent | 2df986746b4010a24def7369f356b50e52bda50d (diff) | |
download | poky-1ec91141e5a06921eafdbdc48b19b1dd17a53ff7.tar.gz |
oeqa/core/decorator: add skip if not qemu-usermode
Add a decorator to skip tests which require the qemu-usermode machine
feature.
(From OE-Core rev: 3d79615d6c9ccb1ff3766ce05389bc22cbd656e1)
Signed-off-by: Adrian Freihofer <adrian.freihofer@siemens.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/lib')
-rw-r--r-- | meta/lib/oeqa/core/decorator/data.py | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/meta/lib/oeqa/core/decorator/data.py b/meta/lib/oeqa/core/decorator/data.py index de881e097a..5444b2cb75 100644 --- a/meta/lib/oeqa/core/decorator/data.py +++ b/meta/lib/oeqa/core/decorator/data.py | |||
@@ -186,6 +186,16 @@ class skipIfNotQemu(OETestDecorator): | |||
186 | self.case.skipTest('Test only runs on qemu machines') | 186 | self.case.skipTest('Test only runs on qemu machines') |
187 | 187 | ||
188 | @registerDecorator | 188 | @registerDecorator |
189 | class skipIfNotQemuUsermode(OETestDecorator): | ||
190 | """ | ||
191 | Skip test if MACHINE_FEATURES does not contain qemu-usermode | ||
192 | """ | ||
193 | def setUpDecorator(self): | ||
194 | self.logger.debug("Checking if MACHINE_FEATURES does not contain qemu-usermode") | ||
195 | if 'qemu-usermode' not in self.case.td.get('MACHINE_FEATURES', '').split(): | ||
196 | self.case.skipTest('Test requires qemu-usermode in MACHINE_FEATURES') | ||
197 | |||
198 | @registerDecorator | ||
189 | class skipIfQemu(OETestDecorator): | 199 | class skipIfQemu(OETestDecorator): |
190 | """ | 200 | """ |
191 | Skip test if MACHINE is qemu* | 201 | Skip test if MACHINE is qemu* |