From 175810503d5596370cf7d840539ebdf35cf30278 Mon Sep 17 00:00:00 2001 From: Daniel Istrate Date: Mon, 4 Jan 2016 15:43:56 +0200 Subject: 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] Signed-off-by: Daniel Istrate Signed-off-by: Ross Burton --- scripts/oe-selftest | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/oe-selftest b/scripts/oe-selftest index bd903f9e68..c32c419e19 100755 --- a/scripts/oe-selftest +++ b/scripts/oe-selftest @@ -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: -- cgit 1.2.3-korg