From: Richard Purdie Date: Tue, 14 Jan 2014 11:43:14 +0000 (+0000) Subject: ptest: d.keys() is slow, use a list instead X-Git-Tag: rev_ivi_2015_02_04~9712 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=f0fceeb7fdb7a5369d9ac39b67976131787e0012;p=scm%2Fbb%2Ftizen-distro.git ptest: d.keys() is slow, use a list instead Unfortunately d.keys is extremely slow. Using a list in this case should be fine since the addtask lines are immediately above the code and aren't going to change often. (From OE-Core rev: 5901189f0442cefc4d17623547f7358ffc2d37a6) Signed-off-by: Richard Purdie --- diff --git a/meta/classes/ptest.bbclass b/meta/classes/ptest.bbclass index e5bbb89..caf7101 100644 --- a/meta/classes/ptest.bbclass +++ b/meta/classes/ptest.bbclass @@ -55,6 +55,6 @@ python () { # Remove all '*ptest_base' tasks when ptest is not enabled if not(d.getVar('PTEST_ENABLED', True) == "1"): - for i in filter(lambda k: d.getVarFlag(k, "task") and k.endswith("ptest_base"), d.keys()): + for i in ['do_configure_ptest_base', 'do_compile_ptest_base', 'do_install_ptest_base']: bb.build.deltask(i, d) }