]> code.ossystems Code Review - openembedded-core.git/commitdiff
ptest: d.keys() is slow, use a list instead
authorRichard Purdie <richard.purdie@linuxfoundation.org>
Tue, 14 Jan 2014 11:43:14 +0000 (11:43 +0000)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Tue, 14 Jan 2014 11:50:47 +0000 (11:50 +0000)
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.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/classes/ptest.bbclass

index e5bbb89ade2734cfbaa00591f6f6d187c8513e5c..caf7101224f8b8953d194ca881a861496a25b195 100644 (file)
@@ -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)
 }