[1/3] tests/runqueue: Set TOPDIR in test

Message ID 20211113162549.3931833-1-richard.purdie@linuxfoundation.org
State Accepted, archived
Commit c8f1eb377ceb1fc78cbfaed976107720ad78c075
Headers show
Series [1/3] tests/runqueue: Set TOPDIR in test | expand

Commit Message

Richard Purdie Nov. 13, 2021, 4:25 p.m. UTC
It was clear with testing that we're asuming bitbake sets TOPDIR correctly
when running these tests. Remove that implict assumption and make it
explicit.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
---
 lib/bb/tests/runqueue.py | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Patch

diff --git a/lib/bb/tests/runqueue.py b/lib/bb/tests/runqueue.py
index 5b6ada886a..2bf00dc62a 100644
--- a/lib/bb/tests/runqueue.py
+++ b/lib/bb/tests/runqueue.py
@@ -29,9 +29,10 @@  class RunQueueTests(unittest.TestCase):
     def run_bitbakecmd(self, cmd, builddir, sstatevalid="", slowtasks="", extraenv=None, cleanup=False):
         env = os.environ.copy()
         env["BBPATH"] = os.path.realpath(os.path.join(os.path.dirname(__file__), "runqueue-tests"))
-        env["BB_ENV_EXTRAWHITE"] = "SSTATEVALID SLOWTASKS"
+        env["BB_ENV_EXTRAWHITE"] = "SSTATEVALID SLOWTASKS TOPDIR"
         env["SSTATEVALID"] = sstatevalid
         env["SLOWTASKS"] = slowtasks
+        env["TOPDIR"] = builddir
         if extraenv:
             for k in extraenv:
                 env[k] = extraenv[k]