瀏覽代碼

bitbake: lib/bb/tests: use bb.build.listtasks() instead of __BBTASKS

Use the new listtasks() function (introduced in 185c4b) to avoid
accessing a private variable.

Also use assertSequenceEqual() directly as we don't really care about
the actual type returned, only that it's a sequence.

(Bitbake rev: 452289efc6d3608ceca321286fd5bf417a6e1bed)

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Ross Burton 6 月之前
父節點
當前提交
d6f210f690
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      bitbake/lib/bb/tests/parse.py

+ 1 - 1
bitbake/lib/bb/tests/parse.py

@@ -201,7 +201,7 @@ deltask ${EMPTYVAR}
         f = self.parsehelper(self.addtask_deltask)
         d = bb.parse.handle(f.name, self.d)['']
 
-        self.assertEqual(['do_fetch2', 'do_patch2', 'do_myplaintask', 'do_mytask', 'do_mytask2', 'do_mytask5'], d.getVar("__BBTASKS"))
+        self.assertSequenceEqual(['do_fetch2', 'do_patch2', 'do_myplaintask', 'do_mytask', 'do_mytask2', 'do_mytask5'], bb.build.listtasks(d))
         self.assertEqual(['do_mytask'], d.getVarFlag("do_mytask5", "deps"))
 
     broken_multiline_comment = """