buildman: Handle CROSS_COMPILE being in the environment

If CROSS_COMPILE is set in the environment passed to buildman,
testMakeEnvironment() fails. Fix this by removing the variable before
starting the test.

Signed-off-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
Simon Glass
2025-08-17 17:21:00 -06:00
parent 23be77e922
commit da2183fd74

View File

@@ -650,6 +650,7 @@ class TestBuild(unittest.TestCase):
def testMakeEnvironment(self):
"""Test the MakeEnvironment function"""
os.environ.pop('CROSS_COMPILE', None)
tc = self.toolchains.Select('arm')
env = tc.MakeEnvironment(False)
self.assertEqual(env[b'CROSS_COMPILE'], b'arm-linux-')