mirror of
https://git.yoctoproject.org/poky
synced 2026-02-21 00:49:41 +01:00
oe-selftest: Improved --list-classes when determining test names
--list-classes does a weak validation when determining test names:
(if method.startswith("test_") which could report any class attribute
that starts with 'test_' as a valid test case.
This fix checks that the class attribute that starts with 'test_'
is also callable (is a method).
Fix for [YOCTO #8862]
(From OE-Core rev: 175810503d5596370cf7d840539ebdf35cf30278)
Signed-off-by: Daniel Istrate <daniel.alexandrux.istrate@intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
committed by
Richard Purdie
parent
4ec2da71db
commit
17d886bef2
@@ -453,7 +453,7 @@ def main():
|
||||
if isinstance(t, type(oeSelfTest)) and issubclass(t, oeSelfTest) and t!=oeSelfTest:
|
||||
print " --", v
|
||||
for method in dir(t):
|
||||
if method.startswith("test_"):
|
||||
if method.startswith("test_") and callable(vars(t)[method]):
|
||||
print " -- --", method
|
||||
|
||||
except (AttributeError, ImportError) as e:
|
||||
|
||||
Reference in New Issue
Block a user