[Concept,08/15] buildman: Handle CROSS_COMPILE being in the environment

Message ID 20250819193918.874215-9-sjg@u-boot.org
State New
Headers
Series test: Improvements to make check et al |

Commit Message

Simon Glass Aug. 19, 2025, 7:39 p.m. UTC
  From: Simon Glass <sjg@chromium.org>

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>
---

 tools/buildman/test.py | 1 +
 1 file changed, 1 insertion(+)
  

Patch

diff --git a/tools/buildman/test.py b/tools/buildman/test.py
index b4e612bc5d6..a134ac4f917 100644
--- a/tools/buildman/test.py
+++ b/tools/buildman/test.py
@@ -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-')